Skip to content

Commit 6e66dcb

Browse files
Like Xusean-jc
authored andcommitted
KVM: svm/avic: Drop "struct kvm_x86_ops" for avic_hardware_setup()
Even in commit 4bdec12 ("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>
1 parent 7cf4319 commit 6e66dcb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

arch/x86/kvm/svm/avic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ void avic_vcpu_unblocking(struct kvm_vcpu *vcpu)
11201120
* - Hypervisor can support both xAVIC and x2AVIC in the same guest.
11211121
* - The mode can be switched at run-time.
11221122
*/
1123-
bool avic_hardware_setup(struct kvm_x86_ops *x86_ops)
1123+
bool avic_hardware_setup(void)
11241124
{
11251125
if (!npt_enabled)
11261126
return false;

arch/x86/kvm/svm/svm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5017,7 +5017,7 @@ static __init int svm_hardware_setup(void)
50175017
nrips = false;
50185018
}
50195019

5020-
enable_apicv = avic = avic && avic_hardware_setup(&svm_x86_ops);
5020+
enable_apicv = avic = avic && avic_hardware_setup();
50215021

50225022
if (!enable_apicv) {
50235023
svm_x86_ops.vcpu_blocking = NULL;

arch/x86/kvm/svm/svm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ extern struct kvm_x86_nested_ops svm_nested_ops;
637637
BIT(APICV_INHIBIT_REASON_LOGICAL_ID_ALIASED) \
638638
)
639639

640-
bool avic_hardware_setup(struct kvm_x86_ops *ops);
640+
bool avic_hardware_setup(void);
641641
int avic_ga_log_notifier(u32 ga_tag);
642642
void avic_vm_destroy(struct kvm *kvm);
643643
int avic_vm_init(struct kvm *kvm);

0 commit comments

Comments
 (0)