mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-06-16 02:15:47 +00:00
kvm tools: Fix IRQ mapping
This thread fixes two issues: - Slave IRQCHIP was mapped wrong, this caused all IRQs which belong to it to be ignored (breaking such things as the mouse). - Line 2 was being mapped, since it's the link between slave and master IRQCHIPs it shouldn't be. Signed-off-by: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
@@ -147,17 +147,18 @@ void irq__init(struct kvm *kvm)
|
||||
|
||||
/* Hook first 8 GSIs to master IRQCHIP */
|
||||
for (i = 0; i < 8; i++)
|
||||
irq__add_routing(i, KVM_IRQ_ROUTING_IRQCHIP, IRQCHIP_MASTER, i);
|
||||
if (i != 2)
|
||||
irq__add_routing(i, KVM_IRQ_ROUTING_IRQCHIP, IRQCHIP_MASTER, i);
|
||||
|
||||
/* Hook next 8 GSIs to slave IRQCHIP */
|
||||
for (i = 8; i < 16; i++)
|
||||
irq__add_routing(i, KVM_IRQ_ROUTING_IRQCHIP, IRQCHIP_SLAVE, 8-i);
|
||||
irq__add_routing(i, KVM_IRQ_ROUTING_IRQCHIP, IRQCHIP_SLAVE, i - 8);
|
||||
|
||||
/* Last but not least, IOAPIC */
|
||||
for (i = 0; i < 24; i++) {
|
||||
if (i == 0)
|
||||
irq__add_routing(i, KVM_IRQ_ROUTING_IRQCHIP, IRQCHIP_IOAPIC, 2);
|
||||
else
|
||||
else if (i != 2)
|
||||
irq__add_routing(i, KVM_IRQ_ROUTING_IRQCHIP, IRQCHIP_IOAPIC, i);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user