On Thu, 2022-03-24 at 11:06 -0700, Isaku Yamahata wrote: > On Sun, Mar 13, 2022 at 11:49:53PM +1300, > Kai Huang <kai.huang@xxxxxxxxx> wrote: > > > diff --git a/arch/x86/virt/vmx/tdx.c b/arch/x86/virt/vmx/tdx.c > > index 1939b64d23e8..c58c99b94c72 100644 > > --- a/arch/x86/virt/vmx/tdx.c > > +++ b/arch/x86/virt/vmx/tdx.c > > @@ -21,6 +21,7 @@ > > #include <asm/cpufeatures.h> > > #include <asm/virtext.h> > > #include <asm/e820/api.h> > > +#include <asm/pgtable.h> > > #include <asm/tdx.h> > > #include "tdx.h" > > > > @@ -66,6 +67,16 @@ > > #define TDMR_START(_tdmr) ((_tdmr)->base) > > #define TDMR_END(_tdmr) ((_tdmr)->base + (_tdmr)->size) > > > > +/* Page sizes supported by TDX */ > > +enum tdx_page_sz { > > + TDX_PG_4K = 0, > > + TDX_PG_2M, > > + TDX_PG_1G, > > + TDX_PG_MAX, > > +}; > > + > > +#define TDX_HPAGE_SHIFT 9 > > + > > /* > > * TDX module status during initialization > > */ > > @@ -893,7 +904,7 @@ static int create_tdmrs(struct tdmr_info **tdmr_array, int *tdmr_num) > > * them. To keep it simple, always try to use one TDMR to cover > > * one RAM entry. > > */ > > - e820_for_each_mem(e820_table, i, start, end) { > > + e820_for_each_mem(i, start, end) { > > This patch doesn't change e820_for_each_mem. This hunk should go into the > previous patch? > > thansk, > Exactly. My mistake. Thanks for catching. -- Thanks, -Kai