Re: [PATCH v3 04/14] x86/virt/tdx: Add SEAMCALL wrappers for TDX page cache management
From: Dave Hansen
Date: Wed Jan 15 2025 - 11:39:42 EST
On 1/15/25 08:09, Paolo Bonzini wrote:
> --- a/arch/x86/include/asm/tdx.h
> +++ b/arch/x86/include/asm/tdx.h
> @@ -137,6 +137,19 @@ struct tdx_vp {
> struct page **tdcx_pages;
> };
>
> +
> +static inline u64 mk_keyed_paddr(u16 hkid, struct page *page)
> +{
> + u64 ret;
> +
> + ret = page_to_phys(page);
> + /* KeyID bits are just above the physical address bits: */
> + ret |= hkid << boot_cpu_data.x86_phys_bits;
> +
> + return ret;
> +
> +}
> +
> u64 tdh_mng_addcx(struct tdx_td *td, struct page *tdcs_page);
Paolo, any chance you could fix up the whitespace goofiness before
applying? It's a super minor thing and I think later patches fix up at
least some of it, but it's a bit wonky.