Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp742934pxb; Tue, 14 Sep 2021 07:50:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIJ0b8CRnmLkoSDjPXWi9X6C95AMRNKwpsGzw1BUyGa3X8QW3OQgPYf9yxBuVI/YggMwSR X-Received: by 2002:a92:cd8b:: with SMTP id r11mr12971413ilb.136.1631631014847; Tue, 14 Sep 2021 07:50:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631631014; cv=none; d=google.com; s=arc-20160816; b=c5roVibWj1WgCZs0uJTNJd/2vzx3XjCcSaLrjWp7njN0++QWkXzTDIQu5zbYv+vI02 gUDUdsy6Od84tC/jWUU0vSA+MhHrUf3+uHtk6Fs/6g8643TJkfsMNAQbfgzcMU6iLbal 3p9FAwj+aqK1wBeEfJ6l41uQIAYMbfTJ3PtiWCq/y95Vs91WdRWI6Zaq+Ds+nEwuobE6 fVbfy9va/2esOQodHqIvLHlHJK2p1nVObPYdsj1uoDmNdau/FUEV9BG58zkLLGXMz7eO pfU5ST8gwG0o4ICd/2gdejh5TF1BGMYDvR/n1GGtdoQm9cehabMvEt6eoGe7zXeqYg1N KpTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=J6zjVa0htV/RrgDRy2Uu8T2mjgrElCCcPrY8QWkYDOQ=; b=ht42dVJEiu4Tr/pJQBfhPtmWJfIVHWPY6IiPKhM1aavac1TBiVSMgPlltP4RTExLSN Vgw9s/i8zbdJcKQAGzTW6IJzEZ85fgW1Q9ZLRlr4+eYOHhbHgKxszQsAyHiidNPFnP5o qfZ9ksh5QSYOEAzg69tqFffrbCuxBEx+snS8L528bAwgu3+gQqxeM4HSz5Bfu1RDxCXR S2DBngSNmR1jzGsdbfC2BeXeQpPjul/hFe85C77ijW+FYeoDG52pXgXSDOQbQTEp+8Od rhMOeW1JD8tCg3ea2FxYnOORgg2jtE2vvbjtOA2kFxKlFYpXfvK5StyoPxWPWDWBFVIb CTIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k17si12376267jav.64.2021.09.14.07.50.02; Tue, 14 Sep 2021 07:50:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233744AbhINOua (ORCPT + 99 others); Tue, 14 Sep 2021 10:50:30 -0400 Received: from pegase2.c-s.fr ([93.17.235.10]:36305 "EHLO pegase2.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234274AbhINOtD (ORCPT ); Tue, 14 Sep 2021 10:49:03 -0400 Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4H85mc3stlz9sTZ; Tue, 14 Sep 2021 16:47:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GO3bOpvNkxSJ; Tue, 14 Sep 2021 16:47:44 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4H85mc2pnkz9sTY; Tue, 14 Sep 2021 16:47:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 475E88B773; Tue, 14 Sep 2021 16:47:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 6uDZRDL0dNLX; Tue, 14 Sep 2021 16:47:44 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [192.168.204.207]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 86DA68B763; Tue, 14 Sep 2021 16:47:42 +0200 (CEST) Subject: Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has() To: Borislav Petkov , Michael Ellerman Cc: Sathyanarayanan Kuppuswamy , linux-efi@vger.kernel.org, Brijesh Singh , kvm@vger.kernel.org, dri-devel@lists.freedesktop.org, platform-driver-x86@vger.kernel.org, Paul Mackerras , linux-s390@vger.kernel.org, Andi Kleen , Joerg Roedel , x86@kernel.org, amd-gfx@lists.freedesktop.org, Christoph Hellwig , linux-graphics-maintainer@vmware.com, Tom Lendacky , Tianyu Lan , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <9d4fc3f8ea7b325aaa1879beab1286876f45d450.1631141919.git.thomas.lendacky@amd.com> From: Christophe Leroy Message-ID: <41b93dae-2f10-15a3-a079-c632381bec73@csgroup.eu> Date: Tue, 14 Sep 2021 16:47:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr-FR Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 14/09/2021 à 13:58, Borislav Petkov a écrit : > On Wed, Sep 08, 2021 at 05:58:35PM -0500, Tom Lendacky wrote: >> Introduce a powerpc version of the cc_platform_has() function. This will >> be used to replace the powerpc mem_encrypt_active() implementation, so >> the implementation will initially only support the CC_ATTR_MEM_ENCRYPT >> attribute. >> >> Cc: Michael Ellerman >> Cc: Benjamin Herrenschmidt >> Cc: Paul Mackerras >> Signed-off-by: Tom Lendacky >> --- >> arch/powerpc/platforms/pseries/Kconfig | 1 + >> arch/powerpc/platforms/pseries/Makefile | 2 ++ >> arch/powerpc/platforms/pseries/cc_platform.c | 26 ++++++++++++++++++++ >> 3 files changed, 29 insertions(+) >> create mode 100644 arch/powerpc/platforms/pseries/cc_platform.c > > Michael, > > can I get an ACK for the ppc bits to carry them through the tip tree > pls? > > Btw, on a related note, cross-compiling this throws the following error here: > > $ make CROSS_COMPILE=/home/share/src/crosstool/gcc-9.4.0-nolibc/powerpc64-linux/bin/powerpc64-linux- V=1 ARCH=powerpc > > ... > > /home/share/src/crosstool/gcc-9.4.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc -Wp,-MD,arch/powerpc/boot/.crt0.o.d -D__ASSEMBLY__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -O2 -msoft-float -mno-altivec -mno-vsx -pipe -fomit-frame-pointer -fno-builtin -fPIC -nostdinc -include ./include/linux/compiler_attributes.h -I./arch/powerpc/include -I./arch/powerpc/include/generated -I./include -I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -m32 -isystem /home/share/src/crosstool/gcc-9.4.0-nolibc/powerpc64-linux/bin/../lib/gcc/powerpc64-linux/9.4.0/include -mbig-endian -nostdinc -c -o arch/powerpc/boot/crt0.o arch/powerpc/boot/crt0.S > In file included from : > ././include/linux/compiler_attributes.h:62:5: warning: "__has_attribute" is not defined, evaluates to 0 [-Wundef] > 62 | #if __has_attribute(__assume_aligned__) > | ^~~~~~~~~~~~~~~ > ././include/linux/compiler_attributes.h:62:20: error: missing binary operator before token "(" > 62 | #if __has_attribute(__assume_aligned__) > | ^ > ././include/linux/compiler_attributes.h:88:5: warning: "__has_attribute" is not defined, evaluates to 0 [-Wundef] > 88 | #if __has_attribute(__copy__) > | ^~~~~~~~~~~~~~~ > ... > > Known issue? > > This __has_attribute() thing is supposed to be supported > in gcc since 5.1 and I'm using the crosstool stuff from > https://www.kernel.org/pub/tools/crosstool/ and gcc-9.4 above is pretty > new so that should not happen actually. > > But it does... > > Hmmm. > Yes, see https://lore.kernel.org/linuxppc-dev/20210914123919.58203eef@canb.auug.org.au/T/#t