|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86/mm: ASSERT we are putting the right gfn in the XENMAPSPACE_gmfn* cases
# HG changeset patch
# User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
# Date 1322152474 0
# Node ID 480531cab3f4468b1ec9b549bc84d66e420ce685
# Parent a94fc613ab8c88815e3bfc1335493301ace1b38a
x86/mm: ASSERT we are putting the right gfn in the XENMAPSPACE_gmfn* cases
Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Tim Deegan <tim@xxxxxxx>
---
diff -r a94fc613ab8c -r 480531cab3f4 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Thu Nov 24 16:34:34 2011 +0000
+++ b/xen/arch/x86/mm.c Thu Nov 24 16:34:34 2011 +0000
@@ -4773,13 +4773,16 @@
/* Unmap from old location, if any. */
gpfn = get_gpfn_from_mfn(mfn);
ASSERT( gpfn != SHARED_M2P_ENTRY );
+ if ( xatp->space == XENMAPSPACE_gmfn ||
+ xatp->space == XENMAPSPACE_gmfn_range )
+ ASSERT( gpfn == gfn );
if ( gpfn != INVALID_M2P_ENTRY )
guest_physmap_remove_page(d, gpfn, mfn, PAGE_ORDER_4K);
/* Map at new location. */
rc = guest_physmap_add_page(d, xatp->gpfn, mfn, PAGE_ORDER_4K);
- /* In the XENMAPSPACE_gmfn, we took a ref and locked the p2m at the top */
+ /* In the XENMAPSPACE_gmfn, we took a ref of the gfn at the top */
if ( xatp->space == XENMAPSPACE_gmfn ||
xatp->space == XENMAPSPACE_gmfn_range )
put_gfn(d, gfn);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |