* [PATCH] device-assignment: fix failure to exit on shared IRQ
@ 2010-05-12 9:12 Alex Williamson
2010-05-12 19:54 ` Chris Wright
2010-05-13 22:41 ` Marcelo Tosatti
0 siblings, 2 replies; 3+ messages in thread
From: Alex Williamson @ 2010-05-12 9:12 UTC (permalink / raw)
To: kvm; +Cc: alex.williamson
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>
---
hw/device-assignment.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index b9cc06f..eb31c78 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -1346,7 +1346,7 @@ static int assigned_initfn(struct PCIDevice *pci_dev)
e_intx = dev->dev.config[0x3d] - 1;
dev->intpin = e_intx;
dev->run = 0;
- dev->girq = 0;
+ dev->girq = -1;
dev->h_segnr = dev->host.seg;
dev->h_busnr = dev->host.bus;
dev->h_devfn = PCI_DEVFN(dev->host.dev, dev->host.func);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] device-assignment: fix failure to exit on shared IRQ
2010-05-12 9:12 [PATCH] device-assignment: fix failure to exit on shared IRQ Alex Williamson
@ 2010-05-12 19:54 ` Chris Wright
2010-05-13 22:41 ` Marcelo Tosatti
1 sibling, 0 replies; 3+ messages in thread
From: Chris Wright @ 2010-05-12 19:54 UTC (permalink / raw)
To: Alex Williamson; +Cc: kvm
* Alex Williamson (alex.williamson@redhat.com) wrote:
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] device-assignment: fix failure to exit on shared IRQ
2010-05-12 9:12 [PATCH] device-assignment: fix failure to exit on shared IRQ Alex Williamson
2010-05-12 19:54 ` Chris Wright
@ 2010-05-13 22:41 ` Marcelo Tosatti
1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2010-05-13 22:41 UTC (permalink / raw)
To: Alex Williamson; +Cc: kvm
On Wed, May 12, 2010 at 05:12:10AM -0400, Alex Williamson wrote:
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-14 18:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-12 9:12 [PATCH] device-assignment: fix failure to exit on shared IRQ Alex Williamson
2010-05-12 19:54 ` Chris Wright
2010-05-13 22:41 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).