From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "moe@flashbots.net" <moe@flashbots.net>
Cc: "x86@kernel.org" <x86@kernel.org>,
"kas@kernel.org" <kas@kernel.org>,
"Miao, Jun" <jun.miao@intel.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"sathyanarayanan.kuppuswamy@linux.intel.com"
<sathyanarayanan.kuppuswamy@linux.intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Aktas, Erdem" <erdemaktas@google.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"thomas.lendacky@amd.com" <thomas.lendacky@amd.com>,
"linux-coco@lists.linux.dev" <linux-coco@lists.linux.dev>,
"djbw@kernel.org" <djbw@kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [🚨ext] Re: [PATCH v3 0/2] virt: tdx-guest: Fix and speed up the wait for a Quote
Date: Wed, 18 Nov 2026 01:28:20 +0000 [thread overview]
Message-ID: <86f99f3010775eeff6269fd9bb8f4edac10a7d85.camel@intel.com> (raw)
In-Reply-To: <CAKV3HMMfx4APmardWdtL8yhirXMuuBQMZ8xrtowHNRnTKXNRiw@mail.gmail.com>
On Sat, 2026-11-14 at 11:41 +0000, Moe Mahhouk wrote:
> On Fri, 2026-11-13 at 17:33 +0000, Edgecombe, Rick P wrote:
> > We do expect quote execution time to change, so this may not be optimal long
> > term. The exponential backoff could limit it to 2x the real quote time. For a
> > long quote this could be pretty long.
>
> The backoff is capped at 100 ms. The 2x bound only applies while the
> sleep is still doubling, which is roughly the first 130 ms. Any Quote
> that takes longer is seen at most 100 ms after it completes, whatever
> its duration. A 10 s Quote returns by 10.1 s. The current code adds up
> to 1 s.
>
> > I'd almost wonder if the guest would normally be happy to spend more cycles on
> > getting a faster quote.
>
> I think so too. The cap is a single constant. I can lower it (10 ms
> would mean 100 wakeups per second, and only while a Quote is in flight)
> or replace the backoff with a short fixed interval. Tell me which you
> prefer and I will do that in v4.
I'd think a simpler shortening of the time would be better than something more
advanced. But...
>
> > Can you explain more about the quote use case you are targeting?
>
> Attested TLS. Right after each TLS handshake the server in the TD sends
> a fresh Quote. Its REPORTDATA is the hash of the TLS public key plus
> keying material exported from that session (RFC 5705). That binds the
> Quote to the session, so it cannot be cached or reused, and every new
> connection costs one GetQuote. Requests are serialized by quote_lock, so
> today a TD accepts about one connection per second, and ten clients
> connecting at once wait up to ten seconds. With a local QGS the Quote
> itself takes a few milliseconds. With patch 2 the same ten connections
> take about 0.1 s.
>
> Session binding is also the fix for the recent relay attacks on attested
> TLS, so one Quote per connection is becoming the norm.
>
> For the long term I have event notify working on top of this series. The
> driver uses the interrupt when GetTdVmCallInfo reports it and keeps the
> polling as the fallback. Over 120 back-to-back Quotes at HZ=250 it gives
> 2 ms median, against 8 ms with polling alone. I can post it as a
> follow-up once we agree on the polling side.
Shouldn't attested TLS just be used to set up some other key such that
subsequent connections can be as fast as normal TLS? 0.1s is still kind of slow.
In the end I think quote based attested TLS is not normally expected to be fast.
So is this trying to optimize the wrong thing?
prev parent reply other threads:[~2026-11-18 1:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 19:17 Moe Mahhouk via B4 Relay
2026-10-24 19:17 ` [PATCH v3 1/2] virt: tdx-guest: Fix timeout detection in wait_for_quote_completion() Moe Mahhouk via B4 Relay
2026-10-27 13:50 ` Xiaoyao Li
2026-10-24 19:17 ` [PATCH v3 2/2] virt: tdx-guest: Poll Quote status with exponential backoff Moe Mahhouk via B4 Relay
2026-10-27 14:08 ` Xiaoyao Li
2026-11-03 10:03 ` [🚨ext] " Moe Mahhouk
2026-11-02 19:55 ` [PATCH v3 0/2] virt: tdx-guest: Fix and speed up the wait for a Quote Edgecombe, Rick P
2026-11-03 9:56 ` [🚨ext] " Moe Mahhouk
2026-11-13 9:09 ` Moe Mahhouk
2026-11-13 17:33 ` Edgecombe, Rick P
2026-11-14 11:41 ` Moe Mahhouk
2026-11-18 1:28 ` Edgecombe, Rick P [this message]
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=86f99f3010775eeff6269fd9bb8f4edac10a7d85.camel@intel.com \
--to=rick.p.edgecombe@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=djbw@kernel.org \
--cc=erdemaktas@google.com \
--cc=jun.miao@intel.com \
--cc=kas@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=moe@flashbots.net \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®