KVM: Deal with interrupt shadow state for emulated instructions
authorGlauber Costa <glommer@redhat.com>
Tue, 12 May 2009 20:21:06 +0000 (16:21 -0400)
committerAvi Kivity <avi@redhat.com>
Wed, 10 Jun 2009 08:48:54 +0000 (11:48 +0300)
commit310b5d306c1aee7ebe32f702c0e33e7988d50646
tree101bb4c72f1bb3eb3d4f60406435703f538c0ced
parent2809f5d2c4cfad171167b131bb2a21ab65eba40f
KVM: Deal with interrupt shadow state for emulated instructions

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>
arch/x86/include/asm/kvm_x86_emulate.h
arch/x86/kvm/x86.c
arch/x86/kvm/x86_emulate.c