Re: [🚨ext] Re: [PATCH v3 0/2] virt: tdx-guest: Fix and speed up the wait for a Quote

From: Moe Mahhouk

Date: Sat Nov 14 2026 - 06:41:52 EST


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.

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