]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
x86/shadow: Use mfn_t in shadow_track_dirty_vram()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 20 Jul 2018 17:50:28 +0000 (17:50 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 28 Aug 2018 17:42:17 +0000 (18:42 +0100)
... as the only user of sl1mfn would prefer it that way.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/shadow/common.c

index e70c18699fbe44d1bba9533b37036da9ca293b12..16df41bdea38ed341564e19b2507cc7ff5b8ae66 100644 (file)
@@ -3316,7 +3316,7 @@ int shadow_track_dirty_vram(struct domain *d,
         memcpy(dirty_bitmap, dirty_vram->dirty_bitmap, dirty_size);
     else
     {
-        unsigned long map_mfn = mfn_x(INVALID_MFN);
+        mfn_t map_mfn = INVALID_MFN;
         void *map_sl1p = NULL;
 
         /* Iterate over VRAM to track dirty bits. */
@@ -3354,13 +3354,13 @@ int shadow_track_dirty_vram(struct domain *d,
                         /* Hopefully the most common case: only one mapping,
                          * whose dirty bit we can use. */
                         l1_pgentry_t *sl1e;
-                        unsigned long sl1mfn = paddr_to_pfn(sl1ma);
+                        mfn_t sl1mfn = maddr_to_mfn(sl1ma);
 
-                        if ( sl1mfn != map_mfn )
+                        if ( !mfn_eq(sl1mfn, map_mfn) )
                         {
                             if ( map_sl1p )
                                 unmap_domain_page(map_sl1p);
-                            map_sl1p = map_domain_page(_mfn(sl1mfn));
+                            map_sl1p = map_domain_page(sl1mfn);
                             map_mfn = sl1mfn;
                         }
                         sl1e = map_sl1p + (sl1ma & ~PAGE_MASK);