From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBTgH-0000Gy-3H for qemu-devel@nongnu.org; Sat, 13 Dec 2008 07:33:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBTgC-0000GD-TV for qemu-devel@nongnu.org; Sat, 13 Dec 2008 07:33:09 -0500 Received: from [199.232.76.173] (port=36633 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBTg9-0000Fs-O8 for qemu-devel@nongnu.org; Sat, 13 Dec 2008 07:33:07 -0500 Received: from savannah.gnu.org ([199.232.41.3]:41116 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LBTg7-0001LQ-QF for qemu-devel@nongnu.org; Sat, 13 Dec 2008 07:33:04 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LBTg7-0007B0-CC for qemu-devel@nongnu.org; Sat, 13 Dec 2008 12:33:03 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LBTg7-0007Aw-6A for qemu-devel@nongnu.org; Sat, 13 Dec 2008 12:33:03 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Sat, 13 Dec 2008 12:33:03 +0000 Subject: [Qemu-devel] [6008] target-i386: SVM: acknowledge interrupt only after it is taken Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 Signed-off-by: Aurelien Jarno 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 }