Re: [PATCH v4 05/24] x86/virt/seamldr: Retrieve P-SEAMLDR information
From: Chao Gao
Date: Mon Feb 23 2026 - 22:00:37 EST
On Fri, Feb 20, 2026 at 05:36:33PM +0800, Huang, Kai wrote:
>
>> +int seamldr_get_info(struct seamldr_info *seamldr_info)
>> +{
>> + struct tdx_module_args args = { .rcx = slow_virt_to_phys(seamldr_info) };
>
>Should we have a comment for slow_virt_to_phys()? This patch alone doesn't
>really tell where is the memory from.
How about:
/*
* Use slow_virt_to_phys() since @seamldr_info may be allocated on
* the stack.
*/
I was hesitant to add a comment since most existing slow_virt_to_phys() usage
lacks comments.
>
>Btw, it it were me, I would just merge this patch with the next one. Then
>it's clear the memory comes from tdx-host module's stack. The merged patch
>won't be too big to review either (IMHO). You can then have this
>seamldr_get_info() and its user together in one patch, with one changelog to
>tell the full story.
>
>But just my 2cents, feel free to ignore.
I'm fine with this. But let's see what others think about merging the patches.
>
>> +
>> + return seamldr_call(P_SEAMLDR_INFO, &args);
>> +}
>> +EXPORT_SYMBOL_FOR_MODULES(seamldr_get_info, "tdx-host");
>> --
>> 2.47.3