Re: [PATCH 1/3] KVM: VMX: Rename vmx_umip_emulated() to cpu_has_vmx_desc()

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

 



On Fri, Mar 10, 2023, Robert Hoo wrote:
> Just rename, no functional changes intended.
> 
> vmx_umip_emulated() comes from the ancient time when there was a

No, vmx_umip_emulated() comes from the fact that "cpu_has_vmx_desc()" is
inscrutable for the relevant code.  There is zero reason to require that readers
have a priori knowledge of why intercepting descriptor table access instructions
is relevant to handing CR4.UMIP changes.

If it really bothers someone, we could do

	static inline bool cpu_has_vmx_desc(void)
	{
		return vmcs_config.cpu_based_2nd_exec_ctrl &
			SECONDARY_EXEC_DESC;
	}

	static inline bool vmx_umip_emulated(void)
	{
		return cpu_has_vmx_desc();
	}

but I don't see the point since there is no usage for SECONDARY_EXEC_DESC outside
of UMIP emulation.



[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