All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [6008] target-i386: SVM: acknowledge interrupt only after it is taken
@ 2008-12-13 12:33 Aurelien Jarno
  0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2008-12-13 12:33 UTC (permalink / raw)
  To: qemu-devel

Revision: 6008
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6008
Author:   aurel32
Date:     2008-12-13 12:33:02 +0000 (Sat, 13 Dec 2008)

Log Message:
-----------
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>

Modified Paths:
--------------
    trunk/cpu-exec.c

Modified: trunk/cpu-exec.c
===================================================================
--- trunk/cpu-exec.c	2008-12-13 12:30:21 UTC (rev 6007)
+++ trunk/cpu-exec.c	2008-12-13 12:33:02 UTC (rev 6008)
@@ -401,11 +401,11 @@
                             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
                         }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-13 12:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-13 12:33 [Qemu-devel] [6008] target-i386: SVM: acknowledge interrupt only after it is taken Aurelien Jarno

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.