Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp15469090rwb; Mon, 28 Nov 2022 11:59:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf5rYoI5thQgc2/Kvd9HT+tGiV6WOio6Twzfcsaum1jqYqxPn27pSolz05imHMc/qZua5gRZ X-Received: by 2002:a17:90a:b011:b0:20a:97e2:5373 with SMTP id x17-20020a17090ab01100b0020a97e25373mr55013943pjq.200.1669665572057; Mon, 28 Nov 2022 11:59:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669665572; cv=none; d=google.com; s=arc-20160816; b=SwkD68MRdOwu3+2rQCf/1hjvSK2c8eQJdFsWS4+6BWm/Tm6sB6Nfql5j3OtraoqMRK gi1NLhHCrZIXZgTrYPhiauO+A0waBKZs800Yl06o9H4gnHhvV1g3X7nzWzM7z2KXykYU ORn9aOxsnja692E3T+NYs3wRDNONxJvrItYNSbpEncT6YN+u5SMVu5JbGyIEGzPg5u3b 6naR1sA+kvDpY0yWl67Jc/Y4Wn6Vlux+EW7hhb9IYwp2nBYriTnen+apd26VwzhigR3w LWw6zz5atSbC453c+0oguUjeg8AWKUc2DLGhSLMwsKTCSfZ4Orb8ablM3q9yNkhXJ7wY JtkA== 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=BLpY38TW6Yt4fLZvLKrYAXJTm4+nIuDp4DdS3ewgJM4=; b=AFK+oigPLg31Z0ht/mTez1IJbNP6yv36l3ivacpXxq80eq9L6r7yDCN1KGop1alXIT 7gJIC9wz1FedAWtSew3IMWF2AcJ5cdVbgXTD3wFz7w7pPTJDdEH4C+0RudSi3sEXCeQI f+ctVjqn/z/uWNQNAENHBiCdvXPVaa97z+vk5Dzp0JDePRr3Gn9C28OVT+c5/i3QGYTn HdUO0yO95Cav9GksU5Fl2XrKNoJoOrM1HRhA0DFJgawlUJ0MQSoH38CfBZaEn+l9YESs fdBIatmDzQDjrpVtL6X3n88SZ/YQohGqv7ltlnXOdtilZ9pU6EKZtYU/Y8fyQN2l96kT u99w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=SzUkoQD0; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z15-20020a170902cccf00b00186658e50desi13080321ple.465.2022.11.28.11.59.19; Mon, 28 Nov 2022 11:59:32 -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; dkim=pass header.i=@alien8.de header.s=dkim header.b=SzUkoQD0; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233648AbiK1T4i (ORCPT + 85 others); Mon, 28 Nov 2022 14:56:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232847AbiK1T4g (ORCPT ); Mon, 28 Nov 2022 14:56:36 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57DC5205E1; Mon, 28 Nov 2022 11:56:33 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (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 495071EC04AD; Mon, 28 Nov 2022 20:56:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1669665392; 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=BLpY38TW6Yt4fLZvLKrYAXJTm4+nIuDp4DdS3ewgJM4=; b=SzUkoQD02Ul+NHN9XkR7Cor4g96wZB7Ea9lf4RS2CsKCE4GMsSCz5ahCbcqmSJf4+b88NF VQgylDCkHGC6pztQnrvKZnQiVwSvrY/14xKcJCA50gzj4xAhzOphJwff2zYvoeA/LMOwks fD+B+VVUkjSHEf+m9XQHbIaSctj9T78= Date: Mon, 28 Nov 2022 20:56:31 +0100 From: Borislav Petkov To: "Michael Kelley (LINUX)" Cc: "hpa@zytor.com" , KY Srinivasan , Haiyang Zhang , "wei.liu@kernel.org" , Dexuan Cui , "luto@kernel.org" , "peterz@infradead.org" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "lpieralisi@kernel.org" , "robh@kernel.org" , "kw@linux.com" , "bhelgaas@google.com" , "arnd@arndb.de" , "hch@infradead.org" , "m.szyprowski@samsung.com" , "robin.murphy@arm.com" , "thomas.lendacky@amd.com" , "brijesh.singh@amd.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "dave.hansen@linux.intel.com" , Tianyu Lan , "kirill.shutemov@linux.intel.com" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "ak@linux.intel.com" , "isaku.yamahata@intel.com" , "Williams, Dan J" , "jane.chu@oracle.com" , "seanjc@google.com" , "tony.luck@intel.com" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-pci@vger.kernel.org" , "linux-arch@vger.kernel.org" , "iommu@lists.linux.dev" Subject: Re: [Patch v3 07/14] x86/hyperv: Change vTOM handling to use standard coco mechanisms Message-ID: References: <1668624097-14884-8-git-send-email-mikelley@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham 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, Nov 28, 2022 at 05:55:11PM +0000, Michael Kelley (LINUX) wrote: > But vendor AMD effectively offers two different encryption schemes that > could be seen by the guest VM. The hypervisor chooses which scheme a > particular guest will see. Hyper-V has chosen to present the vTOM scheme > to guest VMs, including normal Linux and Windows guests, that have been > modestly updated to understand vTOM. If this is a standard SNP guest then you can detect vTOM support using SEV_FEATURES. See this thread here: https://lore.kernel.org/r/20221117044433.244656-1-nikunj@amd.com Which then means, you don't need any special gunk except extending this patch above to check SNP has vTOM support. > In the future, Hyper-V may also choose to present original AMD C-bit scheme > in some guest VMs, depending on the use case. And it will present the Intel > TDX scheme when running on that hardware. And all those should JustWork(tm) because we already support such guests. > To my knowledge, KVM does not support the AMD vTOM scheme. > Someone from AMD may have a better sense whether adding that > support is likely in the future. Yah, see above. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette