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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 24 Nov 2008 11:53:27 -0800
From:	Fenghua Yu <fenghua.yu@...el.com>
To:	Avi Kivity <avi@...hat.com>, David Woodhouse <dwmw2@...radead.org>,
	Ingo Molnar <mingo@...e.hu>,
	"Luck, Tony" <tony.luck@...el.com>,
	Jesse Barnes <jbarnes@...tuousgeek.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	"linux-ia64@...r.kernel.org" <linux-ia64@...r.kernel.org>,
	iommu@...ts.linux-foundation.org, kvm@...r.kernel.org
Subject: [PATCH 2/2] Enable Pass Through Feature in Intel IOMMU 

The patch set adds kernel parameter intel_iommu=pt to set up pass through mode in
context mapping entry. This disables DMAR in linux kernel; but KVM still runs on
VT-d. In this mode, kernel uses swiotlb for DMA API functions but other VT-d
functionalities are enabled for KVM. By default, pass though mode is disabled in
kernel.

This second patch changes context mapping interface called in KVM vtd.c. KVM
always uses multi level translation page table in VT-d.


Signed-off-by: Fenghua Yu <fenghua.yu@...el.com>
Signed-off-by: Weidong Han <weidong.han@...el.com>
Signed-off-by: Allen Kay <allen.m.kay@...el.com>
Signed-off-by: David Woodhouse <david.woodhouse@...el.com>

---

 vtd.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff --git a/virt/kvm/vtd.c b/virt/kvm/vtd.c
index a770874..7b753d7 100644
--- a/virt/kvm/vtd.c
+++ b/virt/kvm/vtd.c
@@ -124,7 +124,7 @@ int kvm_iommu_map_guest(struct kvm *kvm,
 			       pdev->bus->number, pdev->devfn);
 
 	r = intel_iommu_context_mapping(kvm->arch.intel_iommu_domain,
-					pdev);
+					pdev, CONTEXT_TT_MULTI_LEVEL);
 	if (r) {
 		printk(KERN_ERR "Domain context map for %s failed",
 		       pci_name(pdev));
--
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