device-assignment: fix failure to exit on shared IRQ
commit33e0628b713222489eed42c677bb7126fd486802
authorAlex Williamson <alex.williamson@redhat.com>
Wed, 12 May 2010 09:12:10 +0000 (12 05:12 -0400)
committerMarcelo Tosatti <mtosatti@redhat.com>
Thu, 13 May 2010 22:41:13 +0000 (13 19:41 -0300)
treee4991bec1bb272cecd4c4a654aea92cabc1024b2
parentd8a6bc95aeb7984b935631986158ff75d5c9dd0f
device-assignment: fix failure to exit on shared IRQ

Since c1699988, piix config space isn't programmed until the first
system reset.  This means that when we call assign_irq() from
assigned_initfn(), we're going to get back an irq of 0x0, which
unfortunately matches our initialization value, so we don't bother
to call kvm_assign_irq().  Switch to a -1 initializer so we can
test whether kvm_assign_irq() is going to succeed and allow the
process to exit if it doesn't.  The guest irq will get reset to a
more appropriate value on system reset anyway.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Chris Wright <chrisw@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
hw/device-assignment.c