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] [thread-next>] [day] [month] [year] [list]
Message-ID: <SA1PR11MB6734D02F421F7ADC9B71CF70A8732@SA1PR11MB6734.namprd11.prod.outlook.com>
Date: Tue, 16 Jan 2024 04:13:35 +0000
From: "Li, Xin3" <xin3.li@...el.com>
To: "Huang, Kai" <kai.huang@...el.com>, "kvm@...r.kernel.org"
	<kvm@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
CC: "Yang, Weijiang" <weijiang.yang@...el.com>, "seanjc@...gle.com"
	<seanjc@...gle.com>, "x86@...nel.org" <x86@...nel.org>,
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>, "hpa@...or.com"
	<hpa@...or.com>, "mingo@...hat.com" <mingo@...hat.com>, "tglx@...utronix.de"
	<tglx@...utronix.de>, "bp@...en8.de" <bp@...en8.de>, "pbonzini@...hat.com"
	<pbonzini@...hat.com>
Subject: RE: [PATCH v4 1/2] KVM: VMX: Cleanup VMX basic information defines
 and usages

> > Define VMX basic information fields with BIT_ULL()/GENMASK_ULL(), and
> > replace hardcoded VMX basic numbers with these field macros.
> >
> > Per Sean's ask, save the full/raw value of MSR_IA32_VMX_BASIC in the
> > global vmcs_config as type u64 to get rid of the hi/lo crud, and then
> > use VMX_BASIC helpers to extract info as needed.
> 
> For the sake of wanting a single 'u64 vmx_basic', feel free to add:
> 
> Acked-by: Kai Huang <kai.huang@...el.com>
> 
> Although I still don't like splitting  ...
> 
> [...]
> 
> 
> > --- a/arch/x86/include/asm/vmx.h
> > +++ b/arch/x86/include/asm/vmx.h
> > @@ -120,6 +120,14 @@
> >
> ...
> 
> > +/* VMX_BASIC bits and bitmasks */
> > +#define VMX_BASIC_32BIT_PHYS_ADDR_ONLY		BIT_ULL(48)
> > +#define VMX_BASIC_INOUT				BIT_ULL(54)
> > +
> >
> ...
> 
> > --- a/arch/x86/kvm/vmx/nested.c
> > +++ b/arch/x86/kvm/vmx/nested.c
> > @@ -1226,23 +1226,32 @@ static bool is_bitwise_subset(u64 superset, u64
> subset, u64 mask)
> >  	return (superset | subset) == superset;  }
> >
> > +#define VMX_BASIC_DUAL_MONITOR_TREATMENT	BIT_ULL(49)
> > +#define VMX_BASIC_TRUE_CTLS			BIT_ULL(55)
> 
> ... these VMX_BASIC bit definitions across multiple files.

IIUC, Sean prefers to define a macro just above the function in which
it is only used:
https://lore.kernel.org/kvm/ZTBJO75Zu1JBsqvw@google.com/

> 
> [...]
> 
> 
> > +#define VMX_BASIC_MEM_TYPE_WB	(MEM_TYPE_WB << 50);
> 
> Also, please fix this one.

Bah!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ