From: "Cédric Le Goater" <clg@kaod.org>
To: David Gibson <david@gibson.dropbear.id.au>,
Alex Williamson <alex.williamson@redhat.com>
Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org,
"Jason Wang" <jasowang@redhat.com>,
"Riku Voipio" <riku.voipio@iki.fi>,
"Laurent Vivier" <laurent@vivier.eu>,
groug@kaod.org, "Alexey Kardashevskiy" <aik@ozlabs.ru>,
qemu-ppc@nongnu.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
philmd@redhat.com
Subject: Re: [PATCH 4/5] spapr: Handle irq backend changes with VFIO PCI devices
Date: Thu, 21 Nov 2019 17:35:01 +0100 [thread overview]
Message-ID: <30d4fd1d-61f7-ebe2-a593-0917d187cab5@kaod.org> (raw)
In-Reply-To: <20191121005607.274347-5-david@gibson.dropbear.id.au>
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 <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>
> ---
> 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)
>
next prev parent reply other threads:[~2019-11-21 16:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-21 0:56 [PATCH 0/5] vfio/spapr: Handle changes of master irq chip for VFIO devices David Gibson
2019-11-21 0:56 ` [PATCH 1/5] kvm: Introduce KVM irqchip change notifier David Gibson
2019-11-21 0:56 ` [PATCH 2/5] vfio/pci: Split vfio_intx_update() David Gibson
2019-11-21 0:56 ` [PATCH 3/5] vfio/pci: Respond to KVM irqchip change notifier David Gibson
2019-11-22 5:12 ` Greg Kurz
2019-11-22 5:50 ` David Gibson
2019-11-21 0:56 ` [PATCH 4/5] spapr: Handle irq backend changes with VFIO PCI devices David Gibson
2019-11-21 16:35 ` Cédric Le Goater [this message]
2019-11-21 0:56 ` [PATCH 5/5] spapr: Work around spurious warnings from vfio INTx initialization David Gibson
2019-11-21 16:35 ` Cédric Le Goater
2019-11-21 16:57 ` [PATCH 0/5] vfio/spapr: Handle changes of master irq chip for VFIO devices Alex Williamson
2019-11-22 1:18 ` David Gibson
2019-11-22 1:28 ` Alex Williamson
2019-11-22 1:35 ` David Gibson
2019-11-22 6:09 ` Greg Kurz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30d4fd1d-61f7-ebe2-a593-0917d187cab5@kaod.org \
--to=clg@kaod.org \
--cc=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=laurent@vivier.eu \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=riku.voipio@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).