From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBTgJ-0000IQ-H8 for qemu-devel@nongnu.org; Sat, 13 Dec 2008 07:33:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBTgH-0000Gs-9g for qemu-devel@nongnu.org; Sat, 13 Dec 2008 07:33:14 -0500 Received: from [199.232.76.173] (port=36637 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBTgD-0000Gb-Sb for qemu-devel@nongnu.org; Sat, 13 Dec 2008 07:33:10 -0500 Received: from hall.aurel32.net ([88.191.82.174]:41103) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LBTgD-0001Ly-F9 for qemu-devel@nongnu.org; Sat, 13 Dec 2008 07:33:09 -0500 Received: from volta.aurel32.net ([2002:52e8:2fb:1:21e:8cff:feb0:693b]) by hall.aurel32.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1LBTgB-0001ue-RG for qemu-devel@nongnu.org; Sat, 13 Dec 2008 13:33:07 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1LBTgB-00077s-7L for qemu-devel@nongnu.org; Sat, 13 Dec 2008 13:33:07 +0100 Date: Sat, 13 Dec 2008 13:33:07 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] SVM: acknowledge interrupt only after it is taken Message-ID: <20081213123307.GF17729@volta.aurel32.net> References: <1229100521-12665-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1229100521-12665-1-git-send-email-agraf@suse.de> 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 On Fri, Dec 12, 2008 at 05:48:41PM +0100, Alexander Graf wrote: > 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. Thanks, applied. > --- > cpu-exec.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/cpu-exec.c b/cpu-exec.c > index 9a35a59..981ba86 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 > } > -- > 1.5.6 > > > > -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net