lkml.org 
[lkml]   [2022]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 13/21] x86/virt/tdx: Allocate and set up PAMTs for TDMRs
From
Date
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@intel.com> 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

\
 
 \ /
  Last update: 2022-03-28 03:17    [W:0.087 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site