[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <33857df5-3639-4db4-acdd-7b692852b601@suse.com>
Date: Tue, 24 Oct 2023 08:53:40 +0300
From: Nikolay Borisov <nik.borisov@...e.com>
To: Kai Huang <kai.huang@...el.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: x86@...nel.org, dave.hansen@...el.com,
kirill.shutemov@...ux.intel.com, peterz@...radead.org,
tony.luck@...el.com, tglx@...utronix.de, bp@...en8.de,
mingo@...hat.com, hpa@...or.com, seanjc@...gle.com,
pbonzini@...hat.com, rafael@...nel.org, david@...hat.com,
dan.j.williams@...el.com, len.brown@...el.com, ak@...ux.intel.com,
isaku.yamahata@...el.com, ying.huang@...el.com, chao.gao@...el.com,
sathyanarayanan.kuppuswamy@...ux.intel.com, bagasdotme@...il.com,
sagis@...gle.com, imammedo@...hat.com
Subject: Re: [PATCH v14 12/23] x86/virt/tdx: Allocate and set up PAMTs for
TDMRs
On 17.10.23 г. 13:14 ч., Kai Huang wrote:
<snip>
> arch/x86/Kconfig | 1 +
> arch/x86/include/asm/shared/tdx.h | 1 +
> arch/x86/virt/vmx/tdx/tdx.c | 215 +++++++++++++++++++++++++++++-
> arch/x86/virt/vmx/tdx/tdx.h | 1 +
> 4 files changed, 213 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 864e43b008b1..ee4ac117aa3c 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1946,6 +1946,7 @@ config INTEL_TDX_HOST
> depends on KVM_INTEL
> depends on X86_X2APIC
> select ARCH_KEEP_MEMBLOCK
> + depends on CONTIG_ALLOC
> help
> Intel Trust Domain Extensions (TDX) protects guest VMs from malicious
> host and certain physical attacks. This option enables necessary TDX
> diff --git a/arch/x86/include/asm/shared/tdx.h b/arch/x86/include/asm/shared/tdx.h
> index abcca86b5af3..cb59fe329b00 100644
> --- a/arch/x86/include/asm/shared/tdx.h
> +++ b/arch/x86/include/asm/shared/tdx.h
> @@ -58,6 +58,7 @@
> #define TDX_PS_4K 0
> #define TDX_PS_2M 1
> #define TDX_PS_1G 2
> +#define TDX_PS_NR (TDX_PS_1G + 1)
nit: I'd prefer if you those defines are turned into an enum and
subsequently this enum type can be used in the definition of
tdmr_get_pamt_sz(). However, at this point I consider this a
bikeshedding and you can do that iff you are going to respin the series
due to other feedback as well.
<snip>
Powered by blists - more mailing lists