lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 13 Jun 2015 08:47:20 +0200
From:	Joerg Roedel <joro@...tes.org>
To:	iommu@...ts.linux-foundation.org
Cc:	David Woodhouse <dwmw2@...radead.org>, zhen-hual@...com,
	bhe@...hat.com, ddutile@...hat.com, alex.williamson@...hat.com,
	dyoung@...hat.com, linux-kernel@...r.kernel.org,
	jroedel@...tes.org, joro@...tes.org, Joerg Roedel <jroedel@...e.de>
Subject: [PATCH 12/19] iommu/vt-d: Enable Translation only if it was previously disabled

From: Joerg Roedel <jroedel@...e.de>

Do not touch the TE bit unless we know translation is
disabled.

Signed-off-by: Joerg Roedel <jroedel@...e.de>
---
 drivers/iommu/intel-iommu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index b47def6..ad72c6d 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -3184,7 +3184,9 @@ domains_done:
 		if (ret)
 			goto free_iommu;
 
-		iommu_enable_translation(iommu);
+		if (!translation_pre_enabled(iommu))
+			iommu_enable_translation(iommu);
+
 		iommu_disable_protect_mem_regions(iommu);
 	}
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ