KVM: VMX: Rename VMX functions to conform to kvm_x86_ops names

Massage VMX's implementation names for kvm_x86_ops to maximize use of
kvm-x86-ops.h.  Leave cpu_has_vmx_wbinvd_exit() as-is to preserve the
cpu_has_vmx_*() pattern used for querying VMCS capabilities.  Keep
pi_has_pending_interrupt() as vmx_dy_apicv_has_pending_interrupt() does
a poor job of describing exactly what is being checked in VMX land.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220128005208.4008533-14-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Sean Christopherson 2022-01-28 00:51:59 +00:00 committed by Paolo Bonzini
parent 7ad02ef0da
commit 58fccda47e
3 changed files with 18 additions and 18 deletions

View File

@ -244,7 +244,7 @@ void vmx_pi_start_assignment(struct kvm *kvm)
} }
/* /*
* pi_update_irte - set IRTE for Posted-Interrupts * vmx_pi_update_irte - set IRTE for Posted-Interrupts
* *
* @kvm: kvm * @kvm: kvm
* @host_irq: host irq of the interrupt * @host_irq: host irq of the interrupt
@ -252,8 +252,8 @@ void vmx_pi_start_assignment(struct kvm *kvm)
* @set: set or unset PI * @set: set or unset PI
* returns 0 on success, < 0 on failure * returns 0 on success, < 0 on failure
*/ */
int pi_update_irte(struct kvm *kvm, unsigned int host_irq, uint32_t guest_irq, int vmx_pi_update_irte(struct kvm *kvm, unsigned int host_irq,
bool set) uint32_t guest_irq, bool set)
{ {
struct kvm_kernel_irq_routing_entry *e; struct kvm_kernel_irq_routing_entry *e;
struct kvm_irq_routing_table *irq_rt; struct kvm_irq_routing_table *irq_rt;

View File

@ -97,8 +97,8 @@ void vmx_vcpu_pi_put(struct kvm_vcpu *vcpu);
void pi_wakeup_handler(void); void pi_wakeup_handler(void);
void __init pi_init_cpu(int cpu); void __init pi_init_cpu(int cpu);
bool pi_has_pending_interrupt(struct kvm_vcpu *vcpu); bool pi_has_pending_interrupt(struct kvm_vcpu *vcpu);
int pi_update_irte(struct kvm *kvm, unsigned int host_irq, uint32_t guest_irq, int vmx_pi_update_irte(struct kvm *kvm, unsigned int host_irq,
bool set); uint32_t guest_irq, bool set);
void vmx_pi_start_assignment(struct kvm *kvm); void vmx_pi_start_assignment(struct kvm *kvm);
#endif /* __KVM_X86_VMX_POSTED_INTR_H */ #endif /* __KVM_X86_VMX_POSTED_INTR_H */

View File

@ -541,7 +541,7 @@ static inline bool cpu_need_virtualize_apic_accesses(struct kvm_vcpu *vcpu)
return flexpriority_enabled && lapic_in_kernel(vcpu); return flexpriority_enabled && lapic_in_kernel(vcpu);
} }
static inline bool report_flexpriority(void) static inline bool vmx_cpu_has_accelerated_tpr(void)
{ {
return flexpriority_enabled; return flexpriority_enabled;
} }
@ -2341,7 +2341,7 @@ fault:
return -EFAULT; return -EFAULT;
} }
static int hardware_enable(void) static int vmx_hardware_enable(void)
{ {
int cpu = raw_smp_processor_id(); int cpu = raw_smp_processor_id();
u64 phys_addr = __pa(per_cpu(vmxarea, cpu)); u64 phys_addr = __pa(per_cpu(vmxarea, cpu));
@ -2382,7 +2382,7 @@ static void vmclear_local_loaded_vmcss(void)
__loaded_vmcs_clear(v); __loaded_vmcs_clear(v);
} }
static void hardware_disable(void) static void vmx_hardware_disable(void)
{ {
vmclear_local_loaded_vmcss(); vmclear_local_loaded_vmcss();
@ -6969,7 +6969,7 @@ static fastpath_t vmx_vcpu_run(struct kvm_vcpu *vcpu)
return vmx_exit_handlers_fastpath(vcpu); return vmx_exit_handlers_fastpath(vcpu);
} }
static void vmx_free_vcpu(struct kvm_vcpu *vcpu) static void vmx_vcpu_free(struct kvm_vcpu *vcpu)
{ {
struct vcpu_vmx *vmx = to_vmx(vcpu); struct vcpu_vmx *vmx = to_vmx(vcpu);
@ -6980,7 +6980,7 @@ static void vmx_free_vcpu(struct kvm_vcpu *vcpu)
free_loaded_vmcs(vmx->loaded_vmcs); free_loaded_vmcs(vmx->loaded_vmcs);
} }
static int vmx_create_vcpu(struct kvm_vcpu *vcpu) static int vmx_vcpu_create(struct kvm_vcpu *vcpu)
{ {
struct vmx_uret_msr *tsx_ctrl; struct vmx_uret_msr *tsx_ctrl;
struct vcpu_vmx *vmx; struct vcpu_vmx *vmx;
@ -7685,7 +7685,7 @@ static void vmx_migrate_timers(struct kvm_vcpu *vcpu)
} }
} }
static void hardware_unsetup(void) static void vmx_hardware_unsetup(void)
{ {
kvm_set_posted_intr_wakeup_handler(NULL); kvm_set_posted_intr_wakeup_handler(NULL);
@ -7708,18 +7708,18 @@ static bool vmx_check_apicv_inhibit_reasons(ulong bit)
static struct kvm_x86_ops vmx_x86_ops __initdata = { static struct kvm_x86_ops vmx_x86_ops __initdata = {
.name = "kvm_intel", .name = "kvm_intel",
.hardware_unsetup = hardware_unsetup, .hardware_unsetup = vmx_hardware_unsetup,
.hardware_enable = hardware_enable, .hardware_enable = vmx_hardware_enable,
.hardware_disable = hardware_disable, .hardware_disable = vmx_hardware_disable,
.cpu_has_accelerated_tpr = report_flexpriority, .cpu_has_accelerated_tpr = vmx_cpu_has_accelerated_tpr,
.has_emulated_msr = vmx_has_emulated_msr, .has_emulated_msr = vmx_has_emulated_msr,
.vm_size = sizeof(struct kvm_vmx), .vm_size = sizeof(struct kvm_vmx),
.vm_init = vmx_vm_init, .vm_init = vmx_vm_init,
.vcpu_create = vmx_create_vcpu, .vcpu_create = vmx_vcpu_create,
.vcpu_free = vmx_free_vcpu, .vcpu_free = vmx_vcpu_free,
.vcpu_reset = vmx_vcpu_reset, .vcpu_reset = vmx_vcpu_reset,
.prepare_switch_to_guest = vmx_prepare_switch_to_guest, .prepare_switch_to_guest = vmx_prepare_switch_to_guest,
@ -7817,7 +7817,7 @@ static struct kvm_x86_ops vmx_x86_ops __initdata = {
.pmu_ops = &intel_pmu_ops, .pmu_ops = &intel_pmu_ops,
.nested_ops = &vmx_nested_ops, .nested_ops = &vmx_nested_ops,
.pi_update_irte = pi_update_irte, .pi_update_irte = vmx_pi_update_irte,
.pi_start_assignment = vmx_pi_start_assignment, .pi_start_assignment = vmx_pi_start_assignment,
#ifdef CONFIG_X86_64 #ifdef CONFIG_X86_64