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>
This commit is contained in:
Sean Christopherson 2022-06-14 23:05:45 +00:00 коммит произвёл Paolo Bonzini
Родитель ec1d7e6ab9
Коммит d39850f57d
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -1517,7 +1517,7 @@ struct kvm_x86_ops {
bool (*check_apicv_inhibit_reasons)(enum kvm_apicv_inhibit reason); bool (*check_apicv_inhibit_reasons)(enum kvm_apicv_inhibit reason);
void (*refresh_apicv_exec_ctrl)(struct kvm_vcpu *vcpu); void (*refresh_apicv_exec_ctrl)(struct kvm_vcpu *vcpu);
void (*hwapic_irr_update)(struct kvm_vcpu *vcpu, int max_irr); void (*hwapic_irr_update)(struct kvm_vcpu *vcpu, int max_irr);
void (*hwapic_isr_update)(struct kvm_vcpu *vcpu, int isr); void (*hwapic_isr_update)(int isr);
bool (*guest_apic_has_interrupt)(struct kvm_vcpu *vcpu); bool (*guest_apic_has_interrupt)(struct kvm_vcpu *vcpu);
void (*load_eoi_exitmap)(struct kvm_vcpu *vcpu, u64 *eoi_exit_bitmap); void (*load_eoi_exitmap)(struct kvm_vcpu *vcpu, u64 *eoi_exit_bitmap);
void (*set_virtual_apic_mode)(struct kvm_vcpu *vcpu); void (*set_virtual_apic_mode)(struct kvm_vcpu *vcpu);

Просмотреть файл

@ -556,7 +556,7 @@ static inline void apic_set_isr(int vec, struct kvm_lapic *apic)
* just set SVI. * just set SVI.
*/ */
if (unlikely(vcpu->arch.apicv_active)) if (unlikely(vcpu->arch.apicv_active))
static_call_cond(kvm_x86_hwapic_isr_update)(vcpu, vec); static_call_cond(kvm_x86_hwapic_isr_update)(vec);
else { else {
++apic->isr_count; ++apic->isr_count;
BUG_ON(apic->isr_count > MAX_APIC_VECTOR); BUG_ON(apic->isr_count > MAX_APIC_VECTOR);
@ -604,7 +604,7 @@ static inline void apic_clear_isr(int vec, struct kvm_lapic *apic)
* and must be left alone. * and must be left alone.
*/ */
if (unlikely(vcpu->arch.apicv_active)) if (unlikely(vcpu->arch.apicv_active))
static_call_cond(kvm_x86_hwapic_isr_update)(vcpu, apic_find_highest_isr(apic)); static_call_cond(kvm_x86_hwapic_isr_update)(apic_find_highest_isr(apic));
else { else {
--apic->isr_count; --apic->isr_count;
BUG_ON(apic->isr_count < 0); BUG_ON(apic->isr_count < 0);
@ -2457,7 +2457,7 @@ void kvm_lapic_reset(struct kvm_vcpu *vcpu, bool init_event)
if (vcpu->arch.apicv_active) { if (vcpu->arch.apicv_active) {
static_call_cond(kvm_x86_apicv_post_state_restore)(vcpu); static_call_cond(kvm_x86_apicv_post_state_restore)(vcpu);
static_call_cond(kvm_x86_hwapic_irr_update)(vcpu, -1); static_call_cond(kvm_x86_hwapic_irr_update)(vcpu, -1);
static_call_cond(kvm_x86_hwapic_isr_update)(vcpu, -1); static_call_cond(kvm_x86_hwapic_isr_update)(-1);
} }
vcpu->arch.apic_arb_prio = 0; vcpu->arch.apic_arb_prio = 0;
@ -2737,7 +2737,7 @@ int kvm_apic_set_state(struct kvm_vcpu *vcpu, struct kvm_lapic_state *s)
if (vcpu->arch.apicv_active) { if (vcpu->arch.apicv_active) {
static_call_cond(kvm_x86_apicv_post_state_restore)(vcpu); static_call_cond(kvm_x86_apicv_post_state_restore)(vcpu);
static_call_cond(kvm_x86_hwapic_irr_update)(vcpu, apic_find_highest_irr(apic)); static_call_cond(kvm_x86_hwapic_irr_update)(vcpu, apic_find_highest_irr(apic));
static_call_cond(kvm_x86_hwapic_isr_update)(vcpu, apic_find_highest_isr(apic)); static_call_cond(kvm_x86_hwapic_isr_update)(apic_find_highest_isr(apic));
} }
kvm_make_request(KVM_REQ_EVENT, vcpu); kvm_make_request(KVM_REQ_EVENT, vcpu);
if (ioapic_in_kernel(vcpu->kvm)) if (ioapic_in_kernel(vcpu->kvm))

Просмотреть файл

@ -6566,7 +6566,7 @@ static void vmx_set_apic_access_page_addr(struct kvm_vcpu *vcpu)
put_page(page); put_page(page);
} }
static void vmx_hwapic_isr_update(struct kvm_vcpu *vcpu, int max_isr) static void vmx_hwapic_isr_update(int max_isr)
{ {
u16 status; u16 status;
u8 old; u8 old;