OSDN Git Service

KVM: PPC: Book3S HV: Get rid of vcore nap_count and n_woken
authorPaul Mackerras <paulus@samba.org>
Sat, 28 Mar 2015 03:21:06 +0000 (14:21 +1100)
committerAlexander Graf <agraf@suse.de>
Tue, 21 Apr 2015 13:21:32 +0000 (15:21 +0200)
commit5d5b99cd6818bdbea287d23ef055bba1a8a9e648
tree1696dcf7ad7f1e566611093e18a387711c80aab7
parent25fedfca94cfbf2461314c6c34ef58e74a31b025
KVM: PPC: Book3S HV: Get rid of vcore nap_count and n_woken

We can tell when a secondary thread has finished running a guest by
the fact that it clears its kvm_hstate.kvm_vcpu pointer, so there
is no real need for the nap_count field in the kvmppc_vcore struct.
This changes kvmppc_wait_for_nap to poll the kvm_hstate.kvm_vcpu
pointers of the secondary threads rather than polling vc->nap_count.
Besides reducing the size of the kvmppc_vcore struct by 8 bytes,
this also means that we can tell which secondary threads have got
stuck and thus print a more informative error message.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/kernel/asm-offsets.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_hv_rmhandlers.S