Re: [PATCH v4 4/4] virt: tdx-guest: Allocate Quote buffer dynamically
From: Kiryl Shutsemau
Date: Wed Sep 16 2026 - 08:38:37 EST
On Tue, Sep 15, 2026 at 02:26:03AM -0700, Peter Fang wrote:
> From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxxxxx>
> Signed-off-by: Peter Fang <peter.fang@xxxxxxxxx>
> Reviewed-by: Tony Lindgren <tony.lindgren@xxxxxxxxxxxxxxx>
Reviewed-by: Kiryl Shutsemau (Meta) <kas@xxxxxxxxxx>
--
Kiryl Shutsemau / Kirill A. Shutemov