Skip to content

Commit d39850f

Browse files
sean-jcbonzini
authored andcommitted
KVM: x86: Drop @vcpu parameter from kvm_x86_ops.hwapic_isr_update()
Drop the unused @vcpu parameter from hwapic_isr_update(). AMD/AVIC is unlikely to implement the helper, and VMX/APICv doesn't need the vCPU as it operates on the current VMCS. The result is somewhat odd, but allows for a decent amount of (future) cleanup in the APIC code. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20220614230548.3852141-3-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent ec1d7e6 commit d39850f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

arch/x86/include/asm/kvm_host.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ struct kvm_x86_ops {
15171517
bool (*check_apicv_inhibit_reasons)(enum kvm_apicv_inhibit reason);
15181518
void (*refresh_apicv_exec_ctrl)(struct kvm_vcpu *vcpu);
15191519
void (*hwapic_irr_update)(struct kvm_vcpu *vcpu, int max_irr);
1520-
void (*hwapic_isr_update)(struct kvm_vcpu *vcpu, int isr);
1520+
void (*hwapic_isr_update)(int isr);
15211521
bool (*guest_apic_has_interrupt)(struct kvm_vcpu *vcpu);
15221522
void (*load_eoi_exitmap)(struct kvm_vcpu *vcpu, u64 *eoi_exit_bitmap);
15231523
void (*set_virtual_apic_mode)(struct kvm_vcpu *vcpu);

arch/x86/kvm/lapic.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ static inline void apic_set_isr(int vec, struct kvm_lapic *apic)
556556
* just set SVI.
557557
*/
558558
if (unlikely(vcpu->arch.apicv_active))
559-
static_call_cond(kvm_x86_hwapic_isr_update)(vcpu, vec);
559+
static_call_cond(kvm_x86_hwapic_isr_update)(vec);
560560
else {
561561
++apic->isr_count;
562562
BUG_ON(apic->isr_count > MAX_APIC_VECTOR);
@@ -604,7 +604,7 @@ static inline void apic_clear_isr(int vec, struct kvm_lapic *apic)
604604
* and must be left alone.
605605
*/
606606
if (unlikely(vcpu->arch.apicv_active))
607-
static_call_cond(kvm_x86_hwapic_isr_update)(vcpu, apic_find_highest_isr(apic));
607+
static_call_cond(kvm_x86_hwapic_isr_update)(apic_find_highest_isr(apic));
608608
else {
609609
--apic->isr_count;
610610
BUG_ON(apic->isr_count < 0);
@@ -2457,7 +2457,7 @@ void kvm_lapic_reset(struct kvm_vcpu *vcpu, bool init_event)
24572457
if (vcpu->arch.apicv_active) {
24582458
static_call_cond(kvm_x86_apicv_post_state_restore)(vcpu);
24592459
static_call_cond(kvm_x86_hwapic_irr_update)(vcpu, -1);
2460-
static_call_cond(kvm_x86_hwapic_isr_update)(vcpu, -1);
2460+
static_call_cond(kvm_x86_hwapic_isr_update)(-1);
24612461
}
24622462

24632463
vcpu->arch.apic_arb_prio = 0;
@@ -2737,7 +2737,7 @@ int kvm_apic_set_state(struct kvm_vcpu *vcpu, struct kvm_lapic_state *s)
27372737
if (vcpu->arch.apicv_active) {
27382738
static_call_cond(kvm_x86_apicv_post_state_restore)(vcpu);
27392739
static_call_cond(kvm_x86_hwapic_irr_update)(vcpu, apic_find_highest_irr(apic));
2740-
static_call_cond(kvm_x86_hwapic_isr_update)(vcpu, apic_find_highest_isr(apic));
2740+
static_call_cond(kvm_x86_hwapic_isr_update)(apic_find_highest_isr(apic));
27412741
}
27422742
kvm_make_request(KVM_REQ_EVENT, vcpu);
27432743
if (ioapic_in_kernel(vcpu->kvm))

arch/x86/kvm/vmx/vmx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6566,7 +6566,7 @@ static void vmx_set_apic_access_page_addr(struct kvm_vcpu *vcpu)
65666566
put_page(page);
65676567
}
65686568

6569-
static void vmx_hwapic_isr_update(struct kvm_vcpu *vcpu, int max_isr)
6569+
static void vmx_hwapic_isr_update(int max_isr)
65706570
{
65716571
u16 status;
65726572
u8 old;

0 commit comments

Comments
 (0)