Skip to content

VFIO change for EEH support

Gavin Shan kvm linuxppc-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 24 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3VFIO: Architecture dependent VFIO device operationsdrivers/vfio/pci/vfio_pci.c include/linux/vfio.h+41 -80 replies
2/3VFIO: VFIO_DEVICE_SET_ADDR_MAPPING commandinclude/uapi/linux/vfio.h+16 -017 replies
3/3VFIO: Direct access config reg without capabilitydrivers/vfio/pci/vfio_pci_config.c+20 -117 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] VFIO change for EEH support

The EEH (Enhanced Error Handling) is one of RAS features on IBM Power machines. In order to support EEH, the VFIO needs some modification as the patchset addresses. Firstly, the address (domain:bus:slot:function) of passed PCI devices looks quite different from host and guest perspectives. So we have to mantain the address mapping in host so that the EEH could direct the EEH errors from guest to proper PCI device. Unfortunately, it seems that the VFIO implementation doesn't include the mechanism yet. On the other hand, it's totally business of individual platforms. So I introduced some weak functions in VFIO driver and individual platforms can override that to figure out more information that platform needs. Apart from that, the last patch [3/3] is changing the current behavior of accessing uncoverred config space for specific PCI device.

The patchset is expected to be applied after Alexy's patchset (supporting VFIO on PowerNV platform). Besides, there're patchset based on it queued in my personal tree for EEH core to support PowerKVM guest. With all of them (Alexy's patchset, this patchset, EEH core patchset), I can sucessfully pass PCI device to guest and recover it from EEH errors.

drivers/vfio/pci/vfio_pci.c        |   42 ++++++++++++++++++++++++++++++------
drivers/vfio/pci/vfio_pci_config.c |   31 +++++++++++++++++---------
include/linux/vfio.h               |    7 +++++-
include/uapi/linux/vfio.h          |   16 +++++++++++++
4 files changed, 77 insertions(+), 19 deletions(-)

Thanks,
Gavin