From: Andres Lagar-Cavilla <andres@lagarcavilla.org>
To: xen-devel@lists.xensource.com
Cc: andres@gridcentric.ca, keir.xen@gmail.com, tim@xen.org,
JBeulich@suse.com, adin@gridcentric.ca
Subject: [PATCH 11 of 14] ASSERT we are putting the right gfn in the XNEMAPSPACE_gmfn* cases
Date: Wed, 23 Nov 2011 16:11:18 -0500 [thread overview]
Message-ID: <a64f63ecfc57ed8d5200.1322082678@xdev.gridcentric.ca> (raw)
In-Reply-To: <patchbomb.1322082667@xdev.gridcentric.ca>
xen/arch/x86/mm.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
diff -r 667e53a7ad34 -r a64f63ecfc57 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -4773,13 +4773,16 @@ static int xenmem_add_to_physmap_once(
/* 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);
next prev parent reply other threads:[~2011-11-23 21:11 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-23 21:11 [PATCH 00 of 14] MM Fixes Andres Lagar-Cavilla
2011-11-23 21:11 ` [PATCH 01 of 14] The PoD code may split a 1GB superpage in a potentially unlocked way Andres Lagar-Cavilla
2011-11-23 21:11 ` [PATCH 02 of 14] Fix handling of m2p map in set_shared_p2m_entry Andres Lagar-Cavilla
2011-11-23 21:11 ` [PATCH 03 of 14] Make HAP log dirty disable return the correct rc Andres Lagar-Cavilla
2011-11-23 21:11 ` [PATCH 04 of 14] When passing no bitmap for the shadow log dirty bitmap clean up, we should not get EFAULT Andres Lagar-Cavilla
2011-11-23 21:11 ` [PATCH 05 of 14] Don't trigger unnecessary shadow scans on p2m entry update Andres Lagar-Cavilla
2011-11-24 9:48 ` Jan Beulich
2011-11-24 9:51 ` Jan Beulich
2011-11-24 15:24 ` Andres Lagar-Cavilla
2011-11-24 15:53 ` Tim Deegan
2011-11-23 21:11 ` [PATCH 06 of 14] Don't lose track of the log dirty bitmap Andres Lagar-Cavilla
2011-11-24 16:07 ` Tim Deegan
2011-11-24 16:11 ` Andres Lagar-Cavilla
2011-11-24 17:46 ` Andres Lagar-Cavilla
2011-11-23 21:11 ` [PATCH 07 of 14] Trivial fix for rc val in hap track dirty vram Andres Lagar-Cavilla
2011-11-24 9:59 ` Jan Beulich
2011-11-24 15:38 ` Keir Fraser
2011-11-23 21:11 ` [PATCH 08 of 14] Properly compare "pci" token when groking serial port config Andres Lagar-Cavilla
2011-11-24 10:03 ` Jan Beulich
2011-11-23 21:11 ` [PATCH 09 of 14] Allow log dirty mode to be used in conjunction with paging Andres Lagar-Cavilla
2011-11-23 21:11 ` [PATCH 10 of 14] Prevent the hypervisor from BUGging if xc_hvm_modified_memory is called on a shared page Andres Lagar-Cavilla
2011-11-23 21:11 ` Andres Lagar-Cavilla [this message]
2011-11-24 9:23 ` [PATCH 00 of 14] MM Fixes Jan Beulich
2011-11-24 11:38 ` Ian Jackson
2011-11-24 13:40 ` Andres Lagar-Cavilla
2011-11-24 16:37 ` Tim Deegan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a64f63ecfc57ed8d5200.1322082678@xdev.gridcentric.ca \
--to=andres@lagarcavilla.org \
--cc=JBeulich@suse.com \
--cc=adin@gridcentric.ca \
--cc=andres@gridcentric.ca \
--cc=keir.xen@gmail.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.