]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S HV: Change vcore element runnable_threads from linked-list to array
authorSuraj Jitindar Singh <sjitindarsingh@gmail.com>
Tue, 2 Aug 2016 04:03:20 +0000 (14:03 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 8 Sep 2016 02:21:44 +0000 (12:21 +1000)
commitd920973eee981cd25745818c1a760a37a9eceea4
tree73db1ef35b75f5e92462e0e3f34a00844ec4c068
parentc31c0411f75b7ed51e5a44cfd5c211a9183d84af
KVM: PPC: Book3S HV: Change vcore element runnable_threads from linked-list to array

The struct kvmppc_vcore is a structure used to store various information
about a virtual core for a kvm guest. The runnable_threads element of the
struct provides a list of all of the currently runnable vcpus on the core
(those in the KVMPPC_VCPU_RUNNABLE state). The previous implementation of
this list was a linked_list. The next patch requires that the list be able
to be iterated over without holding the vcore lock.

Reimplement the runnable_threads list in the kvmppc_vcore struct as an
array. Implement function to iterate over valid entries in the array and
update access sites accordingly.

Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/include/asm/kvm_book3s.h
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/kvm/book3s_hv.c