From 7ee5a150fc508785070087fc0ddcfc2f9771ea89 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roger=20Pau=20Monn=C3=A9?= Date: Tue, 10 Nov 2015 12:05:35 +0100 Subject: [PATCH] x86: allow disabling the emulated IOMMU MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roger Pau Monné Acked-by: Andrew Cooper Acked-by: Aravind Gopalakrishnan --- xen/drivers/passthrough/amd/iommu_guest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/amd/iommu_guest.c b/xen/drivers/passthrough/amd/iommu_guest.c index e74f4692f4..b4e75ac565 100644 --- a/xen/drivers/passthrough/amd/iommu_guest.c +++ b/xen/drivers/passthrough/amd/iommu_guest.c @@ -887,7 +887,8 @@ int guest_iommu_init(struct domain* d) struct guest_iommu *iommu; struct hvm_iommu *hd = domain_hvm_iommu(d); - if ( !is_hvm_domain(d) || !iommu_enabled || !iommuv2_enabled ) + if ( !is_hvm_domain(d) || !iommu_enabled || !iommuv2_enabled || + !has_viommu(d) ) return 0; iommu = xzalloc(struct guest_iommu); -- 2.39.5