On Wed, Jun 15, 2016 at 07:21:05PM +1000, Suraj Jitindar Singh wrote: > 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@xxxxxxxxx> Unfortunately I get a compile error when compiling for either a 32-bit powerpc config (e.g. pmac32_defconfig with KVM turned on) or a Book E config. The error is: In file included from /home/paulus/kernel/kvm/include/linux/kvm_host.h:36:0, from /home/paulus/kernel/kvm/arch/powerpc/kernel/asm-offsets.c:54: /home/paulus/kernel/kvm/arch/powerpc/include/asm/kvm_host.h:299:36: error: ‘MAX_SMT_THREADS’ undeclared here (not in a function) struct kvm_vcpu *runnable_threads[MAX_SMT_THREADS]; ^ /home/paulus/kernel/kvm/./Kbuild:81: recipe for target 'arch/powerpc/kernel/asm-offsets.s' failed You are using MAX_SMT_THREADS in kvm_host.h, but it is defined in kvm_book3s_asm.h, which gets included by asm-offsets.c after it include kvm_host.h. I don't think we can just make kvm_host.h include book3s.h. The best solution might be to move the definition of struct kvmppc_vcore to kvm_book3s.h. Paul. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html