qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PATCH 1/2] ppc/xics: Fix stale irq->status bits after ge


From: David Gibson
Subject: Re: [Qemu-ppc] [PATCH 1/2] ppc/xics: Fix stale irq->status bits after get
Date: Mon, 1 May 2017 16:13:37 +1000
User-agent: Mutt/1.8.0 (2017-02-23)

On Thu, Apr 27, 2017 at 04:31:53PM +1000, Sam Bobroff wrote:
> ics_get_kvm_state() "or"s set bits into irq->status but does not mask
> out clear bits.
> 
> Correct this by initializing the IRQ status to zero before adding bits
> to it.
> 
> Signed-off-by: Sam Bobroff <address@hidden>

This definitely looks like a bugfix, applied to ppc-for-2.10.

> ---
>  hw/intc/xics_kvm.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
> index 42e0e0ef84..03c1fc77cb 100644
> --- a/hw/intc/xics_kvm.c
> +++ b/hw/intc/xics_kvm.c
> @@ -213,6 +213,7 @@ static void ics_get_kvm_state(ICSState *ics)
>              irq->priority = irq->saved_priority;
>          }
>  
> +        irq->status = 0;
>          if (state & KVM_XICS_PENDING) {
>              if (state & KVM_XICS_LEVEL_SENSITIVE) {
>                  irq->status |= XICS_STATUS_ASSERTED;

-- 
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]