All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] Enable Pass Through Feature in Intel IOMMU
       [not found]     ` <1224236501.6770.1256.camel@macbook.infradead.org>
  2008-11-24 19:53         ` Fenghua Yu
@ 2008-11-24 19:53         ` Fenghua Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Fenghua Yu @ 2008-11-24 19:53 UTC (permalink / raw)
  To: Avi Kivity, David Woodhouse, Ingo Molnar, Luck, Tony,
	Jesse Barnes, Andrew Morton, Linus Torvalds
  Cc: LKML, linux-ia64@vger.kernel.org, iommu, kvm

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@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: David Woodhouse <david.woodhouse@intel.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));

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] Enable Pass Through Feature in Intel IOMMU
@ 2008-11-24 19:53         ` Fenghua Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Fenghua Yu @ 2008-11-24 19:53 UTC (permalink / raw)
  To: Avi Kivity, David Woodhouse, Ingo Molnar, Luck, Tony,
	Jesse Barnes, Andrew Morton, Linus Torvalds
  Cc: LKML, linux-ia64@vger.kernel.org, iommu, kvm

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@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: David Woodhouse <david.woodhouse@intel.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));

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] Enable Pass Through Feature in Intel IOMMU
@ 2008-11-24 19:53         ` Fenghua Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Fenghua Yu @ 2008-11-24 19:53 UTC (permalink / raw)
  To: Avi Kivity, David Woodhouse, Ingo Molnar, Luck, Tony,
	Jesse Barnes, Andrew 
  Cc: LKML, linux-ia64@vger.kernel.org, iommu, kvm

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@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: David Woodhouse <david.woodhouse@intel.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));

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-24 19:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <A6AD88C3F2289247BE726C37303E1EB884780E2A@orsmsx505.amr.corp.intel.com>
     [not found] ` <48F62C0E.2060705@redhat.com>
     [not found]   ` <A6AD88C3F2289247BE726C37303E1EB884876541@orsmsx505.amr.corp.intel.com>
     [not found]     ` <1224236501.6770.1256.camel@macbook.infradead.org>
2008-11-24 19:53       ` [PATCH 2/2] Enable Pass Through Feature in Intel IOMMU Fenghua Yu
2008-11-24 19:53         ` Fenghua Yu
2008-11-24 19:53         ` Fenghua Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.