This is the QEMU compliment to the vfio kernel capability chain series. This is RFC since it depends on those non-upstream kernel changes. Patch 1/ will be posted separately, it's somewhat unrelated, but is in my build tree so I include it here for anyone that wants to build this series.
This series includes sparse mmap support for avoiding mmaps over the MSI-X vector table and device specific memory regions for IGD OpRegion support. MemoryRegions are significantly generalize for the former, to make it really easy for each vfio region to be backed by none or more mmap MemoryRegion. The MSI-X vector table then either adds an mmap region, or not via a legacy quirk or explicit sparse mmap support. IGD OpRegions are exposed as new device specific region, which simply entails searching regions past those known for matching type and sub-type regions that we know how to handle. Writes to the OpRegion register (ASL storage) pop the host OpRegion into VM system memory. This isn't exactly like how real hardware works, but it makes for a convenient implementation. Alternatively we could pass the entire OpRegion table via fw_cfg, but this makes write through to the host impossible (if that's even useful). This is certainly something that I'm looking for comments about in this series. Thanks, Alex --- Alex Williamson (7): vfio: Add sysfsdev property for pci & platform vfio: Wrap VFIO_DEVICE_GET_REGION_INFO vfio: Generalize region support vfio/pci: Convert all MemoryRegion to dynamic alloc and consistent functions linux-headers/vfio: Update for proposed capabilities list vfio: Enable sparse mmap capability vfio/pci: Find and expose Intel IGD OpRegion hw/arm/sysbus-fdt.c | 2 hw/vfio/common.c | 249 +++++++++++++++++-- hw/vfio/pci-quirks.c | 62 ++--- hw/vfio/pci.c | 535 ++++++++++++++++++++++------------------- hw/vfio/pci.h | 11 - hw/vfio/platform.c | 126 +++------- include/hw/vfio/vfio-common.h | 29 ++ linux-headers/linux/vfio.h | 98 +++++++- trace-events | 12 + 9 files changed, 719 insertions(+), 405 deletions(-)