Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1512286pxy; Mon, 2 Aug 2021 03:38:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxz7VCPwDRd0CYozzVfpiNRbLI9PPk/as1/CgCVLGBbBn7X2XYeTpbxce2FVtQnrkgweDrb X-Received: by 2002:a17:906:c342:: with SMTP id ci2mr14978975ejb.122.1627900730071; Mon, 02 Aug 2021 03:38:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627900730; cv=none; d=google.com; s=arc-20160816; b=DstrWK8XxK7kMMgnh/FkVPKg3nXB8yGn2lCJsfwUTilpOinCVWEwxkuyXt/o7MTkVX Nb5jzcF1Af6tJp+kkjs8f5jau0xQTtZJl+CrsH7i6TvkLIGtMnLrsGgn/fPvFJiQxbnj qDYZ1LK4C1vr+yZfEeId8iYJimW3oORvPPLw/h5gWET2rIByZqFzvXszuwi8BwEN1072 9wKAgRBWtsO+7vgjTJnWU07QHUqkvBJBd5eo4oWzR0yb76biSp/rrjoxO0ZPtiPnlaMB rLHe9extHXV9HUJwt8E9Hd4rbF121oaJ9/sVF0hX4HdYYb6dbKNyuSDZJVfgrzicqCB5 i0gQ== 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; bh=9csx3588o0r3fdLYFEGWwRBjUtBZAVMMBWJ8F0nZ8Ng=; b=Ay0arewldISA1e9B0heCeXqXDzEx5uL9JshRzPUq2wnu8SX83OrazaHzNeKXILuFOs 4ORpLJLFBYeb/zoBihtZMb+KS7Sxlset/uT8GMAiq9PnsjiUCUCF1xbGWe1uBn9pdyKc sXFbtntb2pG4VrNeh4befKqL9OWZNPv8gyDMrRIVGU6VKL2qry7f0hGYkX2ftAqxKEsd 84JajmjqeTijLpN0G9vffeVD+vffGgIjXjORfUalUc2aE6Z6jxlyHsCdTecGSmMAEIp8 eq49ad2AhJn7rrVKenl3c8mLwiBaKK2m0l3ZMGBP4LeKbrpcj8AN5bp+eTlSyRZ+GIEj ZN5A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y19si5998094ejp.323.2021.08.02.03.38.26; Mon, 02 Aug 2021 03:38:50 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233318AbhHBKfJ (ORCPT + 99 others); Mon, 2 Aug 2021 06:35:09 -0400 Received: from 8bytes.org ([81.169.241.247]:52370 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233294AbhHBKfI (ORCPT ); Mon, 2 Aug 2021 06:35:08 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 39E14379; Mon, 2 Aug 2021 12:34:57 +0200 (CEST) Date: Mon, 2 Aug 2021 12:34:51 +0200 From: Joerg Roedel 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, Borislav Petkov , Brijesh Singh , Andi Kleen , Sathyanarayanan Kuppuswamy , Tianyu Lan Subject: Re: [PATCH 01/11] mm: Introduce a function to check for virtualization protection features Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 27, 2021 at 05:26:04PM -0500, Tom Lendacky wrote: > In prep for other protected virtualization technologies, introduce a > generic helper function, prot_guest_has(), that can be used to check > for specific protection attributes, like memory encryption. This is > intended to eliminate having to add multiple technology-specific checks > to the code (e.g. if (sev_active() || tdx_active())). > > Co-developed-by: Andi Kleen > Signed-off-by: Andi Kleen > Co-developed-by: Kuppuswamy Sathyanarayanan > Signed-off-by: Kuppuswamy Sathyanarayanan > Signed-off-by: Tom Lendacky Reviewed-by: Joerg Roedel