All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: Paul Mackerras <paulus@samba.org>,
	qemu-ppc@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] xics-kvm: fix reset function
Date: Tue, 04 Mar 2014 18:03:35 +1100	[thread overview]
Message-ID: <53157AC7.7070303@ozlabs.ru> (raw)
In-Reply-To: <1392253715-5416-1-git-send-email-aik@ozlabs.ru>

On 02/13/2014 12:08 PM, Alexey Kardashevskiy wrote:
> Currently interrupt priorities are set to 0 (highest) at the very
> beginning of the guest execution which is not correct and makes the guest
> produce random interrupt error messages such as:
> "Interrupt 0x1001 (real) is invalid, disabling it".
> This also prevents interrupt states from correct migration.
> 
> This initializes priority to 0xFF as the emulated XICS does.


Ping? Pretty simple patch suggested by Paul Mackerras.



> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
> ---
>  hw/intc/xics_kvm.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c
> index c203646..eaf94d9 100644
> --- a/hw/intc/xics_kvm.c
> +++ b/hw/intc/xics_kvm.c
> @@ -269,6 +269,15 @@ static void ics_kvm_set_irq(void *opaque, int srcno, int val)
>  
>  static void ics_kvm_reset(DeviceState *dev)
>  {
> +    ICSState *ics = ICS(dev);
> +    int i;
> +
> +    memset(ics->irqs, 0, sizeof(ICSIRQState) * ics->nr_irqs);
> +    for (i = 0; i < ics->nr_irqs; i++) {
> +        ics->irqs[i].priority = 0xff;
> +        ics->irqs[i].saved_priority = 0xff;
> +    }
> +
>      ics_set_kvm_state(ICS(dev), 1);
>  }
>  
> 


-- 
Alexey

  reply	other threads:[~2014-03-04  7:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13  1:08 [Qemu-devel] [PATCH] xics-kvm: fix reset function Alexey Kardashevskiy
2014-03-04  7:03 ` Alexey Kardashevskiy [this message]
2014-03-12 14:42   ` Andreas Färber
2014-03-12 23:00     ` Alexey Kardashevskiy
2014-03-12 23:45       ` Andreas Färber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53157AC7.7070303@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=agraf@suse.de \
    --cc=paulus@samba.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.