From: "Jan Beulich" <JBeulich@suse.com>
To: xen-devel <xen-devel@lists.xenproject.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Paul Durrant <paul.durrant@citrix.com>,
Keir Fraser <keir@xen.org>
Subject: [PATCH] x86/HVM: support IOMMU-related Viridian CPUID bits
Date: Fri, 01 Aug 2014 14:48:30 +0100 [thread overview]
Message-ID: <53DBB6CE020000780002875F@mail.emea.novell.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 884 bytes --]
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/hvm/viridian.c
+++ b/xen/arch/x86/hvm/viridian.c
@@ -50,6 +50,8 @@
#define CPUID6A_APIC_OVERLAY (1 << 0)
#define CPUID6A_MSR_BITMAPS (1 << 1)
#define CPUID6A_NESTED_PAGING (1 << 3)
+#define CPUID6A_DMA_REMAP (1 << 4)
+#define CPUID6A_INTR_REMAP (1 << 5)
int cpuid_viridian_leaves(unsigned int leaf, unsigned int *eax,
unsigned int *ebx, unsigned int *ecx,
@@ -111,6 +113,12 @@ int cpuid_viridian_leaves(unsigned int l
*eax |= CPUID6A_MSR_BITMAPS;
if ( hap_enabled(d) )
*eax |= CPUID6A_NESTED_PAGING;
+ if ( iommu_enabled )
+ {
+ *eax |= CPUID6A_DMA_REMAP;
+ if ( iommu_intremap )
+ *eax |= CPUID6A_INTR_REMAP;
+ }
break;
}
[-- Attachment #2: x86-viridian-CPUID-leaf-6-IOMMU.patch --]
[-- Type: text/plain, Size: 932 bytes --]
x86/HVM: support IOMMU-related Viridian CPUID bits
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/hvm/viridian.c
+++ b/xen/arch/x86/hvm/viridian.c
@@ -50,6 +50,8 @@
#define CPUID6A_APIC_OVERLAY (1 << 0)
#define CPUID6A_MSR_BITMAPS (1 << 1)
#define CPUID6A_NESTED_PAGING (1 << 3)
+#define CPUID6A_DMA_REMAP (1 << 4)
+#define CPUID6A_INTR_REMAP (1 << 5)
int cpuid_viridian_leaves(unsigned int leaf, unsigned int *eax,
unsigned int *ebx, unsigned int *ecx,
@@ -111,6 +113,12 @@ int cpuid_viridian_leaves(unsigned int l
*eax |= CPUID6A_MSR_BITMAPS;
if ( hap_enabled(d) )
*eax |= CPUID6A_NESTED_PAGING;
+ if ( iommu_enabled )
+ {
+ *eax |= CPUID6A_DMA_REMAP;
+ if ( iommu_intremap )
+ *eax |= CPUID6A_INTR_REMAP;
+ }
break;
}
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next reply other threads:[~2014-08-01 13:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 13:48 Jan Beulich [this message]
2014-08-01 13:58 ` [PATCH] x86/HVM: support IOMMU-related Viridian CPUID bits Paul Durrant
2014-08-01 14:16 ` Jan Beulich
2014-08-01 14:42 ` Paul Durrant
2014-08-01 14:57 ` Jan Beulich
2014-08-01 15:01 ` Paul Durrant
2014-08-01 15:19 ` Jan Beulich
2014-08-01 15:31 ` Paul Durrant
2014-08-04 16:30 ` George Dunlap
2014-08-04 16:51 ` Paul Durrant
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=53DBB6CE020000780002875F@mail.emea.novell.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=keir@xen.org \
--cc=paul.durrant@citrix.com \
--cc=xen-devel@lists.xenproject.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 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.