summaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@web.de>2010-06-02 08:49:14 +0200
committerAurelien Jarno <aurelien@aurel32.net>2010-06-30 20:59:53 +0200
commitd011db9f70c93e9bc5401feedafa82677b4a0f8a (patch)
tree3760e9e37f101f7abca8d22dcaff9abc14db4018 /target-i386
parent38c9a236535087d605ba5726dc8feecbd8e862a3 (diff)
downloadqemu-d011db9f70c93e9bc5401feedafa82677b4a0f8a.tar.gz
qemu-d011db9f70c93e9bc5401feedafa82677b4a0f8a.tar.bz2
qemu-d011db9f70c93e9bc5401feedafa82677b4a0f8a.zip
x86: svm: Always clear event_inj on vmexit
We currently only clear SVM_EVTINJ_VALID after successful interrupt delivery. This apparently does not match real hardware which clears the whole event_inj field on every vmexit, including unsuccessful interrupt delivery. Reported-by: Erik van der Kouwe <vdkouwe@cs.vu.nl> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/op_helper.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c
index c1256f4abd..71331c6c33 100644
--- a/target-i386/op_helper.c
+++ b/target-i386/op_helper.c
@@ -5388,6 +5388,7 @@ void helper_vmexit(uint32_t exit_code, uint64_t exit_info_1)
ldl_phys(env->vm_vmcb + offsetof(struct vmcb, control.event_inj)));
stl_phys(env->vm_vmcb + offsetof(struct vmcb, control.exit_int_info_err),
ldl_phys(env->vm_vmcb + offsetof(struct vmcb, control.event_inj_err)));
+ stl_phys(env->vm_vmcb + offsetof(struct vmcb, control.event_inj), 0);
env->hflags2 &= ~HF2_GIF_MASK;
/* FIXME: Resets the current ASID register to zero (host ASID). */