Skip to content

vfio: virtualize INTX_DISABLE

Alex Williamson kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2vfio: Fix config space virtualizationdrivers/vfio/vfio_pci_config.c+29 -890 replies
2/2vfio: Virtualize PCI_COMMAND_INTX_DISABLEdrivers/vfio/vfio_intrs.c drivers/vfio/vfio_main.c drivers/vfio/vfio_pci_config.c +1 more+55 -140 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/2] vfio: virtualize INTX_DISABLE

Tom,

Since we use INTX_DISABLE internally for PCI 2.3 devices, it's probably not a good idea to allow vfio users direct access to it. In trying to virtualize it, I stumbled on some config space virtualization issues. I think we want vconfig and the value written to hardware to be different when there are virtualized bits, but we lump them together. I think this is why I've never been able to rely on the memory enable bit of config space through vfio. With this first patch, all virtualized bits that are writable are sticky in vconfig. Non-writable bits come from either the old value or the physical hardware depending on whether it's virtualized. This means we can get rid of a lot of duplicated setting and reading of vconfig, and only add code for more complicated behaviors. This is tricky code, to please double check that I'm not doing something stupid. Thanks,

Alex

---

Alex Williamson (2):
vfio: Virtualize PCI_COMMAND_INTX_DISABLE
vfio: Fix config space virtualization

 drivers/vfio/vfio_intrs.c      |   38 ++++++++----
 drivers/vfio/vfio_main.c       |   14 ++++
 drivers/vfio/vfio_pci_config.c |  131 ++++++++++++----------------------------
 include/linux/vfio.h           |    4 +
 4 files changed, 84 insertions(+), 103 deletions(-)