From: Fenghua Yu <fenghua.yu@intel.com>
To: David Woodhouse <dwmw2@infradead.org>,
"'Linus Torvalds'" <torvalds@linux-foundation.org>,
"'Stephen Rothwell'" <sfr@canb.auug.org.au>,
"'Andrew Morton'" <akpm@linux-foundation.org>,
"'Ingo Molnar'" <mingo@elte.hu>,
"'Christopher Wright'" <chrisw@redhat.com>,
"'Allen Kay'" <allen.m.kay@intel.com>
Cc: "'lkml'" <linux-kernel@vger.kernel.org>,
"'iommu'" <iommu@lists.linux-foundation.org>
Subject: [PATCH 1/2] IOMMU Identity Mapping Support: iommu_identity_mapping definition
Date: Thu, 18 Jun 2009 11:05:14 -0700 [thread overview]
Message-ID: <20090618180514.GA24082@linux-os.sc.intel.com> (raw)
In-Reply-To: <20090514175944.GA5168@linux-os.sc.intel.com>
IOMMU Identity Mapping Support: iommu_identity_mapping definition
Identity mapping for IOMMU defines a single domain to 1:1 map all pci devices
to all usable memory.
This will reduces map/unmap overhead in DMA API's and improve IOMMU performance.
On 10Gb network cards, Netperf shows no performance degradation compared to
non-IOMMU performance.
This method may lose some of DMA remapping benefits like isolation.
The first patch defines iommu_identity_mapping varialbe which controls the
identity mapping code and is 0 by default.
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
Documentation/kernel-parameters.txt | 1 +
arch/ia64/include/asm/iommu.h | 2 ++
arch/ia64/kernel/pci-dma.c | 1 +
arch/x86/include/asm/iommu.h | 1 +
arch/x86/kernel/pci-dma.c | 5 +++++
5 files changed, 10 insertions(+)
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 4b78797..6b1d7b4 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -988,6 +988,7 @@ and is between 256 and 4096 characters. It is defined in the file
forcesac
soft
pt [x86, IA64]
+ identity [x86, IA64]
io7= [HW] IO7 for Marvel based alpha systems
See comment before marvel_specify_io7 in
diff --git a/arch/ia64/include/asm/iommu.h b/arch/ia64/include/asm/iommu.h
index 745e095..cc6d59f 100644
--- a/arch/ia64/include/asm/iommu.h
+++ b/arch/ia64/include/asm/iommu.h
@@ -11,8 +11,10 @@ extern int force_iommu, no_iommu;
extern int iommu_detected;
#ifdef CONFIG_DMAR
extern int iommu_pass_through;
+extern int iommu_identity_mapping;
#else
#define iommu_pass_through (0)
+#define iommu_identity_mapping (0)
#endif
extern void iommu_dma_init(void);
extern void machvec_init(const char *name);
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
index 0569596..15b8555 100644
--- a/arch/ia64/kernel/pci-dma.c
+++ b/arch/ia64/kernel/pci-dma.c
@@ -33,6 +33,7 @@ int force_iommu __read_mostly;
#endif
int iommu_pass_through;
+int iommu_identity_mapping;
/* Dummy device used for NULL arguments (normally ISA). Better would
be probably a smaller DMA mask, but this is bug-to-bug compatible
diff --git a/arch/x86/include/asm/iommu.h b/arch/x86/include/asm/iommu.h
index fd6d21b..d2aee4a 100644
--- a/arch/x86/include/asm/iommu.h
+++ b/arch/x86/include/asm/iommu.h
@@ -7,6 +7,7 @@ extern struct dma_map_ops nommu_dma_ops;
extern int force_iommu, no_iommu;
extern int iommu_detected;
extern int iommu_pass_through;
+extern int iommu_identity_mapping;
/* 10 seconds */
#define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000)
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 049005e..489179a 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -33,6 +33,7 @@ int no_iommu __read_mostly;
int iommu_detected __read_mostly = 0;
int iommu_pass_through;
+int iommu_identity_mapping;
dma_addr_t bad_dma_address __read_mostly = 0;
EXPORT_SYMBOL(bad_dma_address);
@@ -208,6 +209,10 @@ static __init int iommu_setup(char *p)
forbid_dac = -1;
return 1;
}
+ if (!strncmp(p, "identity", 8)) {
+ iommu_identity_mapping = 1;
+ return 1;
+ }
#ifdef CONFIG_SWIOTLB
if (!strncmp(p, "soft", 4))
swiotlb = 1;
next prev parent reply other threads:[~2009-06-18 18:05 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090327212241.234500000@intel.com>
2009-03-28 14:24 ` [patch 0/4] Intel IOMMU Supspend/Resume Support Andrew Lutomirski
2009-03-30 23:01 ` David Woodhouse
[not found] ` <20090327212321.520992000@intel.com>
2009-04-03 12:37 ` [patch 4/4] Intel IOMMU Suspend/Resume Support - Code Clean Up David Woodhouse
[not found] ` <20090327212321.070229000@intel.com>
2009-04-16 0:19 ` [PATCH] Intel IOMMU Pass Through Support Fenghua Yu
2009-04-16 2:13 ` Han, Weidong
2009-04-19 10:05 ` David Woodhouse
2009-04-20 17:27 ` Yu, Fenghua
2009-05-13 23:13 ` [PATCH] Fix Intel IOMMU Compilation Warnings on IA64 Fenghua Yu
2009-05-14 15:17 ` David Woodhouse
2009-05-14 15:31 ` Matthew Wilcox
2009-05-14 17:59 ` Fenghua Yu
2009-06-18 18:05 ` Fenghua Yu [this message]
2009-06-18 18:08 ` [PATCH 1/2] IOMMU Identity Mapping Support: iommu_identity_mapping definition Muli Ben-Yehuda
2009-06-18 18:13 ` Chris Wright
2009-06-18 18:14 ` Yu, Fenghua
2009-06-18 18:25 ` Muli Ben-Yehuda
2009-06-18 18:31 ` Chris Wright
2009-06-18 18:41 ` Muli Ben-Yehuda
2009-06-18 18:50 ` Yu, Fenghua
2009-06-18 18:51 ` Chris Wright
2009-06-18 19:09 ` Yu, Fenghua
2009-06-25 0:38 ` [PATCH] IA64 Compilation Error Fix for Intel IOMMU Identity Mapping Support Fenghua Yu
2009-06-25 1:00 ` FUJITA Tomonori
2009-06-25 4:16 ` [PATCH v2] " Fenghua Yu
2009-06-25 4:48 ` FUJITA Tomonori
2009-06-25 7:11 ` David Woodhouse
2009-06-25 21:52 ` David Woodhouse
2009-06-25 21:56 ` Yu, Fenghua
2009-06-26 18:21 ` David Woodhouse
2009-06-25 22:00 ` Linus Torvalds
2009-06-25 22:46 ` Tony Luck
2009-06-25 23:43 ` Chris Wright
2009-06-26 1:35 ` Linus Torvalds
2009-06-26 1:52 ` Chris Wright
2009-06-26 2:00 ` Linus Torvalds
2009-06-26 2:08 ` Chris Wright
2009-06-26 11:15 ` David Woodhouse
2009-06-27 0:03 ` Chris Wright
2009-06-27 11:44 ` David Woodhouse
2009-06-18 18:13 ` [PATCH 1/2] IOMMU Identity Mapping Support: iommu_identity_mapping definition Chris Wright
2009-06-18 18:28 ` Yu, Fenghua
2009-06-18 18:34 ` Chris Wright
2009-07-04 18:40 ` David Woodhouse
2009-05-20 17:42 ` [PATCH] Time out for possible dead loops during queued invalidation wait Fenghua Yu
2009-05-27 5:51 ` Andrew Morton
2009-05-27 22:40 ` Yu, Fenghua
2009-05-27 22:48 ` Andrew Morton
2009-05-27 23:25 ` Yu, Fenghua
2009-05-27 23:51 ` Andrew Morton
2009-05-28 0:47 ` Yu, Fenghua
2009-06-18 18:05 ` [PATCH 2/2] IOMMU Identity Mapping Support: Intel IOMMU implementation Fenghua Yu
2009-06-18 19:15 ` Chris Wright
2009-06-18 19:40 ` Yu, Fenghua
2009-06-18 20:02 ` Chris Wright
2009-06-19 20:47 ` [PATCH v2] IOMMU Identity Mapping Support (drivers/pci/intel_iommu.c) Fenghua Yu
2009-04-30 23:29 ` [PATCH] Intel IOMMU Pass Through Support Andrew Morton
2009-04-30 23:37 ` Randy Dunlap
2009-05-01 0:00 ` Andrew Morton
2009-05-01 0:57 ` Fenghua Yu
2009-05-01 0:05 ` Fenghua Yu
2009-05-01 0:14 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090618180514.GA24082@linux-os.sc.intel.com \
--to=fenghua.yu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=allen.m.kay@intel.com \
--cc=chrisw@redhat.com \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sfr@canb.auug.org.au \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox