On Fri, Oct 19, 2012 at 04:43:38PM -0400, Jason Baron wrote: > From: Jan Kiszka <jan.kis...@siemens.com> > > Avoid passing a non-PCI IRQ to ich9_gsi_to_pirq. It's wrong and triggers > an assertion. > > Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> > Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> > Signed-off-by: Jason Baron <jba...@redhat.com>
Thanks, applied. > --- > hw/lpc_ich9.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/hw/lpc_ich9.c b/hw/lpc_ich9.c > index d9fd9de..a47d7a9 100644 > --- a/hw/lpc_ich9.c > +++ b/hw/lpc_ich9.c > @@ -264,9 +264,11 @@ static int ich9_gsi_to_pirq(int gsi) > > static void ich9_lpc_update_apic(ICH9LPCState *lpc, int gsi) > { > - int level; > + int level = 0; > > - level = pci_bus_get_irq_level(lpc->d.bus, ich9_gsi_to_pirq(gsi)); > + if (gsi >= ICH9_LPC_PIC_NUM_PINS) { > + level |= pci_bus_get_irq_level(lpc->d.bus, ich9_gsi_to_pirq(gsi)); > + } > if (gsi == ich9_lpc_sci_irq(lpc)) { > level |= lpc->sci_level; > } > -- > 1.7.1