summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@ozlabs.org>2018-10-08 08:30:54 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2018-10-09 08:04:27 +0300
commit53655ddd7771f703071ac81cc5823eae509b6653 (patch)
tree6e2d612098d8b5114035e352dd3b4d4f0e900a8a /tools
parent7854f7545bff69567fc3fcd8831752138b892483 (diff)
downloadlinux-53655ddd7771f703071ac81cc5823eae509b6653.tar.xz
KVM: PPC: Book3S HV: Call kvmppc_handle_exit_hv() with vcore unlocked
Currently kvmppc_handle_exit_hv() is called with the vcore lock held because it is called within a for_each_runnable_thread loop. However, we already unlock the vcore within kvmppc_handle_exit_hv() under certain circumstances, and this is safe because (a) any vcpus that become runnable and are added to the runnable set by kvmppc_run_vcpu() have their vcpu->arch.trap == 0 and can't actually run in the guest (because the vcore state is VCORE_EXITING), and (b) for_each_runnable_thread is safe against addition or removal of vcpus from the runnable set. Therefore, in order to simplify things for following patches, let's drop the vcore lock in the for_each_runnable_thread loop, so kvmppc_handle_exit_hv() gets called without the vcore lock held. Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions