Skip to content

Commit

Permalink
KVM: x86: Scan for IOAPIC changes at lowest VMPL
Browse files Browse the repository at this point in the history
Currently all IRQ requests are targeted to the lowest priority VMPL
which is where the OS will be running. This patch updates the IOAPIC
request scan to use the default IRQ VMPL from the KVM arch
configuration.

Signed-off-by: Roy Hopkins <[email protected]>
  • Loading branch information
roy-hopkins committed Oct 3, 2024
1 parent e4bc6d5 commit 80e4a6b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -10638,12 +10638,12 @@ int kvm_get_nr_pending_nmis(struct kvm_vcpu *vcpu)
void kvm_make_scan_ioapic_request_mask(struct kvm *kvm,
unsigned long *vcpu_bitmap)
{
kvm_make_vcpus_request_mask(kvm, KVM_REQ_SCAN_IOAPIC, vcpu_bitmap);
kvm_make_vcpus_request_mask_vmpl(kvm, KVM_REQ_SCAN_IOAPIC, vcpu_bitmap, kvm->arch.default_irq_vmpl);
}

void kvm_make_scan_ioapic_request(struct kvm *kvm)
{
kvm_make_all_cpus_request(kvm, KVM_REQ_SCAN_IOAPIC);
kvm_make_all_cpus_request_vmpl(kvm, KVM_REQ_SCAN_IOAPIC, kvm->arch.default_irq_vmpl);
}

void __kvm_vcpu_update_apicv(struct kvm_vcpu *vcpu)
Expand Down Expand Up @@ -10761,6 +10761,7 @@ EXPORT_SYMBOL_GPL(kvm_set_or_clear_apicv_inhibit);

static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu)
{
vcpu = vcpu->vcpu_parent->vcpu_vmpl[vcpu->kvm->arch.default_irq_vmpl];
if (!kvm_apic_present(vcpu))
return;

Expand Down

0 comments on commit 80e4a6b

Please sign in to comment.