From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Date: Mon, 20 Jan 2020 04:04:12 +0000 Subject: Re: [PATCH v2 12/45] KVM: PPC: Allocate vcpu struct in common PPC code Message-Id: <20200120040412.GF14307@blackberry> List-Id: References: <20191218215530.2280-1-sean.j.christopherson@intel.com> <20191218215530.2280-13-sean.j.christopherson@intel.com> In-Reply-To: <20191218215530.2280-13-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Sean Christopherson Cc: Marc Zyngier , James Hogan , Christian Borntraeger , Janosch Frank , Paolo Bonzini , James Morse , Julien Thierry , Suzuki K Poulose , David Hildenbrand , Cornelia Huck , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kurz On Wed, Dec 18, 2019 at 01:54:57PM -0800, Sean Christopherson wrote: > Move allocation of all flavors of PPC vCPUs to common PPC code. All > variants either allocate 'struct kvm_vcpu' directly, or require that > the embedded 'struct kvm_vcpu' member be located at offset 0, i.e. > guarantee that the allocation can be directly interpreted as a 'struct > kvm_vcpu' object. > > Remove the message from the build-time assertion regarding placement of > the struct, as compatibility with the arch usercopy region is no longer > the sole dependent on 'struct kvm_vcpu' being at offset zero. > > Signed-off-by: Sean Christopherson This fails to compile for Book E configs: CC arch/powerpc/kvm/e500.o /home/paulus/kernel/kvm/arch/powerpc/kvm/e500.c: In function ‘kvmppc_core_vcpu_create_e500’: /home/paulus/kernel/kvm/arch/powerpc/kvm/e500.c:464:9: error: return makes integer from pointer without a cast [-Werror=int-conversion] return vcpu; ^ cc1: all warnings being treated as errors make[3]: *** [/home/paulus/kernel/kvm/scripts/Makefile.build:266: arch/powerpc/kvm/e500.o] Error 1 There is a "return vcpu" statement in kvmppc_core_vcpu_create_e500(), and another in kvmppc_core_vcpu_create_e500mc(), which both need to be changed to "return 0". (By the way, I do appreciate you fixing the PPC code, even if there are some errors.) Paul.