[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xenpaging: disallow paging in a PoD guest



# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1319106358 -3600
# Node ID a06609840ff1335f1c36129881cfda4aaee7679b
# Parent  18306b05479933d675a9f4c714e52c7f93f92ce9
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>
Acked-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Tim Deegan <tim@xxxxxxx>
---


diff -r 18306b054799 -r a06609840ff1 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Thu Oct 20 11:25:58 2011 +0100
+++ b/tools/xenpaging/xenpaging.c       Thu Oct 20 11:25:58 2011 +0100
@@ -246,6 +246,9 @@
             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 18306b054799 -r a06609840ff1 xen/arch/x86/mm/mem_event.c
--- a/xen/arch/x86/mm/mem_event.c       Thu Oct 20 11:25:58 2011 +0100
+++ b/xen/arch/x86/mm/mem_event.c       Thu Oct 20 11:25:58 2011 +0100
@@ -253,6 +253,7 @@
     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 @@
         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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.