Re: [PATCH] kvm: vmx: Validate INVPCID bit in the CPUID supplied to the guest

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

 



On 27/04/2018 02:57, Junaid Shahid wrote:
> On 04/26/2018 04:16 PM, Jim Mattson wrote:
>> On Thu, Apr 26, 2018 at 3:43 PM, Junaid Shahid <junaids@xxxxxxxxxx>
>> wrote:
>>> When INVPCID is not supported, KVM should clear the INVPCID bit
>>> from the guest CPUID.
>> This seems to be the only guest CPUID bit that's verified in this
>> way. That seems...odd. Why enforce this one constraint?
> 
> Hmm. I wonder if the other bits are not validated intentionally,
> perhaps to facilitate user-mode emulation? If that is the case, then
> yes, we don't need to validate the INVPCID bit either.

They are not validated mostly because it's pointless.  Userspace is
supposed to validate them against KVM_GET_SUPPORTED_CPUID, if it doesn't
it's garbage-in garbage-out.  INVPCID and others have some special
casing because they require toggling some execution controls, but that's
where those needs end.

Thanks,

Paolo



[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