From: Andres Lagar-Cavilla <andres@lagarcavilla.org>
To: xen-devel@lists.xensource.com
Cc: olaf@aepfle.de, andres@gridcentric.ca, tim@xen.org,
wei.wang2@amd.com, hongkaixing@huawei.com, adin@gridcentric.ca
Subject: [PATCH 3 of 3] x86/mm: Enable paging and sharing in AMD NPT mode
Date: Wed, 29 Feb 2012 22:15:58 -0500 [thread overview]
Message-ID: <4c6bee5a191a2325be96.1330571758@xdev.gridcentric.ca> (raw)
In-Reply-To: <patchbomb.1330571755@xdev.gridcentric.ca>
xen/arch/x86/mm/mem_event.c | 7 +++++--
xen/arch/x86/mm/mem_sharing.c | 7 +++++++
2 files changed, 12 insertions(+), 2 deletions(-)
Both features are mutually exclusive with sharing iommu and p2m tables.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Signed-off-by: Adin Scannell <adin@scannell.ca>
diff -r d6c3c77ad749 -r 4c6bee5a191a xen/arch/x86/mm/mem_event.c
--- a/xen/arch/x86/mm/mem_event.c
+++ b/xen/arch/x86/mm/mem_event.c
@@ -550,8 +550,11 @@ int mem_event_domctl(struct domain *d, x
if ( !hap_enabled(d) )
break;
- /* Currently only EPT is supported */
- if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
+ /* Currently EPT or AMD with no iommu/hap page table sharing are
+ * supported */
+ if ( !((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) ||
+ ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
+ !iommu_hap_pt_share)) )
break;
rc = -EXDEV;
diff -r d6c3c77ad749 -r 4c6bee5a191a xen/arch/x86/mm/mem_sharing.c
--- a/xen/arch/x86/mm/mem_sharing.c
+++ b/xen/arch/x86/mm/mem_sharing.c
@@ -1202,6 +1202,13 @@ int mem_sharing_domctl(struct domain *d,
if ( !hap_enabled(d) )
return -ENODEV;
+ /* Currently EPT or AMD with no iommu/hap page table sharing are
+ * supported */
+ if ( !((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) ||
+ ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) &&
+ !iommu_hap_pt_share)) )
+ return -ENODEV;
+
switch(mec->op)
{
case XEN_DOMCTL_MEM_SHARING_CONTROL:
next prev parent reply other threads:[~2012-03-01 3:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-01 3:15 [PATCH 0 of 3] RFC Paging support for AMD NPT V2 Andres Lagar-Cavilla
2012-03-01 3:15 ` [PATCH 1 of 3] IOMMU: Add command line param to disable sharing of IOMMU and hap tables Andres Lagar-Cavilla
2012-03-01 3:15 ` [PATCH 2 of 3] x86/mm: Teach paging to page table-based p2m Andres Lagar-Cavilla
2012-03-08 14:15 ` Tim Deegan
2012-03-14 19:12 ` Andres Lagar-Cavilla
2012-03-15 10:52 ` Tim Deegan
2012-03-15 15:46 ` Andres Lagar-Cavilla
2012-03-15 17:21 ` Tim Deegan
2012-03-15 17:34 ` Keir Fraser
2012-03-01 3:15 ` Andres Lagar-Cavilla [this message]
2012-03-08 13:30 ` [PATCH 3 of 3] x86/mm: Enable paging and sharing in AMD NPT mode Tim Deegan
2012-03-01 7:55 ` [PATCH 0 of 3] RFC Paging support for AMD NPT V2 Hongkaixing
2012-03-01 16:34 ` Andres Lagar-Cavilla
2012-03-02 9:35 ` Hongkaixing
2012-03-02 15:55 ` Andres Lagar-Cavilla
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=4c6bee5a191a2325be96.1330571758@xdev.gridcentric.ca \
--to=andres@lagarcavilla.org \
--cc=adin@gridcentric.ca \
--cc=andres@gridcentric.ca \
--cc=hongkaixing@huawei.com \
--cc=olaf@aepfle.de \
--cc=tim@xen.org \
--cc=wei.wang2@amd.com \
--cc=xen-devel@lists.xensource.com \
/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.