aboutsummaryrefslogtreecommitdiff
path: root/cpu-exec.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-13 12:33:02 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-13 12:33:02 +0000
commitd40c54d641148b29457c2cb2abf6038bcea889c1 (patch)
tree7e10f964080a73e631bb61d777917455ae7e5d1f /cpu-exec.c
parent5e9ae189f8c5331aff011d91c2f54bd830663975 (diff)
downloadqemu-d40c54d641148b29457c2cb2abf6038bcea889c1.zip
qemu-d40c54d641148b29457c2cb2abf6038bcea889c1.tar.gz
qemu-d40c54d641148b29457c2cb2abf6038bcea889c1.tar.bz2
target-i386: SVM: acknowledge interrupt only after it is taken
SVM specifies that the V_IRQ mask is only to be removed, if the interrupt that is to be delivered actually is delivered. As of the SVM rewrite, this mask is always unmasked when the main cpu loop is processed, leaving a corner case where calling the interrupt handler causes a #PF. In that case (booting Linux / starting gfxboot) the current implementation tells the VMM the interrupt is taken, even though it is not. This patch modifies the VIRQ unmasking to occur after do_interrupt, making gfxboot work again. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6008 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'cpu-exec.c')
-rw-r--r--cpu-exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu-exec.c b/cpu-exec.c
index 65435f5..ed1545b 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -401,11 +401,11 @@ int cpu_exec(CPUState *env1)
int intno;
/* FIXME: this should respect TPR */
svm_check_intercept(SVM_EXIT_VINTR);
- env->interrupt_request &= ~CPU_INTERRUPT_VIRQ;
intno = ldl_phys(env->vm_vmcb + offsetof(struct vmcb, control.int_vector));
if (loglevel & CPU_LOG_TB_IN_ASM)
fprintf(logfile, "Servicing virtual hardware INT=0x%02x\n", intno);
do_interrupt(intno, 0, 0, 0, 1);
+ env->interrupt_request &= ~CPU_INTERRUPT_VIRQ;
next_tb = 0;
#endif
}