On Mon, Sep 20, 2021 at 10:24:40AM +0200, Igor Mammedov wrote:
> > +    if (pcms->virtio_iommu && x86_iommu_get_default()) {
> > +        error_report("QEMU does not support multiple vIOMMUs for x86 
> > yet.");
> > +        exit(EXIT_FAILURE);
> > +    }
> 
> previous patch does similar check, doesn't it?
> So is why it's not implement the same way?

The existing check for Intel and AMD IOMMUs is in x86_iommu_set_default(),
but virtio-iommu isn't an X86IOMMUState (because it already inherits
virtio object, and because X86IOMMUState is used for IRQ remapping which
isn't supported by virtio-iommu).

I'll move the check from X86IOMMUState into pre_plug to avoid the
duplication.

Thanks,
Jean


Reply via email to