Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp644358pxb; Wed, 15 Sep 2021 09:50:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7XKOofT+cegs4o4xI0tUIseLFQpvuilkPPhCTnNWjOmKblIhtrn9c8plAB691oO1QG8Qg X-Received: by 2002:a17:906:3383:: with SMTP id v3mr1009125eja.213.1631724627518; Wed, 15 Sep 2021 09:50:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631724627; cv=none; d=google.com; s=arc-20160816; b=n6kQNLT5kuY23vAX8zBIS2z17dssuiNmC0U3lJw1goOrIOE/Kid5f/8h+JonCFT/vg nNMMf3lpmQjzm0GyDE8CKbdvO0agUW/ioMOOPE24feuwK+dN9ZVOEtGdLJuyPYYkcXx2 /uKCgzIk4eEYMWbvAIBqMKdMbHIPJR8uzwcCKK7lVYl0PQmlJ7bm2wq+3YdVAJRR1xst NYd+eyGjq3Fy56ZveQHwMoUnYIp/Ey4LVaqn4zHe1mAlm6Y9gEM4XCmSR1/qljEs4oCf g9rDgQW78X4PSbNAQLcIVigDZD/4B9pPO3a+KtXKBIeZ83GQuI076Yf3AEXakdHBjv6D KXzA== 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=ohcK2lrqZI/0Un5cQQISQvRNuEO3HIFBods4v3gznU8=; b=Pb8ho2+bC3cjK3kmp7O3PwzsXEIUWIq4EOzMT5eOrpDSNs5Z49qsMXjbG6bxiTqqq0 QopO321kVPUnYQcmb7pRvg9EgzAB0FfvlC5GanADNQaJIazVjqM1P/uh+seklHjkjFC6 S4nuE0b7tQKC7PSSuw26WPfVOc0h3XK8QfHEy8yjPSGOmG7HiORW/sE5FenP9YHFrUuD 3YPlaiQrTx2T7zWOFwePsmzANTsXtlJuh+iKDZpyfvZ29LIrVgN5kkxYRStlErfVmg8Y BECPULJRN0HokA8BEHTP9I4HkfnV1d+yoskHsFCmnWTSnW3qSqftna4E2WQvsO2KmrPv LkJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=OinwDiMH; 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 t2si466426edr.42.2021.09.15.09.50.01; Wed, 15 Sep 2021 09:50:27 -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=OinwDiMH; 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 S229937AbhIOQrl (ORCPT + 99 others); Wed, 15 Sep 2021 12:47:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbhIOQrg (ORCPT ); Wed, 15 Sep 2021 12:47:36 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE6D3C061574; Wed, 15 Sep 2021 09:46:17 -0700 (PDT) Received: from zn.tnic (p200300ec2f0d07008534a6109a52ea91.dip0.t-ipconnect.de [IPv6:2003:ec:2f0d:700:8534:a610:9a52:ea91]) (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 04D0A1EC051F; Wed, 15 Sep 2021 18:46:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1631724372; 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=ohcK2lrqZI/0Un5cQQISQvRNuEO3HIFBods4v3gznU8=; b=OinwDiMHyIs6ppSqYums+HJ/wABxvhGKKUPvdDics4JXpIwsFCihfmg/tYjRwayQUS5zAl /A8dCEMw7DwHpgzspvS586x6N5hMBRCXCrXZr4wBrq7mNNSRVp8ss+I1qG84M8RgMvHJvz 7a85Vcl/oUKHuIwbTjsfd22UCB+v5Mg= Date: Wed, 15 Sep 2021 18:46:03 +0200 From: Borislav Petkov To: Tom Lendacky , Sathyanarayanan Kuppuswamy 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 , Tianyu Lan , Christoph Hellwig , Andy Lutomirski , Ard Biesheuvel , Baoquan He , Benjamin Herrenschmidt , Christian Borntraeger , Daniel Vetter , Dave Hansen , Dave Young , David Airlie , Heiko Carstens , Ingo Molnar , Maarten Lankhorst , Maxime Ripard , Michael Ellerman , Paul Mackerras , Peter Zijlstra , Thomas Gleixner , Thomas Zimmermann , Vasily Gorbik , Will Deacon Subject: Re: [PATCH v3 0/8] Implement generic cc_platform_has() helper function Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 08, 2021 at 05:58:31PM -0500, Tom Lendacky wrote: > This patch series provides a generic helper function, cc_platform_has(), > to replace the sme_active(), sev_active(), sev_es_active() and > mem_encrypt_active() functions. > > It is expected that as new confidential computing technologies are > added to the kernel, they can all be covered by a single function call > instead of a collection of specific function calls all called from the > same locations. > > The powerpc and s390 patches have been compile tested only. Can the > folks copied on this series verify that nothing breaks for them. Also, > a new file, arch/powerpc/platforms/pseries/cc_platform.c, has been > created for powerpc to hold the out of line function. ... > > Tom Lendacky (8): > x86/ioremap: Selectively build arch override encryption functions > mm: Introduce a function to check for confidential computing features > x86/sev: Add an x86 version of cc_platform_has() > powerpc/pseries/svm: Add a powerpc version of cc_platform_has() > x86/sme: Replace occurrences of sme_active() with cc_platform_has() > x86/sev: Replace occurrences of sev_active() with cc_platform_has() > x86/sev: Replace occurrences of sev_es_active() with cc_platform_has() > treewide: Replace the use of mem_encrypt_active() with > cc_platform_has() Ok, modulo the minor things the plan is to take this through tip after -rc2 releases in order to pick up the powerpc build fix and have a clean base (-rc2) to base stuff on, at the same time. Pls holler if something's still amiss. Sathya, if you want to prepare the Intel variant intel_cc_platform_has() ontop of those and send it to me, that would be good because then I can integrate it all in one branch which can be used to base future work ontop. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette