The check of 's->pasid && x86_iommu->dt_supported' is an overkill,
because all emulated devices don't support PASID capability yet,
they never send Requests-with-PASID, no pasid tagged iotlb entries
are cached in the device. Even if guest send PASID-based-Device-TLB
invalidation request, we can ignore it safely.

Signed-off-by: Yi Sun <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
---
 hw/i386/intel_iommu.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 17252c804b..4ab50a9fd9 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -5490,17 +5490,6 @@ static void vtd_realize(DeviceState *dev, Error **errp)
     X86MachineState *x86ms = X86_MACHINE(ms);
     PCIBus *bus = pcms->pcibus;
     IntelIOMMUState *s = INTEL_IOMMU_DEVICE(dev);
-    X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(s);
-
-    if (s->pasid && x86_iommu->dt_supported) {
-        /*
-         * PASID-based-Device-TLB Invalidate Descriptor is not
-         * implemented and it requires support from vhost layer which
-         * needs to be implemented in the future.
-         */
-        error_setg(errp, "PASID based device IOTLB is not supported");
-        return;
-    }
 
     if (!vtd_decide_config(s, errp)) {
         return;
-- 
2.47.3


Reply via email to