public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm tools: Fix IRQ mapping
@ 2011-08-11  9:04 Sasha Levin
  2011-08-11  9:04 ` [PATCH] kvm tools: Use correct size for VESA memory bar Sasha Levin
  2011-08-11  9:17 ` [PATCH] kvm tools: Fix IRQ mapping Pekka Enberg
  0 siblings, 2 replies; 7+ messages in thread
From: Sasha Levin @ 2011-08-11  9:04 UTC (permalink / raw)
  To: penberg; +Cc: kvm, mingo, asias.hejun, gorcunov, Sasha Levin

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>
---
 tools/kvm/irq.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/kvm/irq.c b/tools/kvm/irq.c
index 85e2238..e35bf18 100644
--- a/tools/kvm/irq.c
+++ b/tools/kvm/irq.c
@@ -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);
 	}
 
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-08-11 13:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-11  9:04 [PATCH] kvm tools: Fix IRQ mapping Sasha Levin
2011-08-11  9:04 ` [PATCH] kvm tools: Use correct size for VESA memory bar Sasha Levin
2011-08-11  9:49   ` walimis
2011-08-11 11:55     ` Sasha Levin
2011-08-11  9:17 ` [PATCH] kvm tools: Fix IRQ mapping Pekka Enberg
2011-08-11 13:54   ` Asias He
2011-08-11 13:42     ` walimis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox