summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_hv.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2013-11-16 17:46:03 +1100
committerAlexander Graf <agraf@suse.de>2013-11-18 22:38:30 +0100
commitf019b7ad76e6bdbc8462cbe17ad5b86a25fcdf24 (patch)
tree03a6ed2ce877bb17576ac8337305828d16b8a3bc /arch/powerpc/kvm/book3s_hv.c
parentcaaa4c804fae7bb654f7d00b35b8583280a9c52c (diff)
downloadop-kernel-dev-f019b7ad76e6bdbc8462cbe17ad5b86a25fcdf24.zip
op-kernel-dev-f019b7ad76e6bdbc8462cbe17ad5b86a25fcdf24.tar.gz
KVM: PPC: Book3S HV: Refine barriers in guest entry/exit
Some users have reported instances of the host hanging with secondary threads of a core waiting for the primary thread to exit the guest, and the primary thread stuck in nap mode. This prompted a review of the memory barriers in the guest entry/exit code, and this is the result. Most of these changes are the suggestions of Dean Burdick <deanburdick@us.ibm.com>. The barriers between updating napping_threads and reading the entry_exit_count on the one hand, and updating entry_exit_count and reading napping_threads on the other, need to be isync not lwsync, since we need to ensure that either the napping_threads update or the entry_exit_count update get seen. It is not sufficient to order the load vs. lwarx, as lwsync does; we need to order the load vs. the stwcx., so we need isync. In addition, we need a full sync before sending IPIs to wake other threads from nap, to ensure that the write to the entry_exit_count is visible before the IPI occurs. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud