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

--
Isaku Yamahata <isaku.yamahata@gmail.com>

\
 
 \ /
  Last update: 2022-03-24 19:09    [W:0.265 / U:1.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site