]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
x86/shadow: correct an inverted conditional in dirty VRAM tracking
authorJan Beulich <jbeulich@suse.com>
Tue, 7 Jul 2020 12:36:24 +0000 (14:36 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jul 2020 12:36:24 +0000 (14:36 +0200)
This originally was "mfn_x(mfn) == INVALID_MFN". Make it like this
again, taking the opportunity to also drop the unnecessary nearby
braces.

This is XSA-319.

Fixes: 246a5a3377c2 ("xen: Use a typesafe to define INVALID_MFN")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm/shadow/common.c

index 5fcb04ce8b6291647420b82903d7ff3074e13511..773777321f4d8ec1ccb04d739c3fe87924812e39 100644 (file)
@@ -3253,10 +3253,8 @@ int shadow_track_dirty_vram(struct domain *d,
             int dirty = 0;
             paddr_t sl1ma = dirty_vram->sl1ma[i];
 
-            if ( !mfn_eq(mfn, INVALID_MFN) )
-            {
+            if ( mfn_eq(mfn, INVALID_MFN) )
                 dirty = 1;
-            }
             else
             {
                 page = mfn_to_page(mfn);