Re: [PATCH v4 05/24] x86/virt/seamldr: Retrieve P-SEAMLDR information

From: Huang, Kai

Date: Tue Feb 24 2026 - 05:31:27 EST


On Tue, 2026-02-24 at 10:59 +0800, Chao Gao wrote:
> 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.

Perhaps this is because in these existing usages "where the memory comes
from" and the "use of slow_virt_to_phys()" are closely together so no
comment is needed?

(disclaimer: I was looking at kvm_register_steal_time().)

So I am fine with either way -- feel free to ignore.