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] x86/mm: don't override an existing shadow

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86/mm: don't override an existing shadow memory allocation when
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Nov 2010 14:35:11 -0800
Delivery-date: Fri, 19 Nov 2010 14:35:29 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir@xxxxxxx>
# Date 1290172848 0
# Node ID ff989ac7cd970598f64a05a07b037f1423f7cb47
# Parent  7d2fdc083c9c27142f09177e5f021e390da1550f
x86/mm: don't override an existing shadow memory allocation when
enabling log-dirty shadows on a PV guest.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/common.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff -r 7d2fdc083c9c -r ff989ac7cd97 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Thu Nov 18 12:28:31 2010 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Fri Nov 19 13:20:48 2010 +0000
@@ -3311,15 +3311,21 @@ static int shadow_one_bit_enable(struct 
 
     mode |= PG_SH_enable;
 
-    if ( d->arch.paging.mode == 0 )
-    {
-        /* Init the shadow memory allocation and the hash table */
-        if ( sh_set_allocation(d, 1, NULL) != 0 
-             || shadow_hash_alloc(d) != 0 )
+    if ( d->arch.paging.shadow.total_pages == 0 )
+    {
+        /* Init the shadow memory allocation if the user hasn't done so */
+        if ( sh_set_allocation(d, 1, NULL) != 0 )
         {
             sh_set_allocation(d, 0, NULL);
             return -ENOMEM;
         }
+    }
+
+    if ( d->arch.paging.mode == 0 )
+    {
+        /* Init the shadow hash table */
+        if ( shadow_hash_alloc(d) != 0 )
+            return -ENOMEM;
     }
 
     /* Update the bits */

_______________________________________________
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] x86/mm: don't override an existing shadow memory allocation when, Xen patchbot-unstable <=