]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: properly update ready_for_interrupt_injection
authorMarcelo Tosatti <mtosatti@redhat.com>
Tue, 4 May 2010 02:04:27 +0000 (23:04 -0300)
committerAvi Kivity <avi@redhat.com>
Wed, 19 May 2010 08:36:33 +0000 (11:36 +0300)
commitea635489df49a0696d10d4f807da04801efb16ac
tree6a0714f44067f2991d4b6910f646ccc691bd3deb
parent8192d1757a7ef87e046ed11cdee42adc0fb887ed
KVM: x86: properly update ready_for_interrupt_injection

The recent changes to emulate string instructions without entering guest
mode exposed a bug where pending interrupts are not properly reflected
in ready_for_interrupt_injection.

The result is that userspace overwrites a previously queued interrupt,
when irqchip's are emulated in userspace.

Fix by always updating state before returning to userspace.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c