From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Date: Mon, 16 Jun 2008 15:52:18 +0000 Subject: Re: [RFC] kvm irq assignment Message-Id: <20080616155218.GA30371@dmt.cnet> List-Id: References: <51CFAB8CB6883745AE7B93B3E084EBE201CC9077@pdsmsx412.ccr.corp.intel.com> In-Reply-To: <51CFAB8CB6883745AE7B93B3E084EBE201CC9077@pdsmsx412.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ia64@vger.kernel.org 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;