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: <c7be9930-26e7-454c-87f6-c8cdf2fce481@intel.com>
Date: Tue, 12 Mar 2024 10:21:28 +0800
From: Yin Fengwei <fengwei.yin@...el.com>
To: Isaku Yamahata <isaku.yamahata@...el.com>
CC: <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 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().

Regards
Yin, Fengwei


> -- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ