qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [PATCHv3 0/7] Allow EEH on spapr-pci-host-bridge devices


From: David Gibson
Subject: [Qemu-ppc] [PATCHv3 0/7] Allow EEH on spapr-pci-host-bridge devices
Date: Tue, 8 Mar 2016 13:10:22 +1100

For historical reasons, the spapr machine type has two PCI host bridge
implementations: spapr-pci-host-bridge, and
spapr-vfio-pci-host-bridge.  The latter was (duh) designed for VFIO
devices, but later reworks mean it's not necessary for that, and VFIO
can be used on the regular host bridge.

The only remaining difference is that EEH (Enhanced Error Handling -
IBM's interface with similar purpose to AER) is only supported on the
spapr-vfio-pci-host-bridge device.

This series corrects this, allowing EEH operations on the regular host
bridge.  That allows the special VFIO host bridge (we leave a stub,
for backwards compatibility).

EEH is only supported for VFIO devices, for the time being, and due to
bugs in the kernel implementation, it is only usable when the host
bridge only has devices from a single (host-side) IOMMU group
("Partitionable Endpoint", in IBM terminology).  That's an annoying
limitation which we hope to lift someday, but it's no worse than now,
since the spapr-vfio-pci-host-bridge only permits devices from a
single IOMMU group in any case (although it doesn't properly enforce
that).

I wrote these a while back, and I'm not sure why they got sidelined -
I suspect I was looking for testing from Gavin Shan, not realising
then that he was no longer working on EEH.  In any case, I'm hoping we
can squeeze this change into 2.6, so we don't need to carry the broken
spapr-vfio-pci-host-bridge device any longer.

This series applies on top of a merge of my current ppc-for-2.6 tree
and Alex Williamson's "[PATCH 0/6] vfio: Prep for vGPU & IGD" series.

Alex,

You've indicated that once your concerns on the last version were
addressed, you're ok with me taking the vfio patches through my tree.
Assuming you're happy with this revision, can I please get an
Acked-by.

Changes since v2:
  * Revised some comments and error messages to be more accurate and
    informative.
  * Don't use an assert() in vfio_eeh_as_op(), instead return -ENODEV
    if the AS isn't suitable for VFIO.
  
Changes since v1:
  * Don't consider containers with no groups as being able to support
    EEH, which is a safer option
  * To avoid build problems on non-Linux hosts, I no longer merge most
    of the code into spapr_pci.c, instead leaving it in helpers in
    spapr_pci_vfio.c, just no longer part of its own special device
    type (this approach suggested by Alexey Kardashevskiy).

David Gibson (7):
  vfio: Start improving VFIO/EEH interface
  spapr_pci: Switch to vfio_eeh_as_op() interface
  spapr_pci: Eliminate class callbacks
  spapr_pci: Allow EEH on spapr-pci-host-bridge
  spapr_pci: (Mostly) remove spapr-pci-vfio-host-bridge
  spapr_pci: Remove finish_realize hook
  vfio: Eliminate vfio_container_ioctl()

 hw/ppc/spapr_pci.c          |  63 +++++++--------------
 hw/ppc/spapr_pci_vfio.c     | 131 +++++++++++++++-----------------------------
 hw/vfio/common.c            | 112 ++++++++++++++++++++++++++-----------
 include/hw/pci-host/spapr.h |  64 +++++++++++++---------
 include/hw/vfio/vfio.h      |   4 +-
 5 files changed, 184 insertions(+), 190 deletions(-)

-- 
2.5.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]