From: Peter Fang <peter.fang@intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: Rick P Edgecombe <rick.p.edgecombe@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>,
Vishal Annapurve <vannapurve@google.com>,
"kas@kernel.org" <kas@kernel.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: TDG quote analysis
Date: Mon, 21 Sep 2026 16:00:58 -0700 [thread overview]
Message-ID: <arG3KvaVqWCDAyM9@intel.com> (raw)
In-Reply-To: <aq2t5wJGLtsltMza@google.com>
On Fri, Sep 18, 2026 at 02:32:23PM -0700, Sean Christopherson wrote:
> On Fri, Sep 18, 2026, Rick P Edgecombe wrote:
> > On Fri, 2026-09-18 at 06:13 -0700, Sean Christopherson wrote:
> > > But given that you say "This idea came up before actually", maybe chunking
> > > the quote operation isn't a big lift?
> >
> > The idea that came up was to have a saved state are per-TD. But this only
> > eliminated concurrency issues in the SW based flow. In the future a HW based
> > flow would be S3M limited. Which is why I keep saying a redesigned solution
> > should be robust to concurrency limitations.
>
> IMO, that's the complete wrong way to look at this. HW-based is inherently
> serialized, it does NOT have concurrency, period. SW-based is has no inherent
> concurrency restrictions beyond existing CPU contention.
>
> Trying to find a perfect one-size-fits-all solution is impossible, because the
> problems with each are so very different. The problem you want to solve for
> SW-based is how to support preemption. The problem you want to solve for HW-based
^ more discussion below
> is how to hide the fact that someone in the future might think following AMD's
> lead and putting a precious resource into a tiny microprosser on a slow bus is a
> fantastic idea.
As shocking as it sounds, there are actually cloud providers out there
that are wanting this, or at the very least wanting to see how it goes
in real deployment. I think memory side channel attacks are a real
concern for some of them. But yeah this is not great from a performance
perspective.
>
> By creating these system-wide thread pools, TDX has effectively created a bizarre
> M:N scheduling problem, *and* introduced a completely avoidable noisy-neighbor
> problem.
Hmm... Then how about M:M? Then the problem can be reduced to 1:1. I
think it would take some TDX module investigative work to say for sure
what this would look like. But just throwing it out there as an idea?
>
> Assuming my understanding is (finally) correct, and the SW-based flows do all the
> work on the CPU, then the only way making the SW-based flows asynchronous adds
> value is if the host is willing to set aside CPU cores for such chores. And for
> the use cases where TDX makes sense, AFAIK no CSP *wants* to do that. Not to
> mention the RFC doesn't even support that, because KVM doesn't resume the vCPU
> until the quote is ready.
There was also the fairness/starvation problem at play. In RFC if the
vCPU thread waited on the lock (say using down_timeout(), or even some
kind of fancier waitqueue) and gave it up to reenter TD to handle a
guest interrupt, it would have to retry the lock again later. And then
there would be preemption-retry livelock risks. Moving this lock into
the TDX module could still create the same problem, because basically
the guest would be re-calling the TDCALL after preemption instead. So I
think there would need to be some sort of additional smarts to handle
both preemption and fairness at the same time.
>
> > But now I'm wondering what your specific interest is. It seems you have more
> > interest in non-KVM in-the-loop guest side latency than you did on host side.
> > Which is fine. But it makes me want to double check: You want an average and
> > worse case latency for the first DICE attestation "SW" flow?
>
> I care about future me not getting pulled into a customer issue because a vCPU
> got waylaid by a system-wide mutex for multiple seconds.
I think quoting is typically a once-per-TD-boot type of thing. Or it is
not usually expected to happen very often in a TD. Can you share what
kind of performance expectations you have for this? E.g. is seeing a
high steal time during TD boot a non-starter?
Thanks,
Peter
next prev parent reply other threads:[~2026-09-21 23:01 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
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 [this message]
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=arG3KvaVqWCDAyM9@intel.com \
--to=peter.fang@intel.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=rick.p.edgecombe@intel.com \
--cc=seanjc@google.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