summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx
diff options
context:
space:
mode:
authorSean Christopherson <sean.j.christopherson@intel.com>2020-09-23 11:04:02 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2020-09-28 07:57:58 -0400
commit1e7a483037e8fa884c688f2213c8af10f2e8e96a (patch)
tree6df36648bc6c1eb874ec62c59a34d469fe447501 /arch/x86/kvm/vmx
parent658ece84f5da1cd8e36f0d13449aa95c61667b4b (diff)
downloadlinux-1e7a483037e8fa884c688f2213c8af10f2e8e96a.tar.bz2
KVM: VMX: Rename "__find_msr_index" to "__vmx_find_uret_msr"
Rename "__find_msr_index" to scope it to VMX, associate it with guest_uret_msrs, and to avoid conflating "MSR's ECX index" with "MSR's array index". Similarly, don't use "slot" in the name so as to avoid colliding the common x86's half of "user_return_msrs" (the slot in kvm_user_return_msrs is not the same slot in guest_uret_msrs). No functional change intended. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Message-Id: <20200923180409.32255-9-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx')
-rw-r--r--arch/x86/kvm/vmx/vmx.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 252cce60af70..ae3c01cde79d 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -611,7 +611,7 @@ static inline bool report_flexpriority(void)
return flexpriority_enabled;
}
-static inline int __find_msr_index(struct vcpu_vmx *vmx, u32 msr)
+static inline int __vmx_find_uret_msr(struct vcpu_vmx *vmx, u32 msr)
{
int i;
@@ -625,7 +625,7 @@ struct vmx_uret_msr *find_msr_entry(struct vcpu_vmx *vmx, u32 msr)
{
int i;
- i = __find_msr_index(vmx, msr);
+ i = __vmx_find_uret_msr(vmx, msr);
if (i >= 0)
return &vmx->guest_uret_msrs[i];
return NULL;
@@ -1637,24 +1637,24 @@ static void setup_msrs(struct vcpu_vmx *vmx)
* when EFER.SCE is set.
*/
if (is_long_mode(&vmx->vcpu) && (vmx->vcpu.arch.efer & EFER_SCE)) {
- index = __find_msr_index(vmx, MSR_STAR);
+ index = __vmx_find_uret_msr(vmx, MSR_STAR);
if (index >= 0)
move_msr_up(vmx, index, nr_active_uret_msrs++);
- index = __find_msr_index(vmx, MSR_LSTAR);
+ index = __vmx_find_uret_msr(vmx, MSR_LSTAR);
if (index >= 0)
move_msr_up(vmx, index, nr_active_uret_msrs++);
- index = __find_msr_index(vmx, MSR_SYSCALL_MASK);
+ index = __vmx_find_uret_msr(vmx, MSR_SYSCALL_MASK);
if (index >= 0)
move_msr_up(vmx, index, nr_active_uret_msrs++);
}
#endif
- index = __find_msr_index(vmx, MSR_EFER);
+ index = __vmx_find_uret_msr(vmx, MSR_EFER);
if (index >= 0 && update_transition_efer(vmx, index))
move_msr_up(vmx, index, nr_active_uret_msrs++);
- index = __find_msr_index(vmx, MSR_TSC_AUX);
+ index = __vmx_find_uret_msr(vmx, MSR_TSC_AUX);
if (index >= 0 && guest_cpuid_has(&vmx->vcpu, X86_FEATURE_RDTSCP))
move_msr_up(vmx, index, nr_active_uret_msrs++);
- index = __find_msr_index(vmx, MSR_IA32_TSX_CTRL);
+ index = __vmx_find_uret_msr(vmx, MSR_IA32_TSX_CTRL);
if (index >= 0)
move_msr_up(vmx, index, nr_active_uret_msrs++);