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

[Xen-changelog] [xen-3.0.4-testing] [HVM] Don't set the shadow allocation to zero if the dom is still shadowed.



# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1167735470 0
# Node ID d474fa3a08110fba65dc1401927601ee53627207
# Parent  54c1c43de4a346eadd41e20cfbff24f203e523e9
[HVM] Don't set the shadow allocation to zero if the dom is still shadowed.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>

Based on xen-unstable changeset 13200:711c31232d71608fe4ea9f4f22ca2620d3faf8ff
---
 xen/arch/x86/mm/shadow/common.c |    8 ++++++++
 1 files changed, 8 insertions(+)

diff -r 54c1c43de4a3 -r d474fa3a0811 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Fri Dec 29 16:24:57 2006 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Tue Jan 02 10:57:50 2007 +0000
@@ -3233,6 +3233,14 @@ int shadow_domctl(struct domain *d,
         return 0;
 
     case XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION:
+        if ( sc->mb == 0 && shadow_mode_enabled(d) )
+        {            
+            /* Can't set the allocation to zero unless the domain stops using
+             * shadow pagetables first */
+            SHADOW_ERROR("Can't set shadow allocation to zero, domain %u"
+                         " is still using shadows.\n", d->domain_id);
+            return -EINVAL;
+        }
         rc = shadow_set_allocation(d, sc->mb, &preempted);
         if ( preempted )
             /* Not finished.  Set up to re-run the call. */

_______________________________________________
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®.