diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c index 98c6550a36..9a2b1e7808 100644 --- a/xen/drivers/passthrough/iommu.c +++ b/xen/drivers/passthrough/iommu.c @@ -515,7 +515,7 @@ int iommu_do_domctl( { int ret = -ENODEV; - if ( !is_iommu_enabled(d) ) + if ( !(d ? is_iommu_enabled(d) : iommu_enabled) ) return -EOPNOTSUPP; #ifdef CONFIG_HAS_PCI