Re: [PATCH 02/13] x86/virt/tdx: Add SEAMCALL wrappers for TDX TD creation

From: Edgecombe, Rick P
Date: Fri Jan 03 2025 - 12:52:01 EST


On Wed, 2025-01-01 at 02:49 -0500, Paolo Bonzini wrote:
> +/*
> + * The TDX module exposes a CLFLUSH_BEFORE_ALLOC bit to specify whether
> + * a CLFLUSH of pages is required before handing them to the TDX module.
> + * Be conservative and make the code simpler by doing the CLFLUSH
> + * unconditionally.
> + */
> +static void tdx_clflush_page(struct page *tdr)

tdr could be "page" here, as it later is used for non-tdr pages.

> +{
> + clflush_cache_range(page_to_virt(tdr), PAGE_SIZE);
> +}
> +