Skip to contentSkip to conversation

amd iommu: Remove redundant checks from iommu emulation code path

PATCH New Wei Wang 1 participant 1 message Feb 7, 2012

lore
Share & tools
lore

Wei Wang

author
#0 lore raw

PATCH 1/1 amd iommu: Remove redundant checks from iommu emulation code path

# HG changeset patch
# User Wei Wang <[email protected]>
# Date 1328609973 -3600
# Node ID cbd3c18e8ffe86bf7378303068e23b52795e5d94
# Parent 3432abcf9380d3840ca38439a304f74a37d155fc
amd iommu: Remove redundant checks from iommu emulation code path

xen/drivers/passthrough/amd/iommu_guest.c +0 -6
diff -r 3432abcf9380 -r cbd3c18e8ffe xen/drivers/passthrough/amd/iommu_guest.c
@@ -805,9 +805,6 @@ int guest_iommu_set_base(struct domain *
     p2m_type_t t;
     struct guest_iommu *iommu = domain_iommu(d);
 
-    if ( !is_hvm_domain(d) || !iommu_enabled || !iommuv2_enabled )
-        return 0;
-
     if ( !iommu )
         return -EACCES;
 
@@ -896,9 +893,6 @@ void guest_iommu_destroy(struct domain *
 {
     struct guest_iommu *iommu;
 
-    if ( !is_hvm_domain(d) || !iommu_enabled || !iommuv2_enabled )
-        return;
-
     iommu = domain_iommu(d);
     if ( !iommu )
         return;