]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commit
KVM: Avoid instruction emulation when event delivery is pending
authorAvi Kivity <avi@qumranet.com>
Wed, 13 Aug 2008 15:00:28 +0000 (18:00 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 20 Aug 2008 18:05:06 +0000 (11:05 -0700)
commitcd0a0d2371464e0f80ef1229bf7aa73671ce10e1
tree479b3b5272511a9656145c0524d95ebfb8ef1f99
parent3756d6be6e5ee6a66aa18a8798eab81b56d1fe68
KVM: Avoid instruction emulation when event delivery is pending

(cherry-picked from commit 577bdc496614ced56d999bbb425e85adf2386490)

When an event (such as an interrupt) is injected, and the stack is
shadowed (and therefore write protected), the guest will exit.  The
current code will see that the stack is shadowed and emulate a few
instructions, each time postponing the injection.  Eventually the
injection may succeed, but at that time the guest may be unwilling
to accept the interrupt (for example, the TPR may have changed).

This occurs every once in a while during a Windows 2008 boot.

Fix by unshadowing the fault address if the fault was due to an event
injection.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/mmu.c
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c