qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] vfio/spapr: Handle changes of master irq chip for VFIO devices
@ 2019-11-21  0:56 David Gibson
  2019-11-21  0:56 ` [PATCH 1/5] kvm: Introduce KVM irqchip change notifier David Gibson
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: David Gibson @ 2019-11-21  0:56 UTC (permalink / raw)
  To: Alex Williamson, clg
  Cc: kvm, qemu-devel, Jason Wang, Riku Voipio, Laurent Vivier, groug,
	qemu-ppc, Marc-André Lureau, Paolo Bonzini, philmd,
	David Gibson

Due to the way feature negotiation works in PAPR (which is a
paravirtualized platform), we can end up changing the global irq chip
at runtime, including it's KVM accelerate model.  That causes
complications for VFIO devices with INTx, which wire themselves up
directly to the KVM irqchip for performance.

This series introduces a new notifier to let VFIO devices (and
anything else that needs to in the future) know about changes to the
master irqchip.  It modifies VFIO to respond to the notifier,
reconnecting itself to the new KVM irqchip as necessary.

In particular this removes a misleading (though not wholly inaccurate)
warning that occurs when using VFIO devices on a pseries machine type
guest.

Open question: should this go into qemu-4.2 or wait until 5.0?  It's
has medium complexity / intrusiveness, but it *is* a bugfix that I
can't see a simpler way to fix.  It's effectively a regression from
qemu-4.0 to qemu-4.1 (because that introduced XIVE support by
default), although not from 4.1 to 4.2.

Changes since RFC:
 * Fixed some incorrect error paths pointed by aw in 3/5
 * 5/5 had some problems previously, but they have been obsoleted by
   other changes merged in the meantime

David Gibson (5):
  kvm: Introduce KVM irqchip change notifier
  vfio/pci: Split vfio_intx_update()
  vfio/pci: Respond to KVM irqchip change notifier
  spapr: Handle irq backend changes with VFIO PCI devices
  spapr: Work around spurious warnings from vfio INTx initialization

 accel/kvm/kvm-all.c    | 18 ++++++++++++
 accel/stubs/kvm-stub.c | 12 ++++++++
 hw/ppc/spapr_irq.c     | 17 +++++++++++-
 hw/vfio/pci.c          | 62 +++++++++++++++++++++++++++---------------
 hw/vfio/pci.h          |  1 +
 include/sysemu/kvm.h   |  5 ++++
 6 files changed, 92 insertions(+), 23 deletions(-)

-- 
2.23.0



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-11-22  6:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).