From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suraj Jitindar Singh Subject: Re: [PATCH 1/4] kvm/ppc/book3s_hv: Change vcore element runnable_threads from linked-list to array Date: Mon, 11 Jul 2016 16:05:35 +1000 Message-ID: <5783372F.2050804@gmail.com> References: <1465982468-18833-1-git-send-email-sjitindarsingh@gmail.com> <20160624095923.GG26584@fergus.ozlabs.ibm.com> <57735226.6010904@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org, mpe@ellerman.id.au, benh@kernel.crashing.org, kvm@vger.kernel.org, agraf@suse.com, rkrcmar@redhat.com To: Paolo Bonzini , Paul Mackerras Return-path: Received: from mail-pa0-f43.google.com ([209.85.220.43]:34092 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757828AbcGKGFo (ORCPT ); Mon, 11 Jul 2016 02:05:44 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 29/06/16 22:51, Paolo Bonzini wrote: > > On 29/06/2016 06:44, Suraj Jitindar Singh wrote: >> Thanks for catching that, yeah I see. >> >> I don't think we can trivially move the struct kvmppc_vcore definition into >> kvm_book3s.h as other code in kvm_host.h (i.e. struct kvm_vcpu_arch) requires >> the definition. I was thinking that I could just put runnable_threads inside an #ifdef. >> >> #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE >> struct kvm_vcpu *runnable_threads[MAX_SMT_THREADS]; >> #endif > You can rename MAX_SMT_THREADS to BOOK3S_MAX_SMT_THREADS and move it to > kvm_host.h. It seems like assembly code does not use it, so it's > unnecessary to have it in book3s_asm.h. It looks like MAX_SMT_THREADS is used else where in book3s_asm.h. I think the easiest option is to put the v_core struct in book3s.h. > > Paolo