[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] spapr: Handle irq backend changes with VFIO PCI devices
From: |
Cédric Le Goater |
Subject: |
Re: [PATCH 4/5] spapr: Handle irq backend changes with VFIO PCI devices |
Date: |
Thu, 21 Nov 2019 17:35:01 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
On 21/11/2019 01:56, David Gibson wrote:
> 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 <address@hidden>
> Cc: Alexey Kardashevskiy <address@hidden>
>
> Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
> ---
> hw/ppc/spapr_irq.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c
> index 168044be85..1d27034962 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)
>
- [PATCH 0/5] vfio/spapr: Handle changes of master irq chip for VFIO devices, David Gibson, 2019/11/20
- [PATCH 3/5] vfio/pci: Respond to KVM irqchip change notifier, David Gibson, 2019/11/20
- [PATCH 5/5] spapr: Work around spurious warnings from vfio INTx initialization, David Gibson, 2019/11/20
- [PATCH 1/5] kvm: Introduce KVM irqchip change notifier, David Gibson, 2019/11/20
- [PATCH 4/5] spapr: Handle irq backend changes with VFIO PCI devices, David Gibson, 2019/11/20
- Re: [PATCH 4/5] spapr: Handle irq backend changes with VFIO PCI devices,
Cédric Le Goater <=
- [PATCH 2/5] vfio/pci: Split vfio_intx_update(), David Gibson, 2019/11/20
- Re: [PATCH 0/5] vfio/spapr: Handle changes of master irq chip for VFIO devices, Alex Williamson, 2019/11/21
- Re: [PATCH 0/5] vfio/spapr: Handle changes of master irq chip for VFIO devices, Greg Kurz, 2019/11/22