Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1018683pxb; Tue, 17 Aug 2021 01:36:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1O1BCUXFmpneXG2plZ7WqKx4ayNUSE+N9mxyw/j7pUeraucztoL+kUKsrDKKFd1OwdWyg X-Received: by 2002:a17:906:6847:: with SMTP id a7mr2879574ejs.288.1629189401134; Tue, 17 Aug 2021 01:36:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629189401; cv=none; d=google.com; s=arc-20160816; b=LeWPyF5D4gJSnop+rk5NFyc7i95nyZZ9aCMWkrtN0iGhFwM/vFLIKryUmkqT38Tr5+ yYqYp7Gj4XLDdrICgREJAgyjk1mMnl9EW/kCDkGLc4pzxywCTOEJh7h+i5bAGoLg1rEn cCCt9tdyMO/o33QQnxXWu5iiHlR3I0pWGEpwvykP5keAsH6uCeSotEuHbytbWcPtlolu E9C3tJy+BBbKjywfYSD74YLbSto/n92NGWiZjdYoVse13sqW8Clf2clojyDwQEUzjfh3 JG5bdrMsDjRtM4neFR39TJZw0RRDIZJRXgNXyJCJ8eu/6hfM7UUk2XPrrj3QF4ohDOPh /0Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=v4uPhgZdiiJlpwtVqNaqXelj9T6f8upihbkiEG3o50g=; b=Bv7ETkE+xKYsUG9Y7mcrlsI6+vobj5u8oNHuxR6yZZmfijKyh0A1F9OASy70MXv13G Co9m+NxdwIxgS+z+s7o99pP2dARRK7RKndjuoSXdWArVdAKzPVycHw7Z4ZDh1FQ2ZuBl gdhv+KG8T6lZzpNj21wAjfxJc811dQizv1KRcPUukkzkdoGlX5F220prc4fZ1OKjD43o cBwqbfINqxYIUXsq+51HcAvNlCwtvmw/W64bzbgtp6KcKQUUhB39DWVdvxecvrfWIMXl wrwOsbrnMzhdH6ioh+Iw/0IwobzoveEKchQKP7azZaB7JybxSVDdcYXAMcogCz7USQdS gLUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Lgjj2tnE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a23si1753481edy.272.2021.08.17.01.36.17; Tue, 17 Aug 2021 01:36:41 -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=@alien8.de header.s=dkim header.b=Lgjj2tnE; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238727AbhHQIf2 (ORCPT + 99 others); Tue, 17 Aug 2021 04:35:28 -0400 Received: from mail.skyhub.de ([5.9.137.197]:49960 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234952AbhHQIf1 (ORCPT ); Tue, 17 Aug 2021 04:35:27 -0400 Received: from zn.tnic (p200300ec2f1175003091845243004ed4.dip0.t-ipconnect.de [IPv6:2003:ec:2f11:7500:3091:8452:4300:4ed4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 7C8781EC0556; Tue, 17 Aug 2021 10:34:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1629189288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=v4uPhgZdiiJlpwtVqNaqXelj9T6f8upihbkiEG3o50g=; b=Lgjj2tnExsaUDkBXT2fdKHNrBO+BULjZeRoKzdZIjPh+qRzdb6UJ0pRCCeVAsCG4QoEACf APFEJ/MU8gA2brA4kk158c9d631CrTcx57aisdeaPv8pnWvIEXNBmby5rOZ0TNBUDXUqiK 8l7FlEHW1jR+emE55LfUblEZ9Q1Ifp8= Date: Tue, 17 Aug 2021 10:35:32 +0200 From: Borislav Petkov To: Tom Lendacky Cc: 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 , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras Subject: Re: [PATCH v2 04/12] powerpc/pseries/svm: Add a powerpc version of prot_guest_has() Message-ID: References: <000f627ce20c6504dd8d118d85bd69e7717b752f.1628873970.git.thomas.lendacky@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <000f627ce20c6504dd8d118d85bd69e7717b752f.1628873970.git.thomas.lendacky@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 13, 2021 at 11:59:23AM -0500, Tom Lendacky wrote: > Introduce a powerpc version of the prot_guest_has() function. This will > be used to replace the powerpc mem_encrypt_active() implementation, so > the implementation will initially only support the PATTR_MEM_ENCRYPT > attribute. > > Cc: Michael Ellerman > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Signed-off-by: Tom Lendacky > --- > arch/powerpc/include/asm/protected_guest.h | 30 ++++++++++++++++++++++ > arch/powerpc/platforms/pseries/Kconfig | 1 + > 2 files changed, 31 insertions(+) > create mode 100644 arch/powerpc/include/asm/protected_guest.h > > diff --git a/arch/powerpc/include/asm/protected_guest.h b/arch/powerpc/include/asm/protected_guest.h > new file mode 100644 > index 000000000000..ce55c2c7e534 > --- /dev/null > +++ b/arch/powerpc/include/asm/protected_guest.h > @@ -0,0 +1,30 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +/* > + * Protected Guest (and Host) Capability checks > + * > + * Copyright (C) 2021 Advanced Micro Devices, Inc. > + * > + * Author: Tom Lendacky > + */ > + > +#ifndef _POWERPC_PROTECTED_GUEST_H > +#define _POWERPC_PROTECTED_GUEST_H > + > +#include > + > +#ifndef __ASSEMBLY__ Same thing here. Pls audit the whole set whether those __ASSEMBLY__ guards are really needed and remove them if not. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette