From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63F2CC32771 for ; Mon, 20 Jan 2020 04:04:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 31D1620684 for ; Mon, 20 Jan 2020 04:04:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ozlabs.org header.i=@ozlabs.org header.b="V/Pa+sHE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729030AbgATEEU (ORCPT ); Sun, 19 Jan 2020 23:04:20 -0500 Received: from ozlabs.org ([203.11.71.1]:51483 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729011AbgATEEU (ORCPT ); Sun, 19 Jan 2020 23:04:20 -0500 Received: by ozlabs.org (Postfix, from userid 1003) id 481J2T5VvKz9sRQ; Mon, 20 Jan 2020 15:04:17 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1579493057; bh=GlIncoWYmOYv5Dni23RSwo6uZojZl918YWnmGeGzyJI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V/Pa+sHEae+jG71OR9r2A404DaS5UBDnEl6W5GR08hXip3iEYMnPJKOgSS38mznMS QFzFYRElYmpf39vGFlmcBXqAVGdMsLFjm/U25lpx6q0fNhotMfBPwIAqSNRKv/jocP A5kGrOXz8juIsyZkgL8m65HZO5Fh3mx4+Y9Ux1ecPuIMT+sYjoMy+YSKDxMsJPTVPp HQfIaljJGxLrxk3xUQeJAE38M8fGC3e1O4wLIfYvDRR2aZSLUNac6unBI8qCtwWfOb HgwP/Q9WG5+8ApO9XCFy1bxiLQ13UNNmnGOK8PeEgB/i16xsXwKAaVRbebZ2djABCZ zP8/aQGwqo1nw== Date: Mon, 20 Jan 2020 15:04:12 +1100 From: Paul Mackerras 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 Subject: Re: [PATCH v2 12/45] KVM: PPC: Allocate vcpu struct in common PPC code Message-ID: <20200120040412.GF14307@blackberry> References: <20191218215530.2280-1-sean.j.christopherson@intel.com> <20191218215530.2280-13-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191218215530.2280-13-sean.j.christopherson@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org 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.