Re: [PATCH v6 03/11] x86/virt/tdx: Add tdx_alloc/free_control_page() helpers

From: Edgecombe, Rick P

Date: Tue Jun 30 2026 - 20:22:03 EST


On Mon, 2026-06-08 at 10:18 +0800, Yan Zhao wrote:
> On Mon, Jun 08, 2026 at 10:11:58AM +0800, Binbin Wu wrote:
> > > diff --git a/arch/x86/include/asm/tdx.h b/arch/x86/include/asm/tdx.h
> > > index 82dc27aecf297..74e75db5728c7 100644
> > > --- a/arch/x86/include/asm/tdx.h
> > > +++ b/arch/x86/include/asm/tdx.h
> > > @@ -37,6 +37,7 @@
> > >  
> > >   #include <uapi/asm/mce.h>
> > >   #include <asm/tdx_global_metadata.h>
> > > +#include <linux/mm.h>
> >
> > I think the header is not needed here.
> Right. This version does not invoke page_address() in tdx.h for
> tdx_alloc_control_page() any more.
>
> Also no need to include mm.h for tdx.c (which has invoked page_address() before
> this patch), since tdx.c includes memblock.h which further includes mm.h.

Thanks for the analysis. Will remove both.