From: Andres Lagar-Cavilla Subject: [PATCH 6 of 6] x86/mm: Locking p2m lookups in shadow mode Date: Fri, 13 Apr 2012 12:22:24 -0400 Message-ID: <8ec52231c03d91842d6b.1334334144@xdev.gridcentric.ca> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: andres@gridcentric.ca, tim@xen.org List-Id: xen-devel@lists.xenproject.org xen/arch/x86/mm/p2m.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Fully synchronized p2m lookups have been added to hap already. Enable that for shadow mode as well. Signed-off-by: Andres Lagar-Cavilla diff -r 1d8566a05642 -r 8ec52231c03d xen/arch/x86/mm/p2m.c --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -164,7 +164,7 @@ mfn_t __get_gfn_type_access(struct p2m_d } /* For now only perform locking on hap domains */ - if ( locked && (hap_enabled(p2m->domain)) ) + if ( locked ) /* Grab the lock here, don't release until put_gfn */ gfn_lock(p2m, gfn, 0); @@ -197,8 +197,7 @@ mfn_t __get_gfn_type_access(struct p2m_d void __put_gfn(struct p2m_domain *p2m, unsigned long gfn) { - if ( !p2m || !paging_mode_translate(p2m->domain) - || !hap_enabled(p2m->domain) ) + if ( !p2m || !paging_mode_translate(p2m->domain) ) /* Nothing to do in this case */ return;