Don't take the domain lock for p2m operations.
PATCH 1/1 Don't take the domain lock for p2m operations.
P2M ops are covered by their own locks, and these uses of the domain lock are relics of shadow-v1 code.
Signed-off-by Tim Deegan <[email protected]>
--- xen/arch/x86/mm.c | 9 +++------ xen/common/memory.c | 4 ---- 2 files changed, 3 insertions(+), 10 deletions(-)
xen/arch/x86/mm.c +3 -6
@@ -4596,11 +4596,6 @@ static int xenmem_add_to_physmap_once(return -EINVAL ; } -domain_lock (d); - -if ( page ) -put_page (page); -/* Remove previously mapped page if it was present. */ prev_mfn =mfn_x (get_gfn (d, xatp->gpfn, &p2mt));if (mfn_valid (prev_mfn) )
@@ -4631,7 +4626,9 @@ static int xenmem_add_to_physmap_once(if ( xatp->space == XENMAPSPACE_gmfn || xatp->space == XENMAPSPACE_gmfn_range )put_gfn (d, gfn); -domain_unlock (d); + +if ( page ) +put_page (page);return rc; }
xen/common/memory.c +0 -4
@@ -693,8 +693,6 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)return rc; } -domain_lock (d); - page =get_page_from_gfn (d, xrfp.gpfn,NULL ,P2M_ALLOC );if ( page ) {
@@ -704,8 +702,6 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg)else rc = -ENOENT ; -domain_unlock (d); -rcu_unlock_domain (d);break ;
Signature · 1 line
1.7.10.4