Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4194653pxb; Mon, 21 Feb 2022 14:29:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCaf2p2rrvIOrthWPUq6aaztZiqeWwZVvqN2Ao5gx9hz3vSlTOw5Aazr7ym9A/B+0bclzM X-Received: by 2002:a17:906:3a55:b0:6ce:c2ee:3e10 with SMTP id a21-20020a1709063a5500b006cec2ee3e10mr16904557ejf.210.1645482575801; Mon, 21 Feb 2022 14:29:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645482575; cv=none; d=google.com; s=arc-20160816; b=rnTEfwJNfool9rwKB/e2CdeqJV+K+UBdUUVqJy+DDCDGI7qNoYIO5/7aEAchEITlVP cK1HwjWuX/YEauFoHcpgtwCYgK6Zhl1hKnIo448gDEFXEz3Ax9uSVF3ABXc7D2axFnJr x+/8IaSlR6XaDkXcixdzmgTMkXGcTOR18WQMoyszFL5E/OCKic3nuN+VUnC6WiC2JgDV ot3Nd8xt31jfuqJtRzuQH1Z3GI/69+RqmxSAbxQRf2u0755Tqs1Kfdla5Z6bPcga9e8o WjKgP5cEcEHCqz4etafrMbm6VaFgu6MiQjTkJslc9hr3M+dFIgBPbkCrPTBjm1a/J5NJ hzQg== 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=FVZxpUvN+zstZFcKDqV/8zmg5Gk1qj5hbIIYrPrX9Ls=; b=ZnZ6epZK4DeDBbyQhxjIpZaClD/Bjrxvkd13cAPYr7+4SsAhZXXQbEZbVNXcC+9B0q 3aurXaSN/xsymBrGi9hp6FVU6RgZl98PsSAiPujdY5qcqNWe8DdvVJA3MtucqK9tmSVE TFUoulSm0E3Nlg5CwZHDSvYqGq7AEYGB6QD5jkkDZjAHAaA5XUiiTyMF38n6O9aCGI8/ ldjjx4Q4ome35/L7GTdU4Bmxyp+YZGewgC26ZXtMIovgnvcRZazye7WgFoXc9lMq4TA1 rM5ZE5vk25A+kbZKBw/1SqkoMjlDU1Jb1wq5xENm8KDz9LTcemZtae9FfaNBh9LdRzyq zhFA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7si9429981eju.675.2022.02.21.14.29.13; Mon, 21 Feb 2022 14:29:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376747AbiBUNxf (ORCPT + 99 others); Mon, 21 Feb 2022 08:53:35 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:51168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377097AbiBUNx3 (ORCPT ); Mon, 21 Feb 2022 08:53:29 -0500 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6B4DBF73; Mon, 21 Feb 2022 05:53:01 -0800 (PST) Received: by mail-wm1-f47.google.com with SMTP id m126-20020a1ca384000000b0037bb8e379feso13599373wme.5; Mon, 21 Feb 2022 05:53:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FVZxpUvN+zstZFcKDqV/8zmg5Gk1qj5hbIIYrPrX9Ls=; b=kMwnYDDdmuiMBqOOuLMuOOk7Xj4jMoxY6TOtyv9H8GQv3AKqwLHyJXeb9b7zbx4Dem ViIGex0cpSZ1qtitJuHECvJUWMgC9Fu/ZDm4T6XCDinxEs1S8vYv4Feb1mlOvmQZ7dc4 +ug0+B9qiYCIOemXLCz6NECYKhviksnLW+TvM7plElyhH7u805qokUQAX17TgWs+78qO 6kZyRZg2sIjB6D7qtA0YgNiWxHK79hfZlVrk3LBrImsrX/dKw0K5XCUcE7FX1NjVTEgC rQ+r4JvsMKXSRUvMR2olp9efx+qrE8+54k1Hqae8bTBrWXQupghJlXRtu8ywRS/HmfYi unNQ== X-Gm-Message-State: AOAM533WuUpkp3lGCT74WM3KbRWLO5k5CYuH0oNPbU5BfpyOnw6cU7CV QZFPjDI47A/JibXVXXSos+s= X-Received: by 2002:a7b:c19a:0:b0:37b:c68c:7162 with SMTP id y26-20020a7bc19a000000b0037bc68c7162mr20931277wmi.7.1645451580286; Mon, 21 Feb 2022 05:53:00 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id c9sm30128821wrn.51.2022.02.21.05.52.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 05:52:59 -0800 (PST) Date: Mon, 21 Feb 2022 13:52:58 +0000 From: Wei Liu To: Borislav Petkov Cc: "Kirill A. Shutemov" , aarcange@redhat.com, ak@linux.intel.com, dan.j.williams@intel.com, dave.hansen@intel.com, david@redhat.com, hpa@zytor.com, jgross@suse.com, jmattson@google.com, joro@8bytes.org, jpoimboe@redhat.com, kirill.shutemov@linux.intel.com, knsathya@kernel.org, linux-kernel@vger.kernel.org, luto@kernel.org, mingo@redhat.com, pbonzini@redhat.com, peterz@infradead.org, sathyanarayanan.kuppuswamy@linux.intel.com, sdeep@vmware.com, seanjc@google.com, tglx@linutronix.de, tony.luck@intel.com, vkuznets@redhat.com, wanpengli@tencent.com, x86@kernel.org, linux-hyperv@vger.kernel.org, Brijesh Singh , Tom Lendacky , Wei Liu Subject: Re: [PATCHv3.1 2/32] x86/coco: Explicitly declare type of confidential computing platform Message-ID: <20220221135258.4qcpt6i2zaou7ygm@liuwe-devbox-debian-v2> References: <20220219001305.22883-1-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 21, 2022 at 12:07:15PM +0100, Borislav Petkov wrote: > On Sat, Feb 19, 2022 at 03:13:04AM +0300, Kirill A. Shutemov wrote: [...] > > diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c > > index 5a99f993e639..d77cf3a31f07 100644 > > --- a/arch/x86/kernel/cpu/mshyperv.c > > +++ b/arch/x86/kernel/cpu/mshyperv.c > > @@ -33,6 +33,7 @@ > > #include > > #include > > #include > > +#include > > > > /* Is Linux running as the root partition? */ > > bool hv_root_partition; > > @@ -344,6 +345,8 @@ static void __init ms_hyperv_init_platform(void) > > */ > > swiotlb_force = SWIOTLB_FORCE; > > #endif > > + if (hv_get_isolation_type() != HV_ISOLATION_TYPE_NONE) > > + cc_init(CC_VENDOR_HYPERV); > > Isn't that supposed to test HV_ISOLATION_TYPE_SNP instead? > > I mean, I have no clue what HV_ISOLATION_TYPE_VBS is. It is not used > anywhere in the tree either. > > a6c76bb08dc7 ("x86/hyperv: Load/save the Isolation Configuration leaf") > calls it "'VBS' (software-based isolation)" - whatever that means - so > I'm not sure that is going to need the cc-facilities. > Hi Boris and Kirill, I only see VBS mentioned here so I don't have much context, but VBS likely means virtualization-based security. There is a public document for it. https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/oem-vbs Whether it needs a new isolation type or not, I am not sure. Perhaps Tianyu can provide more context. Thanks, Wei.