From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [RFC] kvm irq assignment Date: Mon, 16 Jun 2008 12:52:18 -0300 Message-ID: <20080616155218.GA30371@dmt.cnet> References: <51CFAB8CB6883745AE7B93B3E084EBE201CC9077@pdsmsx412.ccr.corp.intel.com> <48517616.1050607@qumranet.com> <51CFAB8CB6883745AE7B93B3E084EBE201CC9210@pdsmsx412.ccr.corp.intel.com> <20080614233201.GA24715@dmt.cnet> <51CFAB8CB6883745AE7B93B3E084EBE201D2BF59@pdsmsx412.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Alexander Graf , 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]:44242 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753142AbYFPPyv (ORCPT ); Mon, 16 Jun 2008 11:54:51 -0400 Content-Disposition: inline In-Reply-To: <51CFAB8CB6883745AE7B93B3E084EBE201D2BF59@pdsmsx412.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Jun 16, 2008 at 01:31:21PM +0800, Xu, Anthony wrote: > >> I think you should avoid any changes to pci.c. Perhaps create a new > >> ioapic_and_pic_map / ioapic_and_pic_set pair of functions and change > >> pc.c to use that instead of piix_set_irq. > > I'll consider how to do this > > > > But pci.c includes below code section, which implements irq_num mapping > through interrupt link, While ioapic_set_irq doesn't > need this modification. > Seems, it's unavoidable to modify pci.c Just do a dummy mapping function? int ioapic_pic_map_irq(PCIDevice *dev, int irq_num) { return irq_num; } > Thanks, > Anthony > > > > pci_dev->irq_state[irq_num] = level; > for (;;) { > bus = pci_dev->bus; > irq_num = bus->map_irq(pci_dev, irq_num); > if (bus->set_irq) > break; > pci_dev = bus->parent_dev;