From 053d91d3926c9f0afb54cf52c782482a1087bab3 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Fri, 20 Jul 2018 17:50:28 +0000 Subject: [PATCH] x86/shadow: Use mfn_t in shadow_track_dirty_vram() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ... as the only user of sl1mfn would prefer it that way. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné Reviewed-by: Wei Liu Reviewed-by: Tim Deegan --- xen/arch/x86/mm/shadow/common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c index e70c18699f..16df41bdea 100644 --- a/xen/arch/x86/mm/shadow/common.c +++ b/xen/arch/x86/mm/shadow/common.c @@ -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); -- 2.39.5