qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: agraf@suse.de
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	David Gibson <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [PATCH 6/7] pseries: Fix some small errors in XICS logic
Date: Mon,  8 Apr 2013 15:08:21 +1000	[thread overview]
Message-ID: <1365397702-1515-7-git-send-email-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <1365397702-1515-1-git-send-email-david@gibson.dropbear.id.au>

Under certain circumstances the emulation for the pseries "XICS" interrupt
controller was clearing a pending interrupt from the XISR register, without
also clearing the corresponding priority variable.  This will cause
problems later when can trigger sanity checks in the under-development
in-kernel XICS implementation.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 hw/ppc/xics.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/ppc/xics.c b/hw/ppc/xics.c
index 374da5b..207691b 100644
--- a/hw/ppc/xics.c
+++ b/hw/ppc/xics.c
@@ -101,6 +101,7 @@ static void icp_set_cppr(struct icp_state *icp, int server, uint8_t cppr)
         if (XISR(ss) && (cppr <= ss->pending_priority)) {
             old_xisr = XISR(ss);
             ss->xirr &= ~XISR_MASK; /* Clear XISR */
+            ss->pending_priority = 0xff;
             qemu_irq_lower(ss->output);
             ics_reject(icp->ics, old_xisr);
         }
@@ -127,6 +128,7 @@ static uint32_t icp_accept(struct icp_server_state *ss)
 
     qemu_irq_lower(ss->output);
     ss->xirr = ss->pending_priority << 24;
+    ss->pending_priority = 0xff;
 
     trace_xics_icp_accept(xirr, ss->xirr);
 
-- 
1.7.10.4

  parent reply	other threads:[~2013-04-08  5:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08  5:08 [Qemu-devel] [0/7] Pending pseries updates David Gibson
2013-04-08  5:08 ` [Qemu-devel] [PATCH 1/7] pseries: Convert VIO code to QOM style type safe(ish) casts David Gibson
2013-04-08  5:08 ` [Qemu-devel] [PATCH 2/7] pseries: Generate device paths for VIO devices David Gibson
2013-04-08  5:08 ` [Qemu-devel] [PATCH 3/7] pseries: Fix incorrect calculation of RMA size in certain configurations David Gibson
2013-04-08  5:08 ` [Qemu-devel] [PATCH 4/7] pseries: Fixes and enhancements to L1 cache properties David Gibson
2013-04-08  5:08 ` [Qemu-devel] [PATCH 5/7] target-ppc: Add more stubs for POWER7 PMU registers David Gibson
2013-04-08  5:08 ` David Gibson [this message]
2013-04-08  5:08 ` [Qemu-devel] [PATCH 7/7] target-ppc: Synchronize VPA state with KVM David Gibson
2013-04-19 15:27 ` [Qemu-devel] [0/7] Pending pseries updates Alexander Graf

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=1365397702-1515-7-git-send-email-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).