qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-4.0 0/2] spapr: Fix extended config space accesses
@ 2019-04-01 17:54 Greg Kurz
  2019-04-01 17:55 ` [Qemu-devel] [PATCH for-4.0 1/2] pci: Allow PCI bus subtypes to support " Greg Kurz
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Greg Kurz @ 2019-04-01 17:54 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-ppc, David Gibson, Alex Williamson, Marcel Apfelbaum,
	Cédric Le Goater

Recent commit c2077e2ca0da7 added stricter checks that now prevent
a guest to access the extended config space of a PCIe device connected
attached to a PHB on a pseries machine.

PAPR compatible PHBs act like legacy PCI busses, but they do allow access
to the full 4k config space of PCIe devices. As discussed several times on
the list ([1] and [2]), we cannot really change PAPR PHB to have a true
PCIe root bus since it would call for massive and unwanted changes in
libvirt.

This series tries to address the issue with a new PCI bus class method
that tells if the PCI bus supports extended config space accesses,
instead of relying on pci_bus_is_express() which wants a PCIe root bus.
A new legacy PCI bus type is added to implement the PAPR behaviour.

Note that this fixes a potential 4.0 regression, hence the for-4.0 tag.

[1] https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg07377.html
    https://lists.gnu.org/archive/html/qemu-devel/2016-11/msg02839.html

[2] https://lists.gnu.org/archive/html/qemu-ppc/2017-01/msg00034.html

--
Greg

---

Greg Kurz (2):
      pci: Allow PCI bus subtypes to support extended config space accesses
      spapr_pci: Fix extended config space accesses


 hw/pci/pci.c             |   24 ++++++++++++++++++++++++
 hw/pci/pci_host.c        |    2 +-
 hw/ppc/spapr_pci.c       |   26 +++++++++++++++++++++++++-
 include/hw/pci/pci.h     |    2 ++
 include/hw/pci/pci_bus.h |    1 +
 5 files changed, 53 insertions(+), 2 deletions(-)

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

end of thread, other threads:[~2019-04-08  4:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-01 17:54 [Qemu-devel] [PATCH for-4.0 0/2] spapr: Fix extended config space accesses Greg Kurz
2019-04-01 17:55 ` [Qemu-devel] [PATCH for-4.0 1/2] pci: Allow PCI bus subtypes to support " Greg Kurz
2019-04-01 17:55 ` [Qemu-devel] [PATCH for-4.0 2/2] spapr_pci: Fix " Greg Kurz
2019-04-01 19:25 ` [Qemu-devel] [PATCH for-4.0 0/2] spapr: " Alex Williamson
2019-04-01 22:52 ` David Gibson
2019-04-08  3:50   ` [Qemu-devel] [Qemu-ppc] " David Gibson
2019-04-08  3:50     ` David Gibson

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