[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: p2m: Reduce the locking section in get_page_from_gva
commit 0f11f3e7abf6465a8da8790af3f00518a74890fc Author: Julien Grall <julien.grall@xxxxxxx> AuthorDate: Mon Jul 16 18:27:01 2018 +0100 Commit: Julien Grall <julien.grall@xxxxxxx> CommitDate: Wed Aug 22 16:32:02 2018 +0100 xen/arm: p2m: Reduce the locking section in get_page_from_gva The p2m lock is only necessary to prevent gvirt_to_maddr failing when break-before-make sequence is used in the P2M update concurrently on another pCPU. So reduce the locking section. Signed-off-by: Julien Grall <julien.grall@xxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> --- xen/arch/arm/p2m.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 14791388ad..5ca7ffe41b 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -1415,9 +1415,13 @@ struct page_info *get_page_from_gva(struct vcpu *v, vaddr_t va, if ( v != current ) return NULL; + /* + * The lock is here to protect us against the break-before-make + * sequence used when updating the entry. + */ p2m_read_lock(p2m); - par = gvirt_to_maddr(va, &maddr, flags); + p2m_read_unlock(p2m); if ( par ) { @@ -1445,8 +1449,6 @@ struct page_info *get_page_from_gva(struct vcpu *v, vaddr_t va, } err: - p2m_read_unlock(p2m); - if ( !page && p2m->mem_access_enabled ) page = p2m_mem_access_check_and_get_page(va, flags, v); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |