lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <28690ca3dca17e757a23bf60d05ffc75aef9b35e.camel@intel.com>
Date: Tue, 27 Aug 2024 07:24:17 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "Hansen, Dave" <dave.hansen@...el.com>, "seanjc@...gle.com"
	<seanjc@...gle.com>, "bp@...en8.de" <bp@...en8.de>, "peterz@...radead.org"
	<peterz@...radead.org>, "hpa@...or.com" <hpa@...or.com>, "mingo@...hat.com"
	<mingo@...hat.com>, "kirill.shutemov@...ux.intel.com"
	<kirill.shutemov@...ux.intel.com>, "tglx@...utronix.de" <tglx@...utronix.de>,
	"pbonzini@...hat.com" <pbonzini@...hat.com>, "Hunter, Adrian"
	<adrian.hunter@...el.com>, "Williams, Dan J" <dan.j.williams@...el.com>
CC: "Gao, Chao" <chao.gao@...el.com>, "kvm@...r.kernel.org"
	<kvm@...r.kernel.org>, "binbin.wu@...ux.intel.com"
	<binbin.wu@...ux.intel.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "Edgecombe, Rick P"
	<rick.p.edgecombe@...el.com>, "x86@...nel.org" <x86@...nel.org>, "Yamahata,
 Isaku" <isaku.yamahata@...el.com>
Subject: Re: [PATCH v2 09/10] x86/virt/tdx: Reduce TDMR's reserved areas by
 using CMRs to find memory holes

On Tue, 2024-08-20 at 21:38 +0300, Adrian Hunter wrote:
> > diff --git a/arch/x86/virt/vmx/tdx/tdx.h b/arch/x86/virt/vmx/tdx/tdx.h
> > index 861ddf2c2e88..4b43eb774ffa 100644
> > --- a/arch/x86/virt/vmx/tdx/tdx.h
> > +++ b/arch/x86/virt/vmx/tdx/tdx.h
> > @@ -40,6 +40,10 @@
> >  #define MD_FIELD_ID_UPDATE_VERSION		0x0800000100000005ULL
> >  #define MD_FIELD_ID_INTERNAL_VERSION		0x0800000100000006ULL
> >  
> > 
> > 
> > 
> > +#define MD_FIELD_ID_NUM_CMRS			0x9000000100000000ULL
> > +#define MD_FIELD_ID_CMR_BASE0			0x9000000300000080ULL
> > +#define MD_FIELD_ID_CMR_SIZE0			0x9000000300000100ULL
> 
> For scripted checking against "global_metadata.json" it might be better
> to stick to the same field names e.g.
> 
> 	MD_FIELD_ID_CMR_BASE0 -> MD_FIELD_ID_CMR_BASE
> 
> 

I ended up with

  #define MD_FIELD_ID_CMR_BASE(_i)	(0x9000000300000080ULL + (u16)_i)
  #define MD_FIELD_ID_CMR_SIZE(_i)	(0x9000000300000100ULL + (u16)_i)

.. due to they are arrays anyway.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ