KVM: svm/avic: Drop "struct kvm_x86_ops" for avic_hardware_setup()
authorLike Xu <likexu@tencent.com>
Wed, 9 Nov 2022 11:59:52 +0000 (19:59 +0800)
committerSean Christopherson <seanjc@google.com>
Tue, 24 Jan 2023 18:06:48 +0000 (10:06 -0800)
Even in commit 4bdec12aa8d6 ("KVM: SVM: Detect X2APIC virtualization
(x2AVIC) support"), where avic_hardware_setup() was first introduced,
its only pass-in parameter "struct kvm_x86_ops *ops" is not used at all.
Clean it up a bit to avoid compiler ranting from LLVM toolchain.

Signed-off-by: Like Xu <likexu@tencent.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20221109115952.92816-1-likexu@tencent.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/avic.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h

index b3928150a37ce8d5a1d93bba10fc314c8c5e9e11..ca684979e90d65e27a9fc250326e2d947e6c4a82 100644 (file)
@@ -1120,7 +1120,7 @@ void avic_vcpu_unblocking(struct kvm_vcpu *vcpu)
  * - Hypervisor can support both xAVIC and x2AVIC in the same guest.
  * - The mode can be switched at run-time.
  */
-bool avic_hardware_setup(struct kvm_x86_ops *x86_ops)
+bool avic_hardware_setup(void)
 {
        if (!npt_enabled)
                return false;
index f5fd44fa113f5e7a82723dacd223a7799fb8017a..b103fe7cbc82d7ccbde929eb90aad2003bcf6f00 100644 (file)
@@ -5017,7 +5017,7 @@ static __init int svm_hardware_setup(void)
                        nrips = false;
        }
 
-       enable_apicv = avic = avic && avic_hardware_setup(&svm_x86_ops);
+       enable_apicv = avic = avic && avic_hardware_setup();
 
        if (!enable_apicv) {
                svm_x86_ops.vcpu_blocking = NULL;
index 41eabb098b136d3e5225572506565a88d7d376d2..a7073802450fb2bf69470df57fb86c97230184b1 100644 (file)
@@ -637,7 +637,7 @@ extern struct kvm_x86_nested_ops svm_nested_ops;
        BIT(APICV_INHIBIT_REASON_LOGICAL_ID_ALIASED)    \
 )
 
-bool avic_hardware_setup(struct kvm_x86_ops *ops);
+bool avic_hardware_setup(void);
 int avic_ga_log_notifier(u32 ga_tag);
 void avic_vm_destroy(struct kvm *kvm);
 int avic_vm_init(struct kvm *kvm);