vfio: quirks & tracing refactoring
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest17 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/17 | vfio/pci: Rename INTx functions for easier tracinghw/ trace-events | +31 | 0 replies | |
| 2/17 | vfio/pci: Rename MSI/X functions for easier tracinghw/ trace-events | +40 | 0 replies | |
| 3/17 | vfio/pci: Make interrupt bypass runtime configurablehw/ include/ | +12 | 0 replies | |
| 4/17 | vfio: Change polarity of our no-mmap optionhw/ hw/ hw/ +1 more | +4 | 0 replies | |
| 5/17 | vfio/pci: Extract PCI structures to a separate headerhw/ hw/ | +159 | 0 replies | |
| 6/17 | vfio/pci: Split quirks to a separate filehw/ hw/ hw/ +1 more | +908 | 0 replies | |
| 7/17 | vfio/pci: Cleanup ROM blacklist quirkhw/ hw/ trace-events | +28 | 0 replies | |
| 8/17 | vfio/pci: Foundation for new quirk structurehw/ hw/ | +157 | 0 replies | |
| 9/17 | vfio/pci: Cleanup ATI 0x3c3 quirkhw/ trace-events | +11 | 0 replies | |
| 10/17 | vfio/pci: Cleanup Nvidia 0x3d0 quirkhw/ trace-events | +111 | 0 replies | |
| 11/17 | vfio/pci: Rework RTL8168 quirkhw/ trace-events | +105 | 0 replies | |
| 12/17 | vfio/pci: Config window quirkshw/ trace-events | +276 | 0 replies | |
| 13/17 | vfio/pci: Config mirror quirkhw/ trace-events | +129 | 0 replies | |
| 14/17 | vfio/pci: Remove old config window and mirror quirkshw/ hw/ trace-events | +0 | 0 replies | |
| 15/17 | vfio/pci: Move AMD device specific reset to quirkshw/ hw/ hw/ +1 more | +177 | 0 replies | |
| 16/17 | vfio/pci: Cache vendor and device IDhw/ hw/ hw/ | +11 | 0 replies | |
| 17/17 | vfio/pci: Add emulated PCI IDshw/ hw/ hw/ +1 more | +63 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Qemu-devel] [PATCH 00/17] vfio: quirks & tracing refactoring
This series aims to do a few things:
- Improve tracing support in vfio, especially the ability to isolate tracing to various features, like INTx, MSI, MSI-X, quirks, specific quirks, etc. There's more to do here, but this is an improvement.
- Split quirks out of the core vfio-pci code. They're too large, they need to be separated.
- Make quirks more maintainable and extensible. In the past, I tried to make a common quirk interface but the commonality was pushed too high resulting in a shared data structure that didn't make sense for most of the users. This version still provides sufficient commonality for shared teardown, but doesn't impose a data struct on memory region ops.
- Make better use of MemoryRegions. We can use more than a single MemoryRegion for each quirk, simplifying the ops callbacks to handle the behavior of only a single register. For instance data and window registers can make use of two MemoryRegions.
- Eliminate target page size dependencies in quirks. Some of these must have been to work around bugs in previous generations of the memory API, some were just for convenience. We don't need to setup quirks on target page boundaries, that's the memory API's problem. We don't need to save bits and assume page alignment in the quirks, we're better off using structure specific to our quirk ops and trimming out unused features.
- Eliminate build-time debugging and tunables. Interrupt setup is slow path, so we're not saving anything by requiring a rebuild to not use the KVM interrupt path. Make these all experimental (aka unsupported) options that are available for debugging and tracing. Also fix the polarity of x-mmap and rename to x-no-mmap. Backend drivers shouldn't need to expose this unless they want the tracing ability and I've seen users specify it because mmap sounds like something they'd want.
Beyond the standard testing I've done, using a variety of devices and configurations that rely on the quirks, I've received testing feed back from several users on the vfio-users mailing list who have reported no regressions. Comments and review welcome. Thanks,
Alex
PS - this series applies on top of 2.4 + "vfio/pci: Cleanup RTL8168
quirk and tracing" + "vfio/pci: Cleanup vfio_early_setup_msix() error path". Both of these are in my local next branch but haven't been pushed for 2.5 yet.
---
Alex Williamson (17):
vfio/pci: Rename INTx functions for easier tracing vfio/pci: Rename MSI/X functions for easier tracing vfio/pci: Make interrupt bypass runtime configurable
vfio: Change polarity of our no-mmap option vfio/pci: Extract PCI structures to a separate header vfio/pci: Split quirks to a separate file vfio/pci: Cleanup ROM blacklist quirk vfio/pci: Foundation for new quirk structure vfio/pci: Cleanup ATI 0x3c3 quirk
vfio/pci: Cleanup Nvidia 0x3d0 quirk vfio/pci: Rework RTL8168 quirk
vfio/pci: Config window quirks
vfio/pci: Config mirror quirk
vfio/pci: Remove old config window and mirror quirks vfio/pci: Move AMD device specific reset to quirks vfio/pci: Cache vendor and device ID vfio/pci: Add emulated PCI IDs
hw/vfio/Makefile.objs | 2 hw/vfio/common.c | 2 hw/vfio/pci-quirks.c | 1204 ++++++++++++++++++++++++++++++++++++ hw/vfio/pci.c | 1385 ++++------------------------------------- hw/vfio/pci.h | 159 +++++ hw/vfio/platform.c | 2 include/hw/vfio/vfio-common.h | 7 trace-events | 85 +-- 8 files changed, 1546 insertions(+), 1300 deletions(-) create mode 100644 hw/vfio/pci-quirks.c create mode 100644 hw/vfio/pci.h