On Wed, Oct 12, 2022 at 12:34:48PM -0400, Eric Auger wrote: > In theory the virtio-iommu-pci could be plugged anywhere in the PCIe > topology and as long as the dt/acpi info are properly built this should > work. However at the moment we fail to do that because the > virtio-iommu-pci BDF is not computed at plug time and in that case > vms->virtio_iommu_bdf gets an incorrect value. > > For instance if the virtio-iommu-pci is plugged onto a pcie root port > and the virtio-iommu protects a virtio-block-pci device the guest does > not boot. > > So let's do not pretend we do support this case and fail the initialize() > if we detect the virtio-iommu-pci is plugged anywhere else than on the > root bus. Anyway this ability is not needed. > > Signed-off-by: Eric Auger <eric.au...@redhat.com> > --- > hw/virtio/virtio-iommu-pci.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-)
FYI libvirt will already reject any attempts to place the device anywhere but directly on pcie.0, so from our point of view merging this patch is perfectly fine. -- Andrea Bolognani / Red Hat / Virtualization