From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jes Sorensen Date: Wed, 25 Mar 2009 16:36:59 +0000 Subject: [patch] hw/ipf.c build fix for kvm-userspace Message-Id: <49CA5DAB.10600@sgi.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------080908040109060106090301" List-Id: To: kvm-ia64@vger.kernel.org This is a multi-part message in MIME format. --------------080908040109060106090301 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Another build fix to get current kvm-userspace to build on ia64. Cheers, Jes --------------080908040109060106090301 Content-Type: text/x-patch; name="0002-qemu-ia64-ipf-build-fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0002-qemu-ia64-ipf-build-fix.patch" Provide dummy apic_set_irq_delivered() function and update call to kvm_set_irq() to add extra argument. Signed-off-by: Jes Sorensen --- qemu/hw/ipf.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) Index: kvm-userspace2.git/qemu/hw/ipf.c =================================================================== --- kvm-userspace2.git.orig/qemu/hw/ipf.c +++ kvm-userspace2.git/qemu/hw/ipf.c @@ -687,9 +687,15 @@ return irq; } +/* + * Dummy function to provide match for call from hw/apic.c + */ +void apic_set_irq_delivered(void) { +} + void ioapic_set_irq(void *opaque, int irq_num, int level) { - int vector; + int vector, pic_ret; PCIDevice *pci_dev = (PCIDevice *)opaque; vector = ioapic_map_irq(pci_dev->devfn, irq_num); @@ -700,7 +706,9 @@ ioapic_irq_count[vector] -= 1; if (kvm_enabled()) { - if (kvm_set_irq(vector, ioapic_irq_count[vector] == 0)) + if (kvm_set_irq(vector, ioapic_irq_count[vector] == 0, &pic_ret)) + if (pic_ret != 0) + apic_set_irq_delivered(); return; } } --------------080908040109060106090301--