|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 3 of 3] xenpaging: disallow paging in a PoD guest
# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1319034160 -7200
# Node ID d56219addb9e921a02bce5fa8a97c43eba9bc914
# Parent cc6184fcd784f94165417073935c5fd0c4b4a76e
xenpaging: disallow paging in a PoD guest
Disallow xenpaging in a PoD guest until coexistance between the two features
is properly implemented.
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
diff -r cc6184fcd784 -r d56219addb9e tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c
+++ b/tools/xenpaging/xenpaging.c
@@ -246,6 +246,9 @@ static xenpaging_t *xenpaging_init(domid
case ENODEV:
ERROR("EPT not supported for this guest");
break;
+ case EXDEV:
+ ERROR("xenpaging not supported in a PoD guest");
+ break;
default:
ERROR("Error initialising shared page: %s", strerror(errno));
break;
diff -r cc6184fcd784 -r d56219addb9e xen/arch/x86/mm/mem_event.c
--- a/xen/arch/x86/mm/mem_event.c
+++ b/xen/arch/x86/mm/mem_event.c
@@ -253,6 +253,7 @@ int mem_event_domctl(struct domain *d, x
case XEN_DOMCTL_MEM_EVENT_OP_PAGING:
{
struct mem_event_domain *med = &d->mem_paging;
+ struct p2m_domain *p2m = p2m_get_hostp2m(d);
rc = -ENODEV;
/* Only HAP is supported */
if ( !hap_enabled(d) )
@@ -262,6 +263,11 @@ int mem_event_domctl(struct domain *d, x
if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
break;
+ rc = -EXDEV;
+ /* Disallow paging in a PoD guest */
+ if ( p2m->pod.entry_count )
+ break;
+
switch( mec->op )
{
case XEN_DOMCTL_MEM_EVENT_OP_PAGING_ENABLE:
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|