KVM: Deal with interrupt shadow state for emulated instructions
commit9661bf29e0bcfb17f64a4145bb283d3ab53c0971
authorGlauber Costa <glommer@redhat.com>
Mon, 3 Aug 2009 17:57:53 +0000 (3 14:57 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:33:31 +0000 (8 20:33 -0700)
tree2f2646444538a75e3166ea77a34989228b2f7eb0
parentd4a81389f6643898ecd2f7f5976fd59f37d65e54
KVM: Deal with interrupt shadow state for emulated instructions

(cherry picked from commit 310b5d306c1aee7ebe32f702c0e33e7988d50646)

We currently unblock shadow interrupt state when we skip an instruction,
but failing to do so when we actually emulate one. This blocks interrupts
in key instruction blocks, in particular sti; hlt; sequences

If the instruction emulated is an sti, we have to block shadow interrupts.
The same goes for mov ss. pop ss also needs it, but we don't currently
emulate it.

Without this patch, I cannot boot gpxe option roms at vmx machines.
This is described at https://bugzilla.redhat.com/show_bug.cgi?id=494469

Signed-off-by: Glauber Costa <glommer@redhat.com>
CC: H. Peter Anvin <hpa@zytor.com>
CC: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/include/asm/kvm_x86_emulate.h
arch/x86/kvm/x86.c
arch/x86/kvm/x86_emulate.c