vfio-pci/zdev: Improved zPCI Function Measurement Support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | s390/pci: Preserve FMB state in device re-enablementarch/ arch/ | +59 | 3 replies | |
| 2/3 | vfio-pci/zdev: Add VFIO FMB device featuredrivers/ drivers/ drivers/ +1 more | +131 | 0 replies | |
| 3/3 | s390/pci: Fence FMB enable/disable via sysfs for passthrough devicesarch/ | +3 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Niklas Schnelle |
|---|---|
| 1/3 | R-b |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v1 0/3] vfio-pci/zdev: Improved zPCI Function Measurement Support
Hi,
This patch series improves support for function measurement for zPCI passthrough devices on s390x.
Motivation
==========
The firmware on s390x machines allows for tracking a variety of statistics relating to zPCI devices in a function measurement block (FMB). However, the kernel currently lacks a structured mechanism of sharing this information with userspace, beyond /sys/kernel/debug/pci/ID/statistics. This can lead to shortcomings when running a guest on KVM with PCI passthrough devices, as QEMU is unable to provide an accurate FMB snapshot to the guest.
Proposal
========
We propose adding a new VFIO device feature to zPCI passthrough devices, allowing userspace programs to read the latest FMB snapshot as it is written by the firmware. We ensure that function measurement enablement is preserved across device resets on the host. Furthermore, we guard against host tampering with the FMB via sysfs when the zPCI device is in passthrough to protect the VM's state.
I'd appreciate some feedback on these patches.
Thanks in advance.
Omar Elghoul (3):
s390/pci: Preserve FMB state in device re-enablement vfio-pci/zdev: Add VFIO FMB device feature
s390/pci: Fence FMB enable/disable via sysfs for passthrough devices
arch/s390/include/asm/pci.h | 1 + arch/s390/pci/pci.c | 71 +++++++++++++++++++++++------ arch/s390/pci/pci_debug.c | 3 ++ drivers/vfio/pci/vfio_pci_core.c | 2 + drivers/vfio/pci/vfio_pci_priv.h | 9 ++++ drivers/vfio/pci/vfio_pci_zdev.c | 77 ++++++++++++++++++++++++++++++++ include/uapi/linux/vfio.h | 43 ++++++++++++++++++ 7 files changed, 193 insertions(+), 13 deletions(-)
Signature · 1 line
2.52.0