KVM: ioapic: fix lost interrupt when changing a device's irq
authorAvi Kivity <avi@qumranet.com>
Tue, 17 Jun 2008 22:36:36 +0000 (15:36 -0700)
committerAvi Kivity <avi@qumranet.com>
Tue, 24 Jun 2008 09:23:55 +0000 (12:23 +0300)
The ioapic acknowledge path translates interrupt vectors to irqs.  It
currently uses a first match algorithm, stopping when it finds the first
redirection table entry containing the vector.  That fails however if the
guest changes the irq to a different line, leaving the old redirection table
entry in place (though masked).  Result is interrupts not making it to the
guest.

Fix by always scanning the entire redirection table.

Signed-off-by: Avi Kivity <avi@qumranet.com>

No differences found