Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp134202rdb; Wed, 29 Nov 2023 23:56:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IHI8OUZkBs1Pbd2kYMyb3p+OnGK+WdSXrwglWyRXfmoDiGOfmCTlFT3ocAHlLfB41X8kFaJ X-Received: by 2002:a17:902:f80d:b0:1cf:b2a1:3a87 with SMTP id ix13-20020a170902f80d00b001cfb2a13a87mr17954769plb.56.1701331010613; Wed, 29 Nov 2023 23:56:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701331010; cv=none; d=google.com; s=arc-20160816; b=YDSK/Bt0279PMlPBYqw9IscW3atUR+wTQK1rcZYZF8Pxd9eaqtzImRJTKRapudnzTJ WQhZwBHVhTvITbwGZan4g/JvlKv9kUHKVbsUatHP/8vJoo10YHVVPCarCOrjI9uOZ51t ajFzT3ZRBx9mgR75gSTtJ2PJWJByo2C9z1WMWQXIfug11dZiUjvUemK//sPYrMLFzilV DLkgV3fLEIjkPYHgJwfRW3PI7o0Qp5RuXrksIhTcVutK4JHPMBXOjgwEnfRf55dVTyWX HrP2LPYdfblG63AZRe3bmqsc//eWmesbt6FjmRQWVp+SZR1btEdToxNM+037TfQAynoF rjVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=zZnaCQ7TnFb6KTuT0cZgm2QhLBho4rCbhfrHl0kDdIg=; fh=sxxqwWms8CvQoymmdr/hBI+buPCl5SfmSXQFDg3o1Rw=; b=updVATHTtTSyGohLdnXUmD1lG6fTpqY1kW5h3ik0KcP2WHC7KPQREPF2MgNrxgGW69 I/pFjIuqJRzSvXzLT6qmE4XywRCAeDw9K7f+1TmBJnZhST1Ss4Ud3UZWpDmE7Fx182b4 FcOUphrYsmNCAmHx7RRmcWVSX583zoLM5NjdsUGaKzHjQVVkJIoeJRpkMewaE4OBTkOR VC2UrS0vIPMhVc2SVz2MYKzGTgWS42drapNBqVcNNvnkOvVLmuKN2v4GkJLnSCSJLK++ hR1smLQ44jkwKPFJEwa0AhfAhGRHWscIZ+rfOkSKymdC89N68DuhuRCvSG+KVQgBvZPV OixA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@alien8.de header.s=alien8 header.b=NUrLj9xK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id u17-20020a170903125100b001cfb4a89e6esi698969plh.145.2023.11.29.23.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 23:56:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@alien8.de header.s=alien8 header.b=NUrLj9xK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id F3875803A43E; Wed, 29 Nov 2023 23:56:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231764AbjK3H4c (ORCPT + 99 others); Thu, 30 Nov 2023 02:56:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231770AbjK3H4b (ORCPT ); Thu, 30 Nov 2023 02:56:31 -0500 Received: from mail.alien8.de (mail.alien8.de [IPv6:2a01:4f9:3051:3f93::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 082BB10E4; Wed, 29 Nov 2023 23:56:35 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 9498B40E01AD; Thu, 30 Nov 2023 07:56:32 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=fail (4096-bit key) reason="fail (body has been altered)" header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CqZrUbaGhUPy; Thu, 30 Nov 2023 07:56:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1701330989; bh=pty/QeuGUmpYXInNRrtIMj4sinYv5Ho0tbtAiY+I4nk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NUrLj9xKcbFRU3Z/9polkEDy5s9n7rXwYOmomhXvHmjja9dl0kzWpDhKnNQ4tJjBb S1icYjQ88y7PX6mOzMEG8i0AGKUqe1Z6nuz0BcKWAf3ULjcGayobHoUfxAFT6SrZfm aoZnmaoWe82KA22gBfJEfOq3YC7p+CmdJ/4YCuci2TI2TngGin8wI/EyHVE/ocbutt nxhxhBeNpifUM2xZ4mLHWQiFbvtw6sM66hm9bACOBmqXddwaZOJ9bo8AF94mZtOxkx vPKrzE7iD+X4mk3AO1pxInmnj8CJ9faAigehTqYt31dUFh1dUMBaTk6H3g1hH5mqMH bl8CD7vI3gcrjpu4KO4wPKzGu6+fh4duacgliwp3mwjDi9d89DmvjXJAVRiLLAhYWz Ml0xglzJyo7L1TPqORPplHBtCnTA6jkMBz9mA9OJAWbI+rLGKm605V+E4hGqmN1YGC ZC/AWbSgwL4EfTt4KNtSyPe9RBXa8UYGt03LyW6kk7iuJ6/++NW1b+pprjTvyfFDHz cGzPIyRNNrZ888plGz66YVDPs1+J+k/AuYfpQorua5kZ3fZTnrbuT4DNaXLjTMg2jR ZH+6Hzzo1noZgtbjS1zZShDZA0Vv6YjaYpMbhMLZ6cKPH4n/n4GDctpEOoar97S7v6 Os3Q3LyAF6kdVG39hG73YSYY= Received: from zn.tnic (pd95304da.dip0.t-ipconnect.de [217.83.4.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id CA13240E025A; Thu, 30 Nov 2023 07:56:04 +0000 (UTC) Date: Thu, 30 Nov 2023 08:55:59 +0100 From: Borislav Petkov To: "Reshetova, Elena" Cc: Jeremi Piotrowski , "linux-hyperv@vger.kernel.org" , "stefan.bader@canonical.com" , "tim.gardner@canonical.com" , "roxana.nicolescu@canonical.com" , "cascardo@canonical.com" , "kys@microsoft.com" , "haiyangz@microsoft.com" , "wei.liu@kernel.org" , "sashal@kernel.org" , "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "H. Peter Anvin" , Dave Hansen , Ingo Molnar , "Kirill A. Shutemov" , Michael Kelley , Nikolay Borisov , Peter Zijlstra , Thomas Gleixner , Tom Lendacky , "x86@kernel.org" , "Cui, Dexuan" Subject: Re: [PATCH v1 1/3] x86/tdx: Check for TDX partitioning during early TDX init Message-ID: <20231130075559.GAZWhAD5ScHoxbbTxL@fat_crate.local> References: <20231122170106.270266-1-jpiotrowski@linux.microsoft.com> <0799b692-4b26-4e00-9cec-fdc4c929ea58@linux.microsoft.com> <20231129164049.GVZWdpkVlc8nUvl/jx@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 29 Nov 2023 23:56:48 -0800 (PST) On Thu, Nov 30, 2023 at 07:08:00AM +0000, Reshetova, Elena wrote: > ... > 3. Normal TDX 1.0 guest that is unaware that it runs in partitioned > environment > 4. and so on There's a reason I call it a virt zoo. > I don=E2=80=99t know if AMD architecture would support all this spectru= m of > the guests through. I hear threats... > Instead we should have a flexible way for the L2 guest to discover > the virt environment it runs in (as modelled by L1 VMM) and the > baseline should not to assume it is a TDX or SEV guest, but assume > this is some special virt guest (or legacy guest, whatever approach > is cleaner) and expose additional interfaces to it. You can do flexible all you want but all that guest zoo is using the kernel. The same code base which boots on gazillion incarnations of real hardware. And we have trouble keeping that code base clean already. Now, all those weird guests come along, they're more or less "compatible" but not fully. So they have to do an exception here, disable some feature there which they don't want/support/cannot/bla. Or they use a paravisor which does *some* of the work for them so that needs to be accomodated too. And so they start sprinkling around all those "differences" around the kernel. And turn it into an unmaintainable mess. We've been here before - last time it was called "if (XEN)"... and we're already getting there again only with two L1 encrypted guests technologies. I'm currently working on trimming down some of the SEV mess we've already added... So - and I've said this a bunch of times already - whatever guest type it is, its interaction with the main kernel better be properly designed and abstracted away so that it doesn't turn into a mess. Thx. --=20 Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette