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: <56F3E653.6040901@gmail.com>
Date:	Thu, 24 Mar 2016 21:06:27 +0800
From:	Yang Zhang <yang.zhang.wz@...il.com>
To:	Paolo Bonzini <pbonzini@...hat.com>
Cc:	linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
	Xiao Guangrong <guangrong.xiao@...ux.intel.com>
Subject: Re: [PATCH 1/2] KVM: x86: disable MPX if host did not enable MPX
 XSAVE features

On 2016/3/11 20:09, Paolo Bonzini wrote:

Sorry for the late reply.

>
>
> On 11/03/2016 03:37, Yang Zhang wrote:
>>> @@ -97,7 +104,7 @@ int kvm_update_cpuid(struct kvm_vcpu *vcpu)
>>>    	if (best && (best->eax & (F(XSAVES) | F(XSAVEC))))
>>>    		best->ebx = xstate_required_size(vcpu->arch.xcr0, true);
>>>
>>> -	vcpu->arch.eager_fpu = use_eager_fpu() || guest_cpuid_has_mpx(vcpu);
>>> +	vcpu->arch.eager_fpu = use_eager_fpu();
>>
>> Hi Paolo,
>>
>> As i mentioned on another thread, force KVM to use eager fpu
>> unconditionally may introduce the performance regression. Though the
>> cost for eager fpu is very small especially in modern CPU, it still
>> cannot be ignored on old platform.
>
> This patch doesn't change anything in that respect.  It doesn't enable
> eager FPU in any case where it wasn't already enabled before the patch.

I mean why not keep the old way that only activate the eager_fpu while 
guest sees the MPX bit in CPUID, like:

vcpu->arch.eager_fpu = use_eager_fpu() && guest_cpuid_has_mpx(vcpu);

Besides, vmx_fpu_activate is called when do vcpu_reset. So it seems no 
need to call fpu_activate() here again.


-- 
best regards
yang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ