Re: [PATCH V4 7/7] KVM, pkeys: disable PKU feature without ept

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 08/03/2016 10:32, Xiao Guangrong wrote:
> On 03/08/2016 04:47 PM, Paolo Bonzini wrote:
>> Some XSAVE features (currently only MPX, but in the future PKRU too)
>> will force eagerfpu on, see fpu__init_system_ctx_switch:
>>
>>          if (xfeatures_mask & XFEATURE_MASK_EAGER) {
>>                  if (eagerfpu == DISABLE) {
>>                          xfeatures_mask &= ~XFEATURE_MASK_EAGER;
> 
> So if the kernel parameter, eagerfpu is set to "off", then eager is not
> enabled, so PKRU can not work in KVM?

Yes.  Neither PKRU nor MPX.

>> KVM will use eager FPU if the host uses it.  See arch/x86/kvm/cpuid.c:
>>
>>     vcpu->arch.eager_fpu =
>>         use_eager_fpu() || guest_cpuid_has_mpx(vcpu);
>>
> 
> Sorry, i missread the code, yes, if vcpu->arch.eager_fpu is true, it is
> always save/load fpu for every vm-exit/vm-enter.

No problem, it's impossible to know all the code. :)

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux