On Thu, Nov 23, 2017 at 02:29:52PM +0100, Cédric Le Goater wrote: > The XIVE object has its own set of qirqs which is to be used when the > XIVE interrupt mode is activated. > > Signed-off-by: Cédric Le Goater <c...@kaod.org> > --- > hw/ppc/spapr.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index 734706c18cb3..a91ec1c0751a 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -3746,8 +3746,12 @@ qemu_irq spapr_irq_get_qirq(sPAPRMachineState *spapr, > int irq) > { > ICSState *ics = spapr->ics; > > - if (ics_valid_irq(ics, irq)) { > - return ics->qirqs[irq - ics->offset]; > + if (spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) { > + return spapr->xive->qirqs[irq];
You should have a xive helper function for this - spapr code shouldn't be reaching into the internal XIVE structure. > + } else { > + if (ics_valid_irq(ics, irq)) { > + return ics->qirqs[irq - ics->offset]; > + } > } > > return NULL; -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature