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: <20240312044257.GH935089@ls.amr.corp.intel.com>
Date: Mon, 11 Mar 2024 21:42:57 -0700
From: Isaku Yamahata <isaku.yamahata@...el.com>
To: Yin Fengwei <fengwei.yin@...el.com>
Cc: Isaku Yamahata <isaku.yamahata@...el.com>, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org, isaku.yamahata@...il.com,
	Paolo Bonzini <pbonzini@...hat.com>, erdemaktas@...gle.com,
	Sean Christopherson <seanjc@...gle.com>,
	Sagi Shahar <sagis@...gle.com>, Kai Huang <kai.huang@...el.com>,
	chen.bo@...el.com, hang.yuan@...el.com, tina.zhang@...el.com,
	isaku.yamahata@...ux.intel.com
Subject: Re: [PATCH v19 022/130] KVM: x86/vmx: Refactor KVM VMX module
 init/exit functions

On Tue, Mar 12, 2024 at 10:21:28AM +0800,
Yin Fengwei <fengwei.yin@...el.com> wrote:

> 
> 
> On 3/12/24 10:15, Isaku Yamahata wrote:
> >>> -
> >>> -	__vmx_exit();
> >>> -}
> >>> -module_exit(vmx_exit);
> >>> -
> >>> -static int __init vmx_init(void)
> >>> +int __init vmx_init(void)
> >>>   {
> >>>   	int r, cpu;
> >>> -	if (!kvm_is_vmx_supported())
> >>> -		return -EOPNOTSUPP;
> >>> -
> >>> -	/*
> >>> -	 * Note, hv_init_evmcs() touches only VMX knobs, i.e. there's nothing
> >>> -	 * to unwind if a later step fails.
> >>> -	 */
> >>> -	hv_init_evmcs();
> >>> -
> >>> -	/* vmx_hardware_disable() accesses loaded_vmcss_on_cpu. */
> >>> -	for_each_possible_cpu(cpu)
> >>> -		INIT_LIST_HEAD(&per_cpu(loaded_vmcss_on_cpu, cpu));
> >>> -
> >>> -	r = kvm_x86_vendor_init(&vt_init_ops);
> >>> -	if (r)
> >>> -		return r;
> >>> -
> >>>   	/*
> >>>   	 * Must be called after common x86 init so enable_ept is properly set
> >>>   	 * up. Hand the parameter mitigation value in which was stored in
> >> I am wondering whether the first sentence of above comment should be
> >> moved to vt_init()? So vt_init() has whole information about the init
> >> sequence.
> > If we do so, we should move the call of "vmx_setup_l1d_flush() to vt_init().
> > I hesitated to remove static of vmx_setup_l1d_flush().
> I meant this one:
>  "Must be called after common x86 init so enable_ept is properly set up"
> 
> Not necessary to move vmx_setup_l1d_flush().

Ah, you mean "only" first sentence. Ok. I'll move it.
-- 
Isaku Yamahata <isaku.yamahata@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ