Re: [RFC]RE: [PATCH] kvm-ia64 irq assignment 1/2 kernel

Marcelo Tosatti
2008-06-11T16:17:28Z

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.