[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 5 of 6] x86/mm/shadow: fix p2m/paging deadlock when updating shadow cr3
xen/arch/x86/mm/shadow/multi.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> diff -r a7ca6ae73992 -r 1d8566a05642 xen/arch/x86/mm/shadow/multi.c --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -4190,7 +4190,12 @@ sh_update_cr3(struct vcpu *v, int do_loc return; } - if ( do_locking ) paging_lock(v->domain); + if ( do_locking ) + { + /* See comment in shadow_update_paging_modes. */ + p2m_lock(p2m_get_hostp2m(v->domain)); + paging_lock(v->domain); + } #if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC) /* Need to resync all the shadow entries on a TLB flush. Resync @@ -4434,7 +4439,11 @@ sh_update_cr3(struct vcpu *v, int do_loc #endif /* Release the lock, if we took it (otherwise it's the caller's problem) */ - if ( do_locking ) paging_unlock(v->domain); + if ( do_locking ) + { + paging_unlock(v->domain); + p2m_unlock(p2m_get_hostp2m(v->domain)); + } } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |