KVM: x86: make hwapic_isr_update and hwapic_irr_update look the same
Neither APICv nor AVIC actually need the first argument of hwapic_isr_update, but the vCPU makes more sense than passing the pointer to the whole virtual machine! In fact in the APICv case it's just happening that the vCPU is used implicitly, through the loaded VMCS. The second argument instead is named differently, make it consistent. Reviewed-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
@@ -8314,19 +8314,19 @@ static void vmx_set_apic_access_page_addr(struct kvm_vcpu *vcpu, hpa_t hpa)
|
||||
vmcs_write64(APIC_ACCESS_ADDR, hpa);
|
||||
}
|
||||
|
||||
static void vmx_hwapic_isr_update(struct kvm *kvm, int isr)
|
||||
static void vmx_hwapic_isr_update(struct kvm_vcpu *vcpu, int max_isr)
|
||||
{
|
||||
u16 status;
|
||||
u8 old;
|
||||
|
||||
if (isr == -1)
|
||||
isr = 0;
|
||||
if (max_isr == -1)
|
||||
max_isr = 0;
|
||||
|
||||
status = vmcs_read16(GUEST_INTR_STATUS);
|
||||
old = status >> 8;
|
||||
if (isr != old) {
|
||||
if (max_isr != old) {
|
||||
status &= 0xff;
|
||||
status |= isr << 8;
|
||||
status |= max_isr << 8;
|
||||
vmcs_write16(GUEST_INTR_STATUS, status);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user