aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_irq.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2019-09-30 15:54:00 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2019-11-26 10:11:30 +1100
commite532e1d93c4bd869b11db6ee0de2057e7d288889 (patch)
tree56cf4179ec237a48382dd9022d75e0f76bcc8b08 /hw/ppc/spapr_irq.c
parentc5478fea27ac47ed3b57e0489a49b62f36024763 (diff)
downloadqemu-e532e1d93c4bd869b11db6ee0de2057e7d288889.zip
qemu-e532e1d93c4bd869b11db6ee0de2057e7d288889.tar.gz
qemu-e532e1d93c4bd869b11db6ee0de2057e7d288889.tar.bz2
spapr: Handle irq backend changes with VFIO PCI devices
pseries machine type can have one of two different interrupt controllers in use depending on feature negotiation with the guest. Usually this is invisible to devices, because they route to a common set of qemu_irqs which in turn dispatch to the correct back end. VFIO passthrough devices, however, wire themselves up directly to the KVM irqchip for performance, which means they are affected by this change in interrupt controller. To get them to adjust correctly for the change in irqchip, we need to fire the kvm irqchip change notifier. Cc: Alex Williamson <alex.williamson@redhat.com> Cc: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Cédric Le Goater <clg@kaod.org> Tested-by: Alex Williamson <alex.williamson@redhat.com> Reviewed-by: Alex Williamson <alex.williamson@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Acked-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/ppc/spapr_irq.c')
-rw-r--r--hw/ppc/spapr_irq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c
index 168044b..1d27034 100644
--- a/hw/ppc/spapr_irq.c
+++ b/hw/ppc/spapr_irq.c
@@ -508,6 +508,12 @@ static void set_active_intc(SpaprMachineState *spapr,
}
spapr->active_intc = new_intc;
+
+ /*
+ * We've changed the kernel irqchip, let VFIO devices know they
+ * need to readjust.
+ */
+ kvm_irqchip_change_notify();
}
void spapr_irq_update_active_intc(SpaprMachineState *spapr)