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

[Xen-changelog] [xen master] x86/shadow: make 1-bit-disable match 1-bit-enable



commit ca39b45bd2a2a394bdb81cc1b3240bab9aece92e
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Dec 20 10:12:11 2017 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Dec 20 10:12:11 2017 +0100

    x86/shadow: make 1-bit-disable match 1-bit-enable
    
    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 <jbeulich@xxxxxxxx>
    Acked-by: Tim Deegan <tim@xxxxxxx>
---
 xen/arch/x86/mm/shadow/common.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index 600df0c..0e9e191 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -3377,7 +3377,10 @@ static int shadow_one_bit_disable(struct domain *d, u32 
mode)
     }
 
     /* 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 */
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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