KVM: LAPIC: micro-optimize fixed mode ipi delivery
This patch optimizes redundancy logic before fixed mode ipi is delivered in the fast path, broadcast handling needs to go slow path, so the delivery mode repair can be delayed to before slow path. Signed-off-by: Wanpeng Li <wanpengli@tencent.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Родитель
1e9e2622a1
Коммит
dfd146fcae
|
@ -52,15 +52,15 @@ int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src,
|
||||||
unsigned long dest_vcpu_bitmap[BITS_TO_LONGS(KVM_MAX_VCPUS)];
|
unsigned long dest_vcpu_bitmap[BITS_TO_LONGS(KVM_MAX_VCPUS)];
|
||||||
unsigned int dest_vcpus = 0;
|
unsigned int dest_vcpus = 0;
|
||||||
|
|
||||||
|
if (kvm_irq_delivery_to_apic_fast(kvm, src, irq, &r, dest_map))
|
||||||
|
return r;
|
||||||
|
|
||||||
if (irq->dest_mode == APIC_DEST_PHYSICAL &&
|
if (irq->dest_mode == APIC_DEST_PHYSICAL &&
|
||||||
irq->dest_id == 0xff && kvm_lowest_prio_delivery(irq)) {
|
irq->dest_id == 0xff && kvm_lowest_prio_delivery(irq)) {
|
||||||
printk(KERN_INFO "kvm: apic: phys broadcast and lowest prio\n");
|
printk(KERN_INFO "kvm: apic: phys broadcast and lowest prio\n");
|
||||||
irq->delivery_mode = APIC_DM_FIXED;
|
irq->delivery_mode = APIC_DM_FIXED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kvm_irq_delivery_to_apic_fast(kvm, src, irq, &r, dest_map))
|
|
||||||
return r;
|
|
||||||
|
|
||||||
memset(dest_vcpu_bitmap, 0, sizeof(dest_vcpu_bitmap));
|
memset(dest_vcpu_bitmap, 0, sizeof(dest_vcpu_bitmap));
|
||||||
|
|
||||||
kvm_for_each_vcpu(i, vcpu, kvm) {
|
kvm_for_each_vcpu(i, vcpu, kvm) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче