From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51044 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pm1pQ-0003Hr-H8 for qemu-devel@nongnu.org; Sun, 06 Feb 2011 05:26:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pm1pP-0001RU-0Z for qemu-devel@nongnu.org; Sun, 06 Feb 2011 05:26:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pm1pO-0001Qo-Pg for qemu-devel@nongnu.org; Sun, 06 Feb 2011 05:26:46 -0500 Message-ID: <4D4E7760.2050601@redhat.com> Date: Sun, 06 Feb 2011 12:26:40 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] KVM: Windows 64-bit troubles with user space irqchip References: <4D496D77.2010405@siemens.com> <4D496FA6.8070301@siemens.com> <4D49738D.7080404@redhat.com> <4D4979BD.6080900@siemens.com> <20110202154611.GR14984@redhat.com> <4D497DAB.7010901@siemens.com> <4D4A64F2.8010309@redhat.com> <4D4A7629.1010506@siemens.com> <20110203100407.GA2449@amt.cnet> <4D4A7F4B.6050406@siemens.com> <20110203141537.GY14984@redhat.com> In-Reply-To: <20110203141537.GY14984@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov Cc: Jan Kiszka , Marcelo Tosatti , qemu-devel , kvm On 02/03/2011 04:15 PM, Gleb Natapov wrote: > > > > Maybe this is true for the in-kernel model, but I don't see the issue > > (anymore) for the way user space works. > > > With patch below I can boot Windows7. > > diff --git a/hw/apic.c b/hw/apic.c > index 146deca..fdcac88 100644 > --- a/hw/apic.c > +++ b/hw/apic.c > @@ -600,7 +600,7 @@ int apic_get_interrupt(DeviceState *d) > intno = get_highest_priority_int(s->irr); > if (intno< 0) > return -1; > - if (s->tpr&& intno<= s->tpr) > + if ((s->tpr>> 4)&& (intno>> 4)<= (s->tpr>> 4)) > return s->spurious_vec& 0xff; > reset_bit(s->irr, intno); > set_bit(s->isr, intno); That still allows interrupts that have higher priority than the TPR, but lower priority than interrupts in the ISR to be injected. I think we need to use the PPR here (same as apic_update_irq()). -- error compiling committee.c: too many arguments to function