On 9/4/2015 7:08 AM, Roger Pau Monne wrote:
Signed-off-by: Roger Pau Monné <roger....@citrix.com>
Acked-by: Andrew Cooper <andrew.coop...@citrix.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
Cc: Aravind Gopalakrishnan <aravind.gopalakrish...@amd.com>
---
Changes since v4:
- Add Andrew Cooper Acked-by.
---
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 e74f469..b4e75ac 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);
Acked-by: Aravind Gopalakrishnan <aravind.gopalakrish...@amd.com>
Thanks,
-Aravind.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel