Re: [PATCH V4 1/7] KVM, pkeys: expose CPUID/CR4 to guest

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

 




On 06/03/2016 08:15, Xiao Guangrong wrote:
>> +    /* cpuid 7.0.ecx*/
>> +    const u32 kvm_supported_word11_x86_features = F(PKU) | 0 /*OSPKE*/;
>> + 
>>
>>               cpuid_mask(&entry->ebx, 9);
>>               // TSC_ADJUST is emulated
>>               entry->ebx |= F(TSC_ADJUST);
>> -        } else
>> +            entry->ecx &= kvm_supported_word11_x86_features;
>> +            cpuid_mask(&entry->ecx, 13);
> 
> Can we use a meaningful name defined by cpuid_leafs instead of the raw
> number?

This is not a cpuid leaf number, it's the Linux feature word number.  In
other words, the "11" in kvm_supported_word11_x86_features should have
matched the "13" in cpuid_mask(&entry->ecx, 13).

However, looking at
http://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/x86/include/asm/cpufeatures.h
I see that all word numbers until 15 are taken, and PKE is not found
anywhere.  What's going on?

Thanks,

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