Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp263338pxv; Thu, 8 Jul 2021 01:54:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfyRbRmVc2UbWkqvNRGhCdNoFboRIm+gfcG7mw0YVOYHtRlidqL25MlcMQWws3aW1OLayL X-Received: by 2002:a05:6638:28a:: with SMTP id c10mr25461458jaq.112.1625734480833; Thu, 08 Jul 2021 01:54:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625734480; cv=none; d=google.com; s=arc-20160816; b=aC1kvoydoAOqw5WUiNMNzom0MhGbx5/noQOLT/crr/3HwTEfxORFvuI8aH5MNuGPrv 4OaS/Pi1r+isfFAnmzcHTLZqDe8rNRtjXEmifYv5c3b1sxmMWi/zsWT4cQuQLK9rxSQt 0cQJhx0CuWIBD/nwgQ79MjLV3y9UuWOtiZW2S1xLZXmSY9LndVGZdfJhydOomHH0Xij3 294gJa96KqcaHDpc/0cm3YFL6GOycTr9obM1Mrxey+MyLW4R9XMZaHnqLPNShz1GdJ6h wsZuaZUJnXYGlG6Cd1T5hYpCzwgCgLw7ssNEdEiHOffybwIOaCcCnlHrZravHbQH88zO fDgw== 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:dkim-signature; bh=gIPcM/AEt6CFgVLe5U5Gt1G0R6Bu5ZtRDH8h8xxqSLM=; b=z32Mc6UxAG3x3thaicDfc09rpga1ID7y+qjAX0USBmYr7lKSgchH6CSV0U7dUlKSAg kyzwpxUyepf5zgnCNI7oQ9MdOU1fpOdZ5W51jPMVK2hRreUOQ6Ou6QJV/cM9CypsMfZ8 031LgHG4Kck5Vztl1zJWf/jCjEevi9tjhgPWy9pgxd4QPpH6T84EmXCA2N5m7pY7zT30 GsWuscaFJuKtBOb6T/4t1Prpqipk0ytv+4hqBHMluPtkrBp7gabts+4t6x2+UMrgbQ6h U3IDlWrswyQsj4G3ed3M7k50X9CZeP58S+FCVNqBv/vrmmSshw+HIhtWRdp8KyjUiK/v amdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RIaFFA4L; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si1519046iob.0.2021.07.08.01.54.28; Thu, 08 Jul 2021 01:54:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=@redhat.com header.s=mimecast20190719 header.b=RIaFFA4L; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231308AbhGHI4S (ORCPT + 99 others); Thu, 8 Jul 2021 04:56:18 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44038 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbhGHI4R (ORCPT ); Thu, 8 Jul 2021 04:56:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625734415; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gIPcM/AEt6CFgVLe5U5Gt1G0R6Bu5ZtRDH8h8xxqSLM=; b=RIaFFA4LZX3QJ8NIavAhOqer5nD+ieYm50ubrm1rR3GutMi4SbyBLf+FWQoH6IU3iyodcf HSsaC5DeO9brs9qEfxhEWn//138vhBsxFeckodDZerr1vEUvIPo3F+6SbxYMxLhTM+1Ujb /YfMye7saH9yD0Pd3vhyDXmZQj2FvYY= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-362-GaOvcsxtM1WTcpdPeKT4Vg-1; Thu, 08 Jul 2021 04:53:34 -0400 X-MC-Unique: GaOvcsxtM1WTcpdPeKT4Vg-1 Received: by mail-ed1-f71.google.com with SMTP id o8-20020aa7dd480000b02903954c05c938so2942048edw.3 for ; Thu, 08 Jul 2021 01:53:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gIPcM/AEt6CFgVLe5U5Gt1G0R6Bu5ZtRDH8h8xxqSLM=; b=bAf//NgPd07mB42miol30yCw8IPuLY+LrhSTq/RttluMOIEDSDFaj/hmm+NpzssdCg ubNXMCRzNGeFqg17l40BRflm5fQIPAbJ8Hi3ze9YnUv+odEGgtlJ/7DPktIqjQn1g7Pw n0MLxpx+9I9t8Wfexd8Rz5WI84aDOKMr3dKqfoBhnis1JaeGCHFZVOfCbY57Yprt8JdI RL04TCf02qyW3dx6ZoFSX2PDujn0InGDTeXF5RJQqvi/EJxgLwdWWSykTEVE6VSmPuX8 dcvbNDWCFp/yIMqoPLesZwlwXcAq8HeoQo9v+kKN/DQf6B5rbZmm/gcFunHNpnXCrrpk 4Wgg== X-Gm-Message-State: AOAM532VuhygbQQKqVYvfEQtflaq1kx1Q47YHaN0Xhbo+rQi4EsMCJIT MjlNeJysO/M3op0tRWhfAXqFOI1UXS1P7xPPkf4dujlibfTser9vqtQ4BCyXzZzyvlS9dQ7plw+ x8nwtVF2HTyKJ1fbcHbkXyWjw X-Received: by 2002:a05:6402:1014:: with SMTP id c20mr36763730edu.380.1625734413610; Thu, 08 Jul 2021 01:53:33 -0700 (PDT) X-Received: by 2002:a05:6402:1014:: with SMTP id c20mr36763691edu.380.1625734413381; Thu, 08 Jul 2021 01:53:33 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id u17sm853904edt.67.2021.07.08.01.53.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Jul 2021 01:53:32 -0700 (PDT) Subject: Re: [PATCH Part1 RFC v4 04/36] x86/mm: Add sev_feature_enabled() helper To: "Dr. David Alan Gilbert" , Brijesh Singh Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, linux-crypto@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Borislav Petkov , Michael Roth , Vlastimil Babka , tony.luck@intel.com, npmccallum@redhat.com, brijesh.ksingh@gmail.com References: <20210707181506.30489-1-brijesh.singh@amd.com> <20210707181506.30489-5-brijesh.singh@amd.com> From: Paolo Bonzini Message-ID: Date: Thu, 8 Jul 2021 10:53:29 +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: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 08/07/21 10:50, Dr. David Alan Gilbert wrote: >> +enum sev_feature_type { >> + SEV, >> + SEV_ES, >> + SEV_SNP >> +}; > Is this .... > >> diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h >> index a7c413432b33..37589da0282e 100644 >> --- a/arch/x86/include/asm/msr-index.h >> +++ b/arch/x86/include/asm/msr-index.h >> @@ -481,8 +481,10 @@ >> #define MSR_AMD64_SEV 0xc0010131 >> #define MSR_AMD64_SEV_ENABLED_BIT 0 >> #define MSR_AMD64_SEV_ES_ENABLED_BIT 1 >> +#define MSR_AMD64_SEV_SNP_ENABLED_BIT 2 > Just the same as this ? > No, it's just a coincidence. Paolo