shadow_one_bit_enable() sets PG_SH_enable (if not already set of course)
in addition to the bit being requested. Make shadow_one_bit_disable()
behave similarly - clear PG_SH_enable if that's the only bit remaining.

Signed-off-by: Jan Beulich <jbeul...@suse.com>

--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -3383,7 +3383,10 @@ static int shadow_one_bit_disable(struct
     }
 
     /* Update the bits */
-    sh_new_mode(d, d->arch.paging.mode & ~mode);
+    mode = d->arch.paging.mode & ~mode;
+    if ( mode == PG_SH_enable )
+        mode = 0;
+    sh_new_mode(d, mode);
     if ( d->arch.paging.mode == 0 )
     {
         /* Get this domain off shadows */




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to