qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] pci/iommu: Fail early if vfio-pci detected before vIOMMU
@ 2021-10-21 10:42 Peter Xu
  2021-10-21 10:42 ` [PATCH 1/8] pci: Define pci_bus_dev_fn type Peter Xu
                   ` (7 more replies)
  0 siblings, 8 replies; 44+ messages in thread
From: Peter Xu @ 2021-10-21 10:42 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Daniel P . Berrange, Eduardo Habkost,
	Michael S . Tsirkin, Jason Wang, David Hildenbrand,
	Markus Armbruster, peterx, Shannon Zhao, Alex Williamson,
	Paolo Bonzini, Igor Mammedov, Eric Auger, David Gibson

This series overrides one previous patchset:

https://lore.kernel.org/qemu-devel/20210818194217.110451-1-peterx@redhat.com/

I started from v1 because obviously it's completely different way of doing the
same thing, hence versioning upon it would be weird.

Patches 1-7 are majorly cleanups for current pci code to finally provide a
clean way to loop over all the pci devices on the system.

Patch 8 uses the last helper pci_for_each_device_all() to loop over all the
devices during x86 vIOMMU realize() function to fail early if e.g. vfio-pci
devices are detected.  Although this is not exactly what Igor suggested but it
should be mostly the same approach, so I kept the Suggested-by credit.

Please review, thanks.

Peter Xu (8):
  pci: Define pci_bus_dev_fn type
  pci: Export pci_for_each_device_under_bus*()
  pci: Use pci_for_each_device_under_bus*()
  pci: Define pci_bus_fn/pci_bus_ret_fn type
  pci: Add pci_for_each_root_bus()
  pci: Use pci_for_each_root_bus() in current code
  pci: Add pci_for_each_device_all()
  x86-iommu: Fail early if vIOMMU specified after vfio-pci

 hw/arm/virt-acpi-build.c   | 31 ++++++---------
 hw/i386/acpi-build.c       | 39 +++++--------------
 hw/i386/x86-iommu.c        | 18 +++++++++
 hw/pci/pci.c               | 77 +++++++++++++++++++++++++++++---------
 hw/pci/pcie.c              |  4 +-
 hw/ppc/spapr_pci.c         | 12 +++---
 hw/ppc/spapr_pci_nvlink2.c |  7 ++--
 hw/ppc/spapr_pci_vfio.c    |  4 +-
 hw/s390x/s390-pci-bus.c    |  5 +--
 hw/xen/xen_pt.c            |  4 +-
 include/hw/pci/pci.h       | 28 +++++++++-----
 11 files changed, 132 insertions(+), 97 deletions(-)

-- 
2.32.0




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

end of thread, other threads:[~2021-10-28  3:43 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 10:42 [PATCH 0/8] pci/iommu: Fail early if vfio-pci detected before vIOMMU Peter Xu
2021-10-21 10:42 ` [PATCH 1/8] pci: Define pci_bus_dev_fn type Peter Xu
2021-10-21 10:53   ` David Hildenbrand
2021-10-21 11:15   ` Eric Auger
2021-10-22  2:16     ` Peter Xu
2021-10-21 11:36   ` Philippe Mathieu-Daudé
2021-10-21 10:42 ` [PATCH 2/8] pci: Export pci_for_each_device_under_bus*() Peter Xu
2021-10-21 10:54   ` David Hildenbrand
2021-10-21 11:32   ` Eric Auger
2021-10-21 11:39   ` Philippe Mathieu-Daudé
2021-10-21 10:42 ` [PATCH 3/8] pci: Use pci_for_each_device_under_bus*() Peter Xu
2021-10-21 10:56   ` David Hildenbrand
2021-10-21 11:34   ` Eric Auger
2021-10-22  2:19     ` Peter Xu
2021-10-21 10:42 ` [PATCH 4/8] pci: Define pci_bus_fn/pci_bus_ret_fn type Peter Xu
2021-10-21 10:57   ` David Hildenbrand
2021-10-21 11:37   ` Eric Auger
2021-10-21 11:44   ` Philippe Mathieu-Daudé
2021-10-21 12:54     ` Philippe Mathieu-Daudé
2021-10-22  2:24       ` Peter Xu
2021-10-21 10:42 ` [PATCH 5/8] pci: Add pci_for_each_root_bus() Peter Xu
2021-10-21 11:00   ` David Hildenbrand
2021-10-21 12:22   ` Eric Auger
2021-10-25 13:16   ` Michael S. Tsirkin
2021-10-28  2:56     ` Peter Xu
2021-10-21 10:42 ` [PATCH 6/8] pci: Use pci_for_each_root_bus() in current code Peter Xu
2021-10-21 11:06   ` David Hildenbrand
2021-10-21 12:28   ` Eric Auger
2021-10-21 10:42 ` [PATCH 7/8] pci: Add pci_for_each_device_all() Peter Xu
2021-10-21 10:54   ` Michael S. Tsirkin
2021-10-22  2:33     ` Peter Xu
2021-10-22  8:43       ` Michael S. Tsirkin
2021-10-25 12:57         ` Peter Xu
2021-10-25 13:13           ` Michael S. Tsirkin
2021-10-21 10:42 ` [PATCH 8/8] x86-iommu: Fail early if vIOMMU specified after vfio-pci Peter Xu
2021-10-21 10:49   ` Michael S. Tsirkin
2021-10-21 12:38   ` Eric Auger
2021-10-22  2:37     ` Peter Xu
2021-10-21 22:30   ` Alex Williamson
2021-10-22  2:14     ` Peter Xu
2021-10-26 15:11       ` Igor Mammedov
2021-10-26 15:38         ` Alex Williamson
2021-10-27  8:30         ` Peter Xu
2021-10-28  2:30           ` Peter Xu

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