From patchwork Thu Feb 3 14:15:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 529581 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p13EFn41016569 for ; Thu, 3 Feb 2011 14:15:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932207Ab1BCOPo (ORCPT ); Thu, 3 Feb 2011 09:15:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13270 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932208Ab1BCOPn (ORCPT ); Thu, 3 Feb 2011 09:15:43 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p13EFdxO014684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 3 Feb 2011 09:15:39 -0500 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p13EFc6H020441; Thu, 3 Feb 2011 09:15:38 -0500 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id 9E9BE18D3E9; Thu, 3 Feb 2011 16:15:37 +0200 (IST) Date: Thu, 3 Feb 2011 16:15:37 +0200 From: Gleb Natapov To: Jan Kiszka Cc: Marcelo Tosatti , Avi Kivity , kvm , qemu-devel Subject: Re: [Qemu-devel] KVM: Windows 64-bit troubles with user space irqchip Message-ID: <20110203141537.GY14984@redhat.com> 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4D4A7F4B.6050406@siemens.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 03 Feb 2011 14:15:49 +0000 (UTC) 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);