[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM8PR11MB575085570AF48AF4690986EDE782A@DM8PR11MB5750.namprd11.prod.outlook.com>
Date: Thu, 30 Nov 2023 07:08:00 +0000
From: "Reshetova, Elena" <elena.reshetova@...el.com>
To: Borislav Petkov <bp@...en8.de>,
Jeremi Piotrowski <jpiotrowski@...ux.microsoft.com>
CC: "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"stefan.bader@...onical.com" <stefan.bader@...onical.com>,
"tim.gardner@...onical.com" <tim.gardner@...onical.com>,
"roxana.nicolescu@...onical.com" <roxana.nicolescu@...onical.com>,
"cascardo@...onical.com" <cascardo@...onical.com>,
"kys@...rosoft.com" <kys@...rosoft.com>,
"haiyangz@...rosoft.com" <haiyangz@...rosoft.com>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
"sashal@...nel.org" <sashal@...nel.org>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"H. Peter Anvin" <hpa@...or.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"Ingo Molnar" <mingo@...hat.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Michael Kelley <mhkelley58@...il.com>,
Nikolay Borisov <nik.borisov@...e.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Tom Lendacky <thomas.lendacky@....com>,
"x86@...nel.org" <x86@...nel.org>,
"Cui, Dexuan" <decui@...rosoft.com>
Subject: RE: [PATCH v1 1/3] x86/tdx: Check for TDX partitioning during early
TDX init
> On Wed, Nov 22, 2023 at 06:19:20PM +0100, Jeremi Piotrowski wrote:
> > Which approach do you prefer?
>
> I'm trying to figure out from the whole thread, what this guest is.
>
> * A HyperV second-level guest
>
> * of type TDX
>
> * Needs to defer cc_mask and page visibility bla...
>
> * needs to disable TDX module calls
>
> * stub out tdx_accept_memory
>
> Anything else?
>
Actually I want to challenge the whole notion that a TDX partitioning L2
guest is a TDX guest. By the definition of the TDX partitioning spec,
L2 guest can be anything and L1 VMM can emulate any environment
for its L2 guests, including running a fully unmodified TDX 1.0 guest
(and virtualizing TDG calls for it and whatever else is needed).
So we are really talking about a big spectrum of possible L2 guests:
1. Normal legacy guest without *any* TDX knowledge
2. Normal legacy guest with some awareness of TDX partitioning (note, not TDX 1.0 aware!)
(being able to do tdvmcalls to L0, being able to use shared memory,
being able to use tdx partitioning specific paravirt interface to L1 if defined, etc)
...
3. Normal TDX 1.0 guest that is unaware that it runs in partitioned environment
4. and so on
I don’t know if AMD architecture would support all this spectrum of the guests through.
If it does, then we can discuss this vendor agnostic, which is much better.
Given that the many possible combinations of the L2 guests (and as Kai rightfully
pointed out, each option will be further broken down by what exactly interface
L1 VMM decides to expose to the guest), I think we cannot hardcode any logic
about what this partitioned guest is in the guest itself.
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.
Best Regards,
Elena.
Powered by blists - more mailing lists