Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4414393pxb; Mon, 21 Feb 2022 20:51:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4V1Mn3DfiMDp3TbdJGwbqk/xjMn0WULa0Kv3PvdPdobK6a7S0UMBNu1yqcpAqDjEZA/Ms X-Received: by 2002:a17:902:ce92:b0:14d:7ece:57d5 with SMTP id f18-20020a170902ce9200b0014d7ece57d5mr20958262plg.128.1645505478975; Mon, 21 Feb 2022 20:51:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645505478; cv=none; d=google.com; s=arc-20160816; b=CfVa2XwUrQHxPawPWw3Ad5jI3CKhzU8vfmY5e2YPmXYQeEx74AOVN4RMZBGZ+i/JkM W6j8x3EJLbxssAGwU8YgNSd3Az303LJFzHgqd58si5sAlfsYQnnH2+MIuPkJRwaarssS 1uGCNMD0IDsNqm2vhUnG3yNbO3E1uR4AibSCbKtOzly5LJ1c8RQa7ShVIkPqOSKpUtqO pPnRQbqy9LOnIszFFpxfrXIUfKjW0UgJCUqRNB6Q9povunaUpS7APTHYifwJOwFR83uG upQSMh3C/xHW8z69wi3sLfIgBY7PzoyEtWHTW80+NVeJ4F9N4yNNbRzbfzgb4307ftGX Apsw== 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=zDIc3xVfWbo5IjAWvE1tHZ9pOiAa0b5qEOmvm2R1bzY=; b=sgs2A1co3owSWqnaFZH7s2muLg5clfWTIF+Nqsn5fc9AExm2CuThmm17J8coU7WuB9 ss2GN23s6apHl8qfsIw28KoCMt0rn0zXfvd4mKzvs1c8nzHrBMfy9ZZxRcQ/+sy1vVAj A0PUSanokbmNUqzrbDvVDDE2a1L5DT8X2Po6qvC/z1lCeqvXLUIWBxvigAtIpflWYwnQ aEVlWmXRIaS0bPf+3L2OwKlHFUggFD+DeiMY1dV4Num7laCg7JM690HoCFwYJU1TnUhd JsEFYAvF+NV2ttecrx1aQG7nMfCGyaKZIRtS9f4Ckb0dmF2U3O2JZa1MU9tm8tbGCwpf fLtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=qzH19tZ0; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s193si19334820pgs.318.2022.02.21.20.51.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 20:51:18 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=qzH19tZ0; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 87E6B652C8; Mon, 21 Feb 2022 20:31:47 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233590AbiBUUUw (ORCPT + 99 others); Mon, 21 Feb 2022 15:20:52 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231770AbiBUUUu (ORCPT ); Mon, 21 Feb 2022 15:20:50 -0500 X-Greylist: delayed 33190 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 21 Feb 2022 12:20:27 PST Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D3581A399; Mon, 21 Feb 2022 12:20:27 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (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 90EE41EC0528; Mon, 21 Feb 2022 21:20:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1645474821; 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=zDIc3xVfWbo5IjAWvE1tHZ9pOiAa0b5qEOmvm2R1bzY=; b=qzH19tZ0NaCE5i1oWt38rEc81Idc+VMM/750Es4yLy3SK/SHSi10wRAG+kJs7qTHc5aRhj /6+oKt7MKDLC3ZpOS5+dQLKjnUSakPnTc/UaemiU8w33yFvvc8A57gf3DSyjSh/hD4svLt bdTx4EgrJK0lf/Hlgzqep8+noDYY34Y= Date: Mon, 21 Feb 2022 21:20:25 +0100 From: Borislav Petkov To: Wei Liu 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 Subject: Re: [PATCHv3.1 2/32] x86/coco: Explicitly declare type of confidential computing platform Message-ID: References: <20220219001305.22883-1-kirill.shutemov@linux.intel.com> <20220221135258.4qcpt6i2zaou7ygm@liuwe-devbox-debian-v2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220221135258.4qcpt6i2zaou7ygm@liuwe-devbox-debian-v2> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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 01:52:58PM +0000, Wei Liu wrote: > 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. Right, this came in with c789b90a6904 ("x86/hyper-v: Add hyperv Isolation VM check in the cc_platform_has()") which says Hyper-V provides Isolation VM for confidential computing support and guest memory is encrypted in it. Places checking cc_platform_has() with GUEST_MEM_ENCRYPT attr should return "True" in Isolation VM. I'm guessing this was done because you "need to adjust the SWIOTLB size just like SEV guests." So my question is, does this VBS thing do guest memory encryption or does it only use hw virt features? Because you guys have HV_ISOLATION_TYPE_SNP already. And so, the check hv_get_isolation_type() != HV_ISOLATION_TYPE_NONE; includes VBS because VBS is only interested in the SWIOTLB buffer size adjustment and not the rest of the cc_* stuff. Or? But let's see what Tianyu says. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette