Skip to content

Commit 87a877d

Browse files
xinli-intelsean-jc
authored andcommitted
KVM: x86: Rename handle_fastpath_set_msr_irqoff() to handle_fastpath_wrmsr()
Rename the WRMSR fastpath API to drop "irqoff", as that information is redundant (the fastpath always runs with IRQs disabled), and to prepare for adding a fastpath for the immediate variant of WRMSRNS. No functional change intended. Signed-off-by: Xin Li (Intel) <xin@zytor.com> [sean: split to separate patch, write changelog] Link: https://lore.kernel.org/r/20250805202224.1475590-4-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent ec400f6 commit 87a877d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

arch/x86/kvm/svm/svm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4197,7 +4197,7 @@ static fastpath_t svm_exit_handlers_fastpath(struct kvm_vcpu *vcpu)
41974197
case SVM_EXIT_MSR:
41984198
if (!control->exit_info_1)
41994199
break;
4200-
return handle_fastpath_set_msr_irqoff(vcpu);
4200+
return handle_fastpath_wrmsr(vcpu);
42014201
case SVM_EXIT_HLT:
42024202
return handle_fastpath_hlt(vcpu);
42034203
case SVM_EXIT_INVD:

arch/x86/kvm/vmx/vmx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7170,7 +7170,7 @@ static fastpath_t vmx_exit_handlers_fastpath(struct kvm_vcpu *vcpu,
71707170

71717171
switch (vmx_get_exit_reason(vcpu).basic) {
71727172
case EXIT_REASON_MSR_WRITE:
7173-
return handle_fastpath_set_msr_irqoff(vcpu);
7173+
return handle_fastpath_wrmsr(vcpu);
71747174
case EXIT_REASON_PREEMPTION_TIMER:
71757175
return handle_fastpath_preemption_timer(vcpu, force_immediate_exit);
71767176
case EXIT_REASON_HLT:

arch/x86/kvm/x86.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2143,7 +2143,7 @@ static inline bool kvm_vcpu_exit_request(struct kvm_vcpu *vcpu)
21432143
kvm_request_pending(vcpu) || xfer_to_guest_mode_work_pending();
21442144
}
21452145

2146-
fastpath_t handle_fastpath_set_msr_irqoff(struct kvm_vcpu *vcpu)
2146+
fastpath_t handle_fastpath_wrmsr(struct kvm_vcpu *vcpu)
21472147
{
21482148
u64 data = kvm_read_edx_eax(vcpu);
21492149
u32 msr = kvm_rcx_read(vcpu);
@@ -2168,7 +2168,7 @@ fastpath_t handle_fastpath_set_msr_irqoff(struct kvm_vcpu *vcpu)
21682168

21692169
return EXIT_FASTPATH_REENTER_GUEST;
21702170
}
2171-
EXPORT_SYMBOL_GPL(handle_fastpath_set_msr_irqoff);
2171+
EXPORT_SYMBOL_GPL(handle_fastpath_wrmsr);
21722172

21732173
/*
21742174
* Adapt set_msr() to msr_io()'s calling convention

arch/x86/kvm/x86.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ int x86_decode_emulated_instruction(struct kvm_vcpu *vcpu, int emulation_type,
437437
void *insn, int insn_len);
438438
int x86_emulate_instruction(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa,
439439
int emulation_type, void *insn, int insn_len);
440-
fastpath_t handle_fastpath_set_msr_irqoff(struct kvm_vcpu *vcpu);
440+
fastpath_t handle_fastpath_wrmsr(struct kvm_vcpu *vcpu);
441441
fastpath_t handle_fastpath_hlt(struct kvm_vcpu *vcpu);
442442
fastpath_t handle_fastpath_invd(struct kvm_vcpu *vcpu);
443443

0 commit comments

Comments
 (0)