From: Joerg Roedel <joerg.roedel@amd.com>
To: Ingo Molnar <mingo@elte.hu>, <x86@kernel.org>
Cc: <iommu@lists.linux-foundation.org>,
<linux-kernel@vger.kernel.org>, Tom Lyon <pugs@cisco.com>,
Joerg Roedel <joerg.roedel@amd.com>
Subject: [PATCH 2/3] iommu-api: Extension to check for interrupt remapping
Date: Tue, 27 Jul 2010 18:43:49 +0200 [thread overview]
Message-ID: <1280249030-21332-3-git-send-email-joerg.roedel@amd.com> (raw)
In-Reply-To: <1280249030-21332-1-git-send-email-joerg.roedel@amd.com>
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
next prev parent reply other threads:[~2010-07-27 16:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=1280249030-21332-3-git-send-email-joerg.roedel@amd.com \
--to=joerg.roedel@amd.com \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pugs@cisco.com \
--cc=x86@kernel.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
Powered by JetHome