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: Peter Fang <peter.fang@intel.com>, Yilun Xu <yilun.xu@intel.com>,
	 Elena Reshetova <elena.reshetova@intel.com>,
	Binbin Wu <binbin.wu@intel.com>,
	 Dave Hansen <dave.hansen@intel.com>,
	"kas@kernel.org" <kas@kernel.org>,
	 Vishal Annapurve <vannapurve@google.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	 "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: TDG quote analysis
Date: Thu, 17 Sep 2026 06:37:31 -0700	[thread overview]
Message-ID: <aqvtG90zWq6SkU8L@google.com> (raw)
In-Reply-To: <28f7a805c57da35d86b5c495cdf2b613a61d235e.camel@intel.com>

On Thu, Sep 17, 2026, Rick P Edgecombe wrote:
> On Wed, 2026-09-16 at 16:57 -0700, Sean Christopherson wrote:
> > > The current estimate is 10s of milliseconds for HW based, and
> > > milliseconds or less for CPU based.
> > 
> > I am beyond confused.
> 
> Sorry if this is another gap. Trying to find the right level to cover the
> important points. Did we not talk about S3M? 

We talked about S3M, it's the "CPU based" thing that confused me.  I wasn't aware
that manually doing "everything" in software, on the CPU, was an option.

> >   What is "HW based" versus "CPU based"?
> 
> "HW" is talking about the S3M thing. The quote operation could go directly to
> the S3M to get the quote. (HW based) Or it could get an intermediate key and

Get an intermediate key from where?  I assume this is a privileged key that can't
be exposed outside of the TDX-Module?  I.e. we can't hand that key to the guest
to let it complete the quoting process, in an inherently interruptible environment?

> generate quotes using CPU instructions. (SW based). Think like a crypto library
> in the TDX module.

That's not a library...

> > At this point, I don't care about the gory details, I just want to understand
> > the basics:
> > 
> >  - Does generating a quote require the CPU to actively execute instructions?
> >  - If not, how does software know when a quote is ready? 

I would still like an answer to this question.  Even if the end-to-end solution
isn't nailed down, I hope that the physical capabilities of the S3M are defined
enough to cover this.

> Oh man. There are actually a ton of attestation plans. I don't know which will
> become real. So these two behaviors we are enumerating are actually an editorial
> decision.
> 
> 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.

> 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.

  reply	other threads:[~2026-09-17 13:37 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 [this message]
2026-09-17 18:12                 ` Edgecombe, Rick P
2026-09-17 19:57                   ` Sean Christopherson
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=aqvtG90zWq6SkU8L@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