Skip to content

Commit ef0fbca

Browse files
suomilewisbonzini
authored andcommitted
kvm: vmx: Rename function find_msr() to vmx_find_msr_index()
Rename function find_msr() to vmx_find_msr_index() in preparation for an upcoming patch where we export it and use it in nested.c. Reviewed-by: Jim Mattson <[email protected]> Signed-off-by: Aaron Lewis <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 7cfe052 commit ef0fbca

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/x86/kvm/vmx/vmx.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ static void clear_atomic_switch_msr_special(struct vcpu_vmx *vmx,
833833
vm_exit_controls_clearbit(vmx, exit);
834834
}
835835

836-
static int find_msr(struct vmx_msrs *m, unsigned int msr)
836+
static int vmx_find_msr_index(struct vmx_msrs *m, u32 msr)
837837
{
838838
unsigned int i;
839839

@@ -867,15 +867,15 @@ static void clear_atomic_switch_msr(struct vcpu_vmx *vmx, unsigned msr)
867867
}
868868
break;
869869
}
870-
i = find_msr(&m->guest, msr);
870+
i = vmx_find_msr_index(&m->guest, msr);
871871
if (i < 0)
872872
goto skip_guest;
873873
--m->guest.nr;
874874
m->guest.val[i] = m->guest.val[m->guest.nr];
875875
vmcs_write32(VM_ENTRY_MSR_LOAD_COUNT, m->guest.nr);
876876

877877
skip_guest:
878-
i = find_msr(&m->host, msr);
878+
i = vmx_find_msr_index(&m->host, msr);
879879
if (i < 0)
880880
return;
881881

@@ -934,9 +934,9 @@ static void add_atomic_switch_msr(struct vcpu_vmx *vmx, unsigned msr,
934934
wrmsrl(MSR_IA32_PEBS_ENABLE, 0);
935935
}
936936

937-
i = find_msr(&m->guest, msr);
937+
i = vmx_find_msr_index(&m->guest, msr);
938938
if (!entry_only)
939-
j = find_msr(&m->host, msr);
939+
j = vmx_find_msr_index(&m->host, msr);
940940

941941
if ((i < 0 && m->guest.nr == NR_LOADSTORE_MSRS) ||
942942
(j < 0 && m->host.nr == NR_LOADSTORE_MSRS)) {

0 commit comments

Comments
 (0)