[libvirt] [PATCH v4 0/5] PCI hostdev partial assignment support

Daniel Henrique Barboza danielhb413 at gmail.com
Mon Dec 16 23:24:56 UTC 2019



On 12/16/19 8:06 PM, Alex Williamson wrote:
> On Mon, 16 Dec 2019 17:28:28 -0500
> Cole Robinson <crobinso at redhat.com> wrote:
> 
>> On 12/16/19 8:36 AM, Daniel Henrique Barboza wrote:
>>> changes from version 3 [1]:
> 
> Thanks for catching this!  PCIe root ports or bridges being part of an
> IOMMU group is part of the nature of the grouping.  However, only
> endpoint devices can be bound to vfio-pci and thus participate in this
> "partial assignment".  If the code is trying to force all other devices
> in the IOMMU group that aren't assigned into this partial assignment
> mode, that's just fundamentally broken.  Thanks,

The code isn't forcing a device to be assigned to the guest. It is forcing
all the IOMMU devices to be declared in the domain XML to be detached from
the host.

What I did was to extend a verification Libvirt already does, to check for
PCI devices of the same IOMMU X being used by other domains, to check the
the host as well. Guest start fails if there is any device left in IOMMU X
that's not present in the domain.

In short, the code is implying that all IOMMU devices must be detached from
the host, regardless of whether they're going to be used in the guest,
regardless of whether they are PCI root ports or bridges. Is this assumption
correct, considering kernel/QEMU?


Thanks,


DHB



> 
> Alex
> 




More information about the libvir-list mailing list