WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] {PATCH] Add p2m_lock in set_shared_p2m_entry

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] {PATCH] Add p2m_lock in set_shared_p2m_entry
From: Jui-Hao Chiang <juihaochiang@xxxxxxxxx>
Date: Thu, 23 Dec 2010 08:45:08 +0800
Delivery-date: Wed, 22 Dec 2010 16:46:01 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=gX0ais6/oG+U0Kurgivajj9pNVHfXSerIR8dl2jdFIs=; b=k/xdE8Z4aKuyR4T+CZ2qh5O/+xo/dTgsOlhoge9NjiLZ3TPEsuYuyge4nik0V3NVSQ hcg0DF0kWhuFLWbn5mzRgnPGLPQIvChyPgWibPoCxgdL3rmtO8LRx1f1ZdN3d9Qhka8q JDZPLYx+x88xaw1TlZ/1u1UgiB6s4040MWKfo=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=YY/qIdIU5H14VMgBx18Ho996xCzxTtkS755zj7w/eXpPjCE47PYA3eMGXhvf9CYtVU K6Tii0NUIZVJgQgBlgcSFoHPJNPRdxput/cOPLuNtU7sO8eahklD15E5UIr7I5SiBNHf iT2YYn++PcYeC9/f/cfFnUav2sGwfXdVXsLI8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Without the lock, set_shared_p2m_entry() will BUG when xen is compiled with debug=y

Singed-off-by: Jui-Hao Chiang <juihaochiang <at> gmail.com>

--- a/xen/arch/x86/mm/p2m.c    Tue Dec 21 18:10:46 2010 +0000
+++ b/xen/arch/x86/mm/p2m.c    Thu Dec 23 16:40:41 2010 +0800
@@ -2665,7 +2665,9 @@ set_shared_p2m_entry(struct p2m_domain *
     set_gpfn_from_mfn(mfn_x(omfn), INVALID_M2P_ENTRY);
 
     P2M_DEBUG("set shared %lx %lx\n", gfn, mfn_x(mfn));
+    p2m_lock(p2m);
     rc = set_p2m_entry(p2m, gfn, mfn, 0, p2m_ram_shared);
+    p2m_unlock(p2m);
     if ( 0 == rc )
         gdprintk(XENLOG_ERR,
             "set_mmio_p2m_entry: set_p2m_entry failed! mfn=%08lx\n"
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] {PATCH] Add p2m_lock in set_shared_p2m_entry, Jui-Hao Chiang <=