Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp19724pxb; Tue, 14 Sep 2021 17:31:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMAEZqyahvvYK3qNCuLDFXraVA3F0NH5mBEvSn1N9080oKAEWe6sWwuu93zRp1cu9e6Spx X-Received: by 2002:a2e:98d1:: with SMTP id s17mr17245260ljj.138.1631665914005; Tue, 14 Sep 2021 17:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631665913; cv=none; d=google.com; s=arc-20160816; b=HwEJF/xC1vyuNpnk9y37bLXxuiwvLwSSup1s2apFn/zYcvFhL8McobBhNmHkWp/fFm ylGnGKKR+JnBzxnUhtwrOrIzzK/E+1GHbqXesNHPYVKfyEN3ukUwfXnC6HNClt9qi7i2 6yMDsiCckm6bP6ZQHrwtw5JmXgMhRAHoof3QMipaOcWaj2UxiyCdC6+RS45uDFv+/KU/ vN9Tzve/T9VTXf/Wp861yiNdd3G4QKcfhuiYQLaOKyEtl65sEI33CWMSszUimhkPCnlk yQn2Gbvhsu1ABY82RgHDCYrE23pUWMg/XX90lF8CUDBOWgHKwYo0YOWo5T17xVyjmuRC +Pfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=HgCpSqOauKiPM+dBPwX1rVKc5DllbEYyPqTeHP+eUfA=; b=Mx+NQZ20t2kbEYQqQYiVjq95+tli+90D5Wp1mamTuY+blZCbsQoDy1inB8xCT+klLz jTAM3jwL+3XkYDJ7zV1nDxiz2z8WanIHYZpd6KWqYlALlMW6otz8J4ts0Sg9KUDhejiD PLh+hPpMidIb+5EF5tGKl8PJPnbHBGSOfmpQiCqHQ0yRG97gYIfntsoVkbSrbTuab8gL BHVCRp8066z5UqGbaL2s7Mh3lTOthSRcVcZ3aDiSOYuGU9viSErw0EiP1DJYqiBOKnaL MNCu9QJWBcPq1zkqN+2if+K5zVUx5rxPvCBbfORknInTEuvgM1TgFlcOGgXnsey+sXj9 SEnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=nobrDH5n; 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 v17si13462975ljk.331.2021.09.14.17.31.26; Tue, 14 Sep 2021 17:31:53 -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; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=nobrDH5n; 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 S236129AbhIOAaY (ORCPT + 99 others); Tue, 14 Sep 2021 20:30:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229991AbhIOAaX (ORCPT ); Tue, 14 Sep 2021 20:30:23 -0400 Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53563C061574; Tue, 14 Sep 2021 17:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1631665743; bh=HgCpSqOauKiPM+dBPwX1rVKc5DllbEYyPqTeHP+eUfA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nobrDH5nGZu7v+B+3sYvcmgWwQ6HXMJcFwBQJdDWX9HZxhJmSYRfeLJ5bqM1L8nAT Zv7FEyFybAcOR9q2SSYXqyD/igi9xudle6V5yasFwsCuG7S0oozCaRNikxkvD596/w 6l43PVixwL61h3NyNDnNd5sNzqDNGCDn9FEcD1fB6an9gsKEzr5R3Isof7M+Dp+CFm Flkym9C4vSI8DMWcOL/ydbmO/xhA1U449O7gqRfyeoJq9Tl/sPJDKQcCHDPv+s1Rp6 4loBfWLosZBa6f9xlvgT7ZD+EwPUzeNUvScHtwtaoHQpWTi57p46qNn2qlhGqy8rED FWCERXkM6X8Sg== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4H8LgJ0MSWz9sVq; Wed, 15 Sep 2021 10:28:59 +1000 (AEST) From: Michael Ellerman To: Borislav Petkov Cc: Tom Lendacky , linux-kernel@vger.kernel.org, x86@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, iommu@lists.linux-foundation.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-graphics-maintainer@vmware.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kexec@lists.infradead.org, linux-fsdevel@vger.kernel.org, Brijesh Singh , Joerg Roedel , Andi Kleen , Sathyanarayanan Kuppuswamy , Tianyu Lan , Christoph Hellwig , Benjamin Herrenschmidt , Paul Mackerras Subject: Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has() In-Reply-To: References: <9d4fc3f8ea7b325aaa1879beab1286876f45d450.1631141919.git.thomas.lendacky@amd.com> Date: Wed, 15 Sep 2021 10:28:59 +1000 Message-ID: <87lf3yk7g4.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Borislav Petkov writes: > 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? Yeah. I don't love it, a new C file and an out-of-line call to then call back to a static inline that for most configuration will return false ... but whatever :) Acked-by: Michael Ellerman (powerpc) > 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? Yeah, fixed in mainline today, thanks for trying to cross compile :) cheers