From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andres Lagar-Cavilla Subject: [PATCH 0 of 3] p2m synchronization second part Date: Tue, 08 Nov 2011 16:42:23 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: olaf@aepfle.de, George.Dunlap@eu.citrix.com, andres@gridcentric.ca, tim@xen.org, keir.xen@gmail.com, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org In this patch series we add actual synchronization. We first refine the API update posted previously (I can fold the previous and this first patch together, keep separate, whatever) Then, we make p2m-lookups actually lock the p2m. For now it's still the global p2m lock. It can be eventually made more fine grained. Finally, we ensure that within a get_gfn/put_gfn critical section, the caller has an additional ref on the underlying mfn. This requires some trickery for manipulations that remove the mfn or swap it (sharing). Signed-off-by: Andres Lagar-Cavilla xen/arch/x86/hvm/hvm.c | 3 +- xen/arch/x86/mm/p2m.c | 8 +++--- xen/common/grant_table.c | 2 +- xen/common/memory.c | 6 +++- xen/arch/x86/mm/mm-locks.h | 13 +++++---- xen/arch/x86/mm/p2m.c | 18 +++++++++++++- xen/include/asm-x86/p2m.h | 39 ++++++++++++++++++----------- xen/arch/x86/mm.c | 18 +++++++++---- xen/arch/x86/mm/mem_sharing.c | 13 +++------ xen/arch/x86/mm/p2m.c | 56 +++++++++++++++++++++++++++++++++++++++++- xen/common/grant_table.c | 4 +- xen/common/memory.c | 10 +++--- xen/include/asm-x86/mm.h | 3 +- xen/include/asm-x86/p2m.h | 10 ++++++- xen/include/xen/paging.h | 2 +- xen/include/xen/tmem_xen.h | 2 +- 16 files changed, 148 insertions(+), 59 deletions(-)