[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 00/17] vfio: quirks & tracing refactoring
From: |
Alex Williamson |
Subject: |
[Qemu-devel] [PATCH 00/17] vfio: quirks & tracing refactoring |
Date: |
Wed, 09 Sep 2015 12:29:38 -0600 |
User-agent: |
StGit/0.17.1-dirty |
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
- [Qemu-devel] [PATCH 00/17] vfio: quirks & tracing refactoring,
Alex Williamson <=
- [Qemu-devel] [PATCH 01/17] vfio/pci: Rename INTx functions for easier tracing, Alex Williamson, 2015/09/09
- [Qemu-devel] [PATCH 02/17] vfio/pci: Rename MSI/X functions for easier tracing, Alex Williamson, 2015/09/09
- [Qemu-devel] [PATCH 03/17] vfio/pci: Make interrupt bypass runtime configurable, Alex Williamson, 2015/09/09
- [Qemu-devel] [PATCH 04/17] vfio: Change polarity of our no-mmap option, Alex Williamson, 2015/09/09
- [Qemu-devel] [PATCH 05/17] vfio/pci: Extract PCI structures to a separate header, Alex Williamson, 2015/09/09
- [Qemu-devel] [PATCH 07/17] vfio/pci: Cleanup ROM blacklist quirk, Alex Williamson, 2015/09/09
- [Qemu-devel] [PATCH 06/17] vfio/pci: Split quirks to a separate file, Alex Williamson, 2015/09/09
- [Qemu-devel] [PATCH 08/17] vfio/pci: Foundation for new quirk structure, Alex Williamson, 2015/09/09
- [Qemu-devel] [PATCH 09/17] vfio/pci: Cleanup ATI 0x3c3 quirk, Alex Williamson, 2015/09/09
- [Qemu-devel] [PATCH 10/17] vfio/pci: Cleanup Nvidia 0x3d0 quirk, Alex Williamson, 2015/09/09