Re: [PATCH v4 4/4] virt: tdx-guest: Allocate Quote buffer dynamically

From
Kiryl Shutsemau <kas@kernel.org>
Date
2026-09-16 12:31:16
Also in
kvm, lkml
Reply to
Peter Fang, 2026-09-15
On Tue, Sep 15, 2026 at 02:26:03AM -0700, Peter Fang wrote:
From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>

A new TDX module ABI reports the Quote size limit in a metadata field.
Prior to this, the guest driver uses a fixed 128KB buffer. Intel derived
this number from current Quote types, but that is not sustainable as
Quotes evolve. 128KB may be too small for Quotes using schemes such as
post-quantum cryptography (PQC), where larger certificate chains can
increase the Quote size significantly. With this ABI, the guest no
longer has to rely on some empirical number.

Allocate the Quote buffer based on the reported limit. This avoids
wasting memory on platforms that do not need larger Quotes. Older
platforms fall back to the default 128KB buffer.

As a result, the maximum size of the "outblob" file in configfs-tsm now
depends on the TDX module.

Because the Quote buffer must be physically contiguous, its size is
bound by the buddy allocator's maximum page order (4MB), which should be
sufficient for current attestation needs.

Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Peter Fang <redacted>
Reviewed-by: Tony Lindgren <redacted>
Reviewed-by: Kiryl Shutsemau (Meta) <kas@kernel.org>

-- 
  Kiryl Shutsemau / Kirill A. Shutemov
Thread (29 messages) 29 messages, 6 authors, last reply 2026-09-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help