Commit 6ad75c5c authored by Sean Christopherson's avatar Sean Christopherson Committed by Paolo Bonzini

KVM: x86: Rename kvm_x86_ops.queue_exception to inject_exception

Rename the kvm_x86_ops hook for exception injection to better reflect
reality, and to align with pretty much every other related function name
in KVM.

No functional change intended.
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
Reviewed-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20220830231614.3580124-14-seanjc@google.comSigned-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent bfcb08a0
...@@ -67,7 +67,7 @@ KVM_X86_OP(get_interrupt_shadow) ...@@ -67,7 +67,7 @@ KVM_X86_OP(get_interrupt_shadow)
KVM_X86_OP(patch_hypercall) KVM_X86_OP(patch_hypercall)
KVM_X86_OP(inject_irq) KVM_X86_OP(inject_irq)
KVM_X86_OP(inject_nmi) KVM_X86_OP(inject_nmi)
KVM_X86_OP(queue_exception) KVM_X86_OP(inject_exception)
KVM_X86_OP(cancel_injection) KVM_X86_OP(cancel_injection)
KVM_X86_OP(interrupt_allowed) KVM_X86_OP(interrupt_allowed)
KVM_X86_OP(nmi_allowed) KVM_X86_OP(nmi_allowed)
......
...@@ -1525,7 +1525,7 @@ struct kvm_x86_ops { ...@@ -1525,7 +1525,7 @@ struct kvm_x86_ops {
unsigned char *hypercall_addr); unsigned char *hypercall_addr);
void (*inject_irq)(struct kvm_vcpu *vcpu, bool reinjected); void (*inject_irq)(struct kvm_vcpu *vcpu, bool reinjected);
void (*inject_nmi)(struct kvm_vcpu *vcpu); void (*inject_nmi)(struct kvm_vcpu *vcpu);
void (*queue_exception)(struct kvm_vcpu *vcpu); void (*inject_exception)(struct kvm_vcpu *vcpu);
void (*cancel_injection)(struct kvm_vcpu *vcpu); void (*cancel_injection)(struct kvm_vcpu *vcpu);
int (*interrupt_allowed)(struct kvm_vcpu *vcpu, bool for_injection); int (*interrupt_allowed)(struct kvm_vcpu *vcpu, bool for_injection);
int (*nmi_allowed)(struct kvm_vcpu *vcpu, bool for_injection); int (*nmi_allowed)(struct kvm_vcpu *vcpu, bool for_injection);
......
...@@ -461,7 +461,7 @@ static int svm_update_soft_interrupt_rip(struct kvm_vcpu *vcpu) ...@@ -461,7 +461,7 @@ static int svm_update_soft_interrupt_rip(struct kvm_vcpu *vcpu)
return 0; return 0;
} }
static void svm_queue_exception(struct kvm_vcpu *vcpu) static void svm_inject_exception(struct kvm_vcpu *vcpu)
{ {
struct vcpu_svm *svm = to_svm(vcpu); struct vcpu_svm *svm = to_svm(vcpu);
unsigned nr = vcpu->arch.exception.nr; unsigned nr = vcpu->arch.exception.nr;
...@@ -4790,7 +4790,7 @@ static struct kvm_x86_ops svm_x86_ops __initdata = { ...@@ -4790,7 +4790,7 @@ static struct kvm_x86_ops svm_x86_ops __initdata = {
.patch_hypercall = svm_patch_hypercall, .patch_hypercall = svm_patch_hypercall,
.inject_irq = svm_inject_irq, .inject_irq = svm_inject_irq,
.inject_nmi = svm_inject_nmi, .inject_nmi = svm_inject_nmi,
.queue_exception = svm_queue_exception, .inject_exception = svm_inject_exception,
.cancel_injection = svm_cancel_injection, .cancel_injection = svm_cancel_injection,
.interrupt_allowed = svm_interrupt_allowed, .interrupt_allowed = svm_interrupt_allowed,
.nmi_allowed = svm_nmi_allowed, .nmi_allowed = svm_nmi_allowed,
......
...@@ -1684,7 +1684,7 @@ static void vmx_clear_hlt(struct kvm_vcpu *vcpu) ...@@ -1684,7 +1684,7 @@ static void vmx_clear_hlt(struct kvm_vcpu *vcpu)
vmcs_write32(GUEST_ACTIVITY_STATE, GUEST_ACTIVITY_ACTIVE); vmcs_write32(GUEST_ACTIVITY_STATE, GUEST_ACTIVITY_ACTIVE);
} }
static void vmx_queue_exception(struct kvm_vcpu *vcpu) static void vmx_inject_exception(struct kvm_vcpu *vcpu)
{ {
struct vcpu_vmx *vmx = to_vmx(vcpu); struct vcpu_vmx *vmx = to_vmx(vcpu);
unsigned nr = vcpu->arch.exception.nr; unsigned nr = vcpu->arch.exception.nr;
...@@ -8054,7 +8054,7 @@ static struct kvm_x86_ops vmx_x86_ops __initdata = { ...@@ -8054,7 +8054,7 @@ static struct kvm_x86_ops vmx_x86_ops __initdata = {
.patch_hypercall = vmx_patch_hypercall, .patch_hypercall = vmx_patch_hypercall,
.inject_irq = vmx_inject_irq, .inject_irq = vmx_inject_irq,
.inject_nmi = vmx_inject_nmi, .inject_nmi = vmx_inject_nmi,
.queue_exception = vmx_queue_exception, .inject_exception = vmx_inject_exception,
.cancel_injection = vmx_cancel_injection, .cancel_injection = vmx_cancel_injection,
.interrupt_allowed = vmx_interrupt_allowed, .interrupt_allowed = vmx_interrupt_allowed,
.nmi_allowed = vmx_nmi_allowed, .nmi_allowed = vmx_nmi_allowed,
......
...@@ -9725,7 +9725,7 @@ static void kvm_inject_exception(struct kvm_vcpu *vcpu) ...@@ -9725,7 +9725,7 @@ static void kvm_inject_exception(struct kvm_vcpu *vcpu)
if (vcpu->arch.exception.error_code && !is_protmode(vcpu)) if (vcpu->arch.exception.error_code && !is_protmode(vcpu))
vcpu->arch.exception.error_code = false; vcpu->arch.exception.error_code = false;
static_call(kvm_x86_queue_exception)(vcpu); static_call(kvm_x86_inject_exception)(vcpu);
} }
static int inject_pending_event(struct kvm_vcpu *vcpu, bool *req_immediate_exit) static int inject_pending_event(struct kvm_vcpu *vcpu, bool *req_immediate_exit)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment