From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [RFC]RE: [PATCH] kvm-ia64 irq assignment 1/2 kernel Date: Wed, 11 Jun 2008 13:16:52 -0300 Message-ID: <20080611161652.GA6835@dmt.cnet> References: <51CFAB8CB6883745AE7B93B3E084EBE201CC875F@pdsmsx412.ccr.corp.intel.com> <484996EE.8060600@qumranet.com> <51CFAB8CB6883745AE7B93B3E084EBE201CC8A14@pdsmsx412.ccr.corp.intel.com> <64146E7D-9E1E-4ED2-9682-14C05E1A9B0E@suse.de> <51CFAB8CB6883745AE7B93B3E084EBE201CC8A61@pdsmsx412.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Graf , Avi Kivity , Jes Sorensen , kvm@vger.kernel.org, kvm-ia64@vger.kernel.org To: "Xu, Anthony" Return-path: Received: from mx1.redhat.com ([66.187.233.31]:40662 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1762678AbYFKQR2 (ORCPT ); Wed, 11 Jun 2008 12:17:28 -0400 Content-Disposition: inline In-Reply-To: <51CFAB8CB6883745AE7B93B3E084EBE201CC8A61@pdsmsx412.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Jun 10, 2008 at 03:57:30PM +0800, Xu, Anthony wrote: > diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c > index a23a466..df0ea33 100644 > --- a/qemu/hw/pci.c > +++ b/qemu/hw/pci.c > @@ -548,7 +548,7 @@ static void pci_set_irq(void *opaque, int irq_num, > int level) > pci_dev = bus->parent_dev; > } > bus->irq_count[irq_num] += change; > - bus->set_irq(bus->irq_opaque, irq_num, bus->irq_count[irq_num] != > 0); > + bus->set_irq(bus->irq_opaque, irq_num, !(bus->irq_count[irq_num] != > 0)); > } Ideally this should detect if the PCI interrupts are active low or high and act accordingly (so that older BIOSes still work and no assumptions are made). Will probably have to be done anyway for merging into QEMU. One way of doing it would be to talk to ACPI via a new SystemIO region, but there must be an easier way.