* [git pull] IOMMU updates for 2.6.36
@ 2010-07-27 16:43 Joerg Roedel
2010-07-27 16:43 ` [PATCH 1/3] x86/amd-iommu: Use for_each_pci_dev() Joerg Roedel
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Joerg Roedel @ 2010-07-27 16:43 UTC (permalink / raw)
To: Ingo Molnar, x86; +Cc: iommu, linux-kernel
Hi Ingo,
The following changes since commit b37fa16e78d6f9790462b3181602a26b5af36260:
Linus Torvalds (1):
Linux 2.6.35-rc6
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu.git iommu/2.6.36
Joerg Roedel (2):
x86/amd-iommu: Export cache-coherency capability
Merge branches 'iommu-api/2.6.36' and 'amd-iommu/2.6.36' into iommu/2.6.36
Kulikov Vasiliy (1):
x86/amd-iommu: Use for_each_pci_dev()
Tom Lyon (1):
iommu-api: Extension to check for interrupt remapping
arch/x86/kernel/amd_iommu.c | 8 ++++++--
drivers/pci/intel-iommu.c | 2 ++
include/linux/iommu.h | 1 +
3 files changed, 9 insertions(+), 2 deletions(-)
The changes are all minor. There is one cleanup patch, and two patches that
extend the capabilities exported by the IOMMU-API. Please pull.
Joerg
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] x86/amd-iommu: Use for_each_pci_dev()
2010-07-27 16:43 [git pull] IOMMU updates for 2.6.36 Joerg Roedel
@ 2010-07-27 16:43 ` Joerg Roedel
2010-07-27 16:43 ` [PATCH 2/3] iommu-api: Extension to check for interrupt remapping Joerg Roedel
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2010-07-27 16:43 UTC (permalink / raw)
To: Ingo Molnar, x86; +Cc: iommu, linux-kernel, Kulikov Vasiliy, Joerg Roedel
From: Kulikov Vasiliy <segooon@gmail.com>
Use for_each_pci_dev() to simplify the code.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
arch/x86/kernel/amd_iommu.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 0d20286..29dd3b9 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -2609,8 +2609,7 @@ int __init amd_iommu_init_passthrough(void)
pt_domain->mode |= PAGE_MODE_NONE;
- while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
-
+ for_each_pci_dev(dev) {
if (!check_device(&dev->dev))
continue;
--
1.7.0.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/3] iommu-api: Extension to check for interrupt remapping
2010-07-27 16:43 [git pull] IOMMU updates for 2.6.36 Joerg Roedel
2010-07-27 16:43 ` [PATCH 1/3] x86/amd-iommu: Use for_each_pci_dev() Joerg Roedel
@ 2010-07-27 16:43 ` Joerg Roedel
2010-07-27 16:43 ` [PATCH 3/3] x86/amd-iommu: Export cache-coherency capability Joerg Roedel
2010-08-01 6:48 ` [git pull] IOMMU updates for 2.6.36 Ingo Molnar
3 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2010-07-27 16:43 UTC (permalink / raw)
To: Ingo Molnar, x86; +Cc: iommu, linux-kernel, Tom Lyon, Joerg Roedel
From: Tom Lyon <pugs@cisco.com>
This patch allows IOMMU users to determine whether the
hardware and software support safe, isolated interrupt
remapping. Not all Intel IOMMUs have the hardware, and the
software for AMD is not there yet.
Signed-off-by: Tom Lyon <pugs@cisco.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
drivers/pci/intel-iommu.c | 2 ++
include/linux/iommu.h | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index c9171be..6a5af18 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -3698,6 +3698,8 @@ static int intel_iommu_domain_has_cap(struct iommu_domain *domain,
if (cap == IOMMU_CAP_CACHE_COHERENCY)
return dmar_domain->iommu_snooping;
+ if (cap == IOMMU_CAP_INTR_REMAP)
+ return intr_remapping_enabled;
return 0;
}
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index be22ad8..0a2ba40 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -30,6 +30,7 @@ struct iommu_domain {
};
#define IOMMU_CAP_CACHE_COHERENCY 0x1
+#define IOMMU_CAP_INTR_REMAP 0x2 /* isolates device intrs */
struct iommu_ops {
int (*domain_init)(struct iommu_domain *domain);
--
1.7.0.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] x86/amd-iommu: Export cache-coherency capability
2010-07-27 16:43 [git pull] IOMMU updates for 2.6.36 Joerg Roedel
2010-07-27 16:43 ` [PATCH 1/3] x86/amd-iommu: Use for_each_pci_dev() Joerg Roedel
2010-07-27 16:43 ` [PATCH 2/3] iommu-api: Extension to check for interrupt remapping Joerg Roedel
@ 2010-07-27 16:43 ` Joerg Roedel
2010-08-01 6:48 ` [git pull] IOMMU updates for 2.6.36 Ingo Molnar
3 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2010-07-27 16:43 UTC (permalink / raw)
To: Ingo Molnar, x86; +Cc: iommu, linux-kernel, Joerg Roedel
This patch exports the capability of the AMD IOMMU to force
cache coherency of DMA transactions through the IOMMU-API.
This is required to disable some nasty hacks in KVM when
this capability is not available.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
arch/x86/kernel/amd_iommu.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 29dd3b9..fa044e1 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -2572,6 +2572,11 @@ static phys_addr_t amd_iommu_iova_to_phys(struct iommu_domain *dom,
static int amd_iommu_domain_has_cap(struct iommu_domain *domain,
unsigned long cap)
{
+ switch (cap) {
+ case IOMMU_CAP_CACHE_COHERENCY:
+ return 1;
+ }
+
return 0;
}
--
1.7.0.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [git pull] IOMMU updates for 2.6.36
2010-07-27 16:43 [git pull] IOMMU updates for 2.6.36 Joerg Roedel
` (2 preceding siblings ...)
2010-07-27 16:43 ` [PATCH 3/3] x86/amd-iommu: Export cache-coherency capability Joerg Roedel
@ 2010-08-01 6:48 ` Ingo Molnar
3 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2010-08-01 6:48 UTC (permalink / raw)
To: Joerg Roedel; +Cc: x86, iommu, linux-kernel
* Joerg Roedel <joerg.roedel@amd.com> wrote:
> Hi Ingo,
>
> The following changes since commit b37fa16e78d6f9790462b3181602a26b5af36260:
> Linus Torvalds (1):
> Linux 2.6.35-rc6
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu.git iommu/2.6.36
>
> Joerg Roedel (2):
> x86/amd-iommu: Export cache-coherency capability
> Merge branches 'iommu-api/2.6.36' and 'amd-iommu/2.6.36' into iommu/2.6.36
>
> Kulikov Vasiliy (1):
> x86/amd-iommu: Use for_each_pci_dev()
>
> Tom Lyon (1):
> iommu-api: Extension to check for interrupt remapping
>
> arch/x86/kernel/amd_iommu.c | 8 ++++++--
> drivers/pci/intel-iommu.c | 2 ++
> include/linux/iommu.h | 1 +
> 3 files changed, 9 insertions(+), 2 deletions(-)
>
> The changes are all minor. There is one cleanup patch, and two patches that
> extend the capabilities exported by the IOMMU-API. Please pull.
Pulled, thanks Joerg!
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-08-01 6:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-27 16:43 [git pull] IOMMU updates for 2.6.36 Joerg Roedel
2010-07-27 16:43 ` [PATCH 1/3] x86/amd-iommu: Use for_each_pci_dev() Joerg Roedel
2010-07-27 16:43 ` [PATCH 2/3] iommu-api: Extension to check for interrupt remapping Joerg Roedel
2010-07-27 16:43 ` [PATCH 3/3] x86/amd-iommu: Export cache-coherency capability Joerg Roedel
2010-08-01 6:48 ` [git pull] IOMMU updates for 2.6.36 Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome