59 lines
2.1 KiB
Diff
59 lines
2.1 KiB
Diff
|
changeset: 23980:a06609840ff1
|
||
|
user: Olaf Hering <olaf@aepfle.de>
|
||
|
date: Thu Oct 20 11:25:58 2011 +0100
|
||
|
files: tools/xenpaging/xenpaging.c xen/arch/x86/mm/mem_event.c
|
||
|
description:
|
||
|
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@aepfle.de>
|
||
|
Acked-by: Tim Deegan <tim@xen.org>
|
||
|
Committed-by: Tim Deegan <tim@xen.org>
|
||
|
|
||
|
|
||
|
---
|
||
|
tools/xenpaging/xenpaging.c | 3 +++
|
||
|
xen/arch/x86/mm/mem_event.c | 6 ++++++
|
||
|
2 files changed, 9 insertions(+)
|
||
|
|
||
|
Index: xen-4.1.2-testing/tools/xenpaging/xenpaging.c
|
||
|
===================================================================
|
||
|
--- xen-4.1.2-testing.orig/tools/xenpaging/xenpaging.c
|
||
|
+++ xen-4.1.2-testing/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;
|
||
|
Index: xen-4.1.2-testing/xen/arch/x86/mm/mem_event.c
|
||
|
===================================================================
|
||
|
--- xen-4.1.2-testing.orig/xen/arch/x86/mm/mem_event.c
|
||
|
+++ xen-4.1.2-testing/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:
|