[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2863f94b-c01b-45f8-90fd-b237997d76ec@linux.intel.com>
Date: Tue, 3 Dec 2024 10:20:55 +0800
From: Binbin Wu <binbin.wu@...ux.intel.com>
To: Rick Edgecombe <rick.p.edgecombe@...el.com>
Cc: kvm@...r.kernel.org, pbonzini@...hat.com, seanjc@...gle.com,
dave.hansen@...el.com, isaku.yamahata@...il.com, kai.huang@...el.com,
linux-kernel@...r.kernel.org, tony.lindgren@...ux.intel.com,
xiaoyao.li@...el.com, yan.y.zhao@...el.com, x86@...nel.org,
adrian.hunter@...el.com, Isaku Yamahata <isaku.yamahata@...el.com>,
Yuan Yao <yuan.yao@...el.com>
Subject: Re: [RFC PATCH v2 2/6] x86/virt/tdx: Add SEAMCALL wrappers for TDX TD
creation
On 12/3/2024 9:03 AM, Rick Edgecombe 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)
The argument should have a generic name instead of tdr, because it's not
limited to TDR.
> +{
> + clflush_cache_range(page_to_virt(tdr), PAGE_SIZE);
> +}
> +
> +u64 tdh_mng_addcx(struct tdx_td *td, struct page *tdcs_page)
> +{
> + struct tdx_module_args args = {
> + .rcx = page_to_pfn(tdcs_page) << PAGE_SHIFT,
> + .rdx = tdx_tdr_pa(td),
> + };
> +
> + tdx_clflush_page(tdcs_page);
> + return seamcall(TDH_MNG_ADDCX, &args);
> +}
> +EXPORT_SYMBOL_GPL(tdh_mng_addcx);
> +
[...]
Powered by blists - more mailing lists