summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx/vmx.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2022-02-15 13:16:36 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2022-02-18 12:30:56 -0500
commit8a2897853c53fd3d0e381a46b194889cf6da3391 (patch)
tree8b1cd3de3f8bfe05c449aa3cc1a7a13b7a8a31db /arch/x86/kvm/vmx/vmx.c
parent1e8ff29fbbde01e18d97f7b68d1e90260844ca19 (diff)
downloadlinux-8a2897853c53fd3d0e381a46b194889cf6da3391.tar.gz
linux-8a2897853c53fd3d0e381a46b194889cf6da3391.tar.bz2
linux-8a2897853c53fd3d0e381a46b194889cf6da3391.zip
KVM: x86: return 1 unconditionally for availability of KVM_CAP_VAPIC
The two ioctls used to implement userspace-accelerated TPR, KVM_TPR_ACCESS_REPORTING and KVM_SET_VAPIC_ADDR, are available even if hardware-accelerated TPR can be used. So there is no reason not to report KVM_CAP_VAPIC. Reviewed-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx/vmx.c')
-rw-r--r--arch/x86/kvm/vmx/vmx.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 70e7f00362bc..d8547144d3b7 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -541,11 +541,6 @@ static inline bool cpu_need_virtualize_apic_accesses(struct kvm_vcpu *vcpu)
return flexpriority_enabled && lapic_in_kernel(vcpu);
}
-static inline bool vmx_cpu_has_accelerated_tpr(void)
-{
- return flexpriority_enabled;
-}
-
static int possible_passthrough_msr_slot(u32 msr)
{
u32 i;
@@ -7714,7 +7709,6 @@ static struct kvm_x86_ops vmx_x86_ops __initdata = {
.hardware_enable = vmx_hardware_enable,
.hardware_disable = vmx_hardware_disable,
- .cpu_has_accelerated_tpr = vmx_cpu_has_accelerated_tpr,
.has_emulated_msr = vmx_has_emulated_msr,
.vm_size = sizeof(struct kvm_vmx),