[vfio-users] Passthrough for non-DMA-masters on x86

Micah Morton mortonm at chromium.org
Fri Apr 17 16:34:49 UTC 2020


Hi Alex,

I've been looking at device passthrough for platform devices on x86
that are not behind an IOMMU by virtue of not being DMA masters. I
think on some level this is an explicit non-goal of VFIO
(https://www.spinics.net/lists/linux-renesas-soc/msg26153.html ,
https://blog.linuxplumbersconf.org/2014/wp-content/uploads/2014/10/LPC2014_IOMMU.txt)?
>From my understanding VFIO is mostly about IOMMU management. I have a
few questions however:

1) Are interrupt forwarding, IOMMU mgmt, and PCI config space
virtualization the main 3 things that VFIO does (plus some hacks to
get GPUs working in guests)? Would you add any other aspects of VFIO
that I'm missing?

2) If you can forward interrupts to a guest without VFIO (say with
something like this patch:
https://www.spinics.net/lists/kvm/msg207949.html), then it should be
pretty simple to configure the VMM to make the MMIO regions of the
platform device available to the guest. Is VFIO in the loop at all for
actually giving the guest access to the MMIOs or is that just done by
mappings in the VMM?

*I don't think I care about VFIO virtualizing PCI BARs for the guest
since I would be telling the guest about the platform devices through
ACPI -- so the guest wouldn't be looking to the PCI config space for
that info anyway. I guess one thing to worry about here would be any
dependencies the assigned platform device has on any other platform
devices in the system that don't get assigned to the guest.

3) Are PCI devices always DMA masters, or at least are they always put
in an IOMMU group? Have you seen cases of PCI devices that were not
assignable to a guest through vfio-pci because they weren't in an
IOMMU group and/or weren't DMA masters?

Thanks!
Micah





More information about the vfio-users mailing list