From ab5ea55805f89a26e35a8becb072049fec0f9d01 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Wed, 2 Jun 2010 08:49:14 +0200 Subject: [PATCH] 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 Signed-off-by: Jan Kiszka Signed-off-by: Aurelien Jarno --- target-i386/op_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-i386/op_helper.c b/target-i386/op_helper.c index c1256f4..71331c6 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). */ -- 2.7.4