From: Wei Wang Subject: [PATCH] amd iommu: Remove redundant checks from iommu emulation code path Date: Tue, 7 Feb 2012 12:51:43 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: JBeulich@suse.com, keir@xen.org, Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Wei Wang # Date 1328609973 -3600 # Node ID cbd3c18e8ffe86bf7378303068e23b52795e5d94 # Parent 3432abcf9380d3840ca38439a304f74a37d155fc amd iommu: Remove redundant checks from iommu emulation code path signed-off-by: Wei Wang diff -r 3432abcf9380 -r cbd3c18e8ffe xen/drivers/passthrough/amd/iommu_guest.c --- a/xen/drivers/passthrough/amd/iommu_guest.c Thu Feb 02 15:47:26 2012 +0000 +++ b/xen/drivers/passthrough/amd/iommu_guest.c Tue Feb 07 11:19:33 2012 +0100 @@ -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;