WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [HVM] Don't set the shadow allocation to

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [HVM] Don't set the shadow allocation to zero if the dom is still shadowed.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 02 Jan 2007 04:25:06 -0800
Delivery-date: Tue, 02 Jan 2007 04:25:07 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1167735470 0
# Node ID 711c31232d71608fe4ea9f4f22ca2620d3faf8ff
# Parent  4fc6ffff2ac583dc0c386eb3452484b31b37fd0e
[HVM] Don't set the shadow allocation to zero if the dom is still shadowed.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/common.c |    9 +++++++++
 1 files changed, 9 insertions(+)

diff -r 4fc6ffff2ac5 -r 711c31232d71 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Sun Dec 31 12:26:42 2006 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Tue Jan 02 10:57:50 2007 +0000
@@ -3306,6 +3306,15 @@ int shadow_domctl(struct domain *d,
 
     case XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION:
         shadow_lock(d);
+        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);
+            shadow_unlock(d);
+            return -EINVAL;
+        }
         rc = sh_set_allocation(d, sc->mb << (20 - PAGE_SHIFT), &preempted);
         shadow_unlock(d);
         if ( preempted )

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [HVM] Don't set the shadow allocation to zero if the dom is still shadowed., Xen patchbot-unstable <=