qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 22/25] spapr: add XIVE support to spapr_irq_get_


From: David Gibson
Subject: Re: [Qemu-devel] [PATCH 22/25] spapr: add XIVE support to spapr_irq_get_qirq()
Date: Mon, 4 Dec 2017 18:52:50 +1100
User-agent: Mutt/1.9.1 (2017-09-22)

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 <address@hidden>
> ---
>  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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]