Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Rick P Edgecombe <rick.p.edgecombe@intel.com>
Cc: Yilun Xu <yilun.xu@intel.com>,
	Elena Reshetova <elena.reshetova@intel.com>,
	 Binbin Wu <binbin.wu@intel.com>,
	Dave Hansen <dave.hansen@intel.com>,
	 Vishal Annapurve <vannapurve@google.com>,
	"kas@kernel.org" <kas@kernel.org>,
	 "pbonzini@redhat.com" <pbonzini@redhat.com>,
	Peter Fang <peter.fang@intel.com>,
	 "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: TDG quote analysis
Date: Thu, 17 Sep 2026 12:57:43 -0700	[thread overview]
Message-ID: <aqxGN2Zc8sOl2RKx@google.com> (raw)
In-Reply-To: <3f97caf660cbe460b8bbaf3f2a72e4b6a3ea83d9.camel@intel.com>

On Thu, Sep 17, 2026, Rick P Edgecombe wrote:
> On Thu, 2026-09-17 at 06:37 -0700, Sean Christopherson wrote:
> > > The software based flow would be expected to first. It would involve the CPU
> > > doing crypto stuff as above. 
> > > 
> > > Then a HW based flow where the crypto happens on the limited HW resource. This
> > > is where full parallelization is not possible, because the CPU is not doing the
> > > heavy work. You might want this one instead for security reasons. But the main
> > > point of discussing it is that you could expect some quotes to take a long time
> > > and support a limited number of parallel quotes.
> > 
> > It's not just the raw time that matters, where/how that time is spent also matters
> > greatly.  There is a *massive* difference between "fire off an operation and get a
> > notification" and "churn on crypto stuff for the entire time", especially when the
> > thing churning on crypto stuff isn't interruptible by default.
> 
> In general, S3M is described as a mailbox. So my understanding is that the CPU
> is not churning while S3M works. More below.
> 
> > 
> > > But neither of these solutions are actually nailed down yet. How should a off-
> > > cpu based flow work? We can discuss it. I'd think to have some interface that
> > > doesn't require guest changes all the time. Focusing on something that just
> > > supports long quotes seems the most robust.
> > 
> > No, because they are wildly different beasts.  This is basically like comparing
> > zswap and traditional swap; yes, they're both swap, but they have *very* different
> > characteristics that need to be accounted for at the system level.  Now make the
> > zswap (de)compression code completely uninterruptible.  The whole problem space
> > changes, because either the host has to be ok with a CPU "disappearing" for an
> > extended duration, or the interface needs to be reworked to make the swap sequence
> > restartable.
> > 
> > It sounds to me like y'all need to take a step back and nail down your customer
> > requirements, including what is tolerable latency from the guest perspective.
> > 
> > FWIW, if S3M quoting isn't I/O-like, i.e. isn't fire and get notified, then IMO
> > it's completely broken and likely unusable.
> 
> Let's take a step back here. There is an existing attestation flow that was
> designed around some limitations that are changing (specifically whether the
> quoter has knowledge of the TD). The current host side quote discussion (KVM
> ioctl) is basically a straight forward evolution of the existing design, even
> though the limitations are getting removed.
> 
> You asked whether we could do a re-design that makes more sense in the context
> of the lack of that old limitation. At that point we are faced with the age-old
> question: how far into the fuzzy future should we design around?

Now I'm trying to understand what the *current* plan is.

> The nearest term thing is a SW based flow where work happens on the CPU. But the
> exact amount of time is not know yet. Peter gave a ballpark.

Why are we even discussing this?  I am so confused.  I thought there were two
options: SGX and S3M.  Now all of a sudden there's a third "let's do insane things
in software in the TDX module" option!?!?

> A future thing is a flow where S3M is engaged for every quote. That would be
> expected to take longer, and have greater limits on concurrency. But the details
> are not sorted on what exactly the user will want, or how it would be
> implemented.
> 
> I think you are maybe wondering whether S3M could be used such that the guest
> could wait on a quote while not needing any saved state area? 

I'm trying to figure out if *any* path is viable.

Burning 1ms of CPU time to generate a quote in uninterruptible code is a non-starter.
Hell, 100us is a non-starter.

Waiting 2s for a quote to come back from the S3M is a non-starter.

The numbers matter, and *none* of this is reviewable, even in RFC format, without
a crisp understanding of what latencies we are talking about.

> If you want to know more about S3M we can round up some more info on it.
> There are some public docs on it, but the intel link seems to be dead.
> 
> AFAICT, outside of TDX and just in the world in general, crypto is in a
> transition phase. I read this interesting article on lwn awhile back about
> "hybrid crypto" to add safety during the transition:
> https://lwn.net/Articles/1048978/
> Not trying to toss FUD here, but I'm imagining all the combinations of CPU or
> S3M work that could possibly come up unpredictably.
> 
> If we want a redesign for TDX attestation, I think we shouldn't fall into the
> trap of designing everything up front before taking the next near term step. We
> should either stick with the current approach (guest report and host quote).

Forget redesigning anything, I want to know if there's a path forward with *any*
design based on the limitations of hardware.

  reply	other threads:[~2026-09-17 19:57 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16  0:48 TDG quote analysis Edgecombe, Rick P
2026-09-16 18:00 ` Sean Christopherson
2026-09-16 18:49   ` Edgecombe, Rick P
2026-09-16 19:27     ` Sean Christopherson
2026-09-16 22:31       ` Edgecombe, Rick P
2026-09-16 23:00         ` Peter Fang
2026-09-16 23:57           ` Sean Christopherson
2026-09-17  0:56             ` Edgecombe, Rick P
2026-09-17 13:37               ` Sean Christopherson
2026-09-17 18:12                 ` Edgecombe, Rick P
2026-09-17 19:57                   ` Sean Christopherson [this message]
2026-09-17 21:32                     ` Edgecombe, Rick P
2026-09-18  0:04                       ` Sean Christopherson
2026-09-18  2:39                         ` Edgecombe, Rick P
2026-09-18 13:13                           ` Sean Christopherson
2026-09-18 18:12                             ` Edgecombe, Rick P
2026-09-18 21:32                               ` Sean Christopherson
2026-09-21 23:00                                 ` Peter Fang
2026-09-21 23:06                                   ` Dave Hansen
2026-09-23  4:09                                     ` Vishal Annapurve
2026-09-24  0:03                                       ` Vishal Annapurve
2026-09-24  0:18                                         ` Sean Christopherson
2026-09-24  0:44                                           ` Edgecombe, Rick P
2026-09-24 16:28                                             ` Sean Christopherson
2026-09-21 23:04                                 ` Dave Hansen
2026-09-21 23:19                                   ` Sean Christopherson
2026-09-21 23:36                                     ` Dave Hansen
2026-09-21 23:46                                       ` Sean Christopherson
2026-09-22  0:03                                         ` Dave Hansen
2026-09-22  6:48                                           ` Reshetova, Elena
2026-09-22 17:07                                             ` Edgecombe, Rick P
2026-09-23  8:50                                               ` Reshetova, Elena
2026-09-23 22:50                                                 ` Peter Fang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aqxGN2Zc8sOl2RKx@google.com \
    --to=seanjc@google.com \
    --cc=binbin.wu@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=elena.reshetova@intel.com \
    --cc=kas@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.fang@intel.com \
    --cc=rick.p.edgecombe@intel.com \
    --cc=vannapurve@google.com \
    --cc=yilun.xu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox