From: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
To: Christoffer Dall <christoffer.dall@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/3] arm_gic: SGIs for GICD_ICFGR are WI
Date: Sat, 16 Aug 2014 21:50:16 +0200 [thread overview]
Message-ID: <20140816195016.GC27311@os.inf.tu-dresden.de> (raw)
In-Reply-To: <20140815121217.GB19635@cbox>
On Fri Aug 15, 2014 at 14:12:17 +0200, Christoffer Dall wrote:
> On Sun, Aug 03, 2014 at 10:53:46AM +0200, Adam Lackorzynski wrote:
> > Writes to SGIs for GICD_ICFGR register must be ignored.
> >
> > Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
> > ---
> > hw/intc/arm_gic.c | 11 +++++++----
> > 1 file changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
> > index d2b1aaf..cd6e6ea 100644
> > --- a/hw/intc/arm_gic.c
> > +++ b/hw/intc/arm_gic.c
> > @@ -566,10 +566,13 @@ static void gic_dist_writeb(void *opaque, hwaddr offset,
> > } else {
> > GIC_CLEAR_MODEL(irq + i);
> > }
> > - if (value & (2 << (i * 2))) {
> > - GIC_SET_EDGE_TRIGGER(irq + i);
> > - } else {
> > - GIC_CLEAR_EDGE_TRIGGER(irq + i);
> > + /* SGIs are WI */
> > + if (irq >= 16) {
> > + if (value & (2 << (i * 2))) {
> > + GIC_SET_EDGE_TRIGGER(irq + i);
> > + } else {
> > + GIC_CLEAR_EDGE_TRIGGER(irq + i);
> > + }
> > }
> > }
> > } else if (offset < 0xf10) {
>
> Actually, this looks a bit weird given that you do set the model bit,
> which should probably be treated as WI/RAZ for a GICv2 emulation, but
> you don't set the edge trigger bit for them.
I've addressed that in a separate patch now. However, I'm not sure got
the revision check right. Comments appreciated!
> I think a cleaner fix might be to to just change the existing check from
> (irq < GIC_INTERNAL) to (irq < GIT_NR_SGIS), then you also don't need
> the next patch.
Ok, new series sent out.
Adam
--
Adam adam@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
next prev parent reply other threads:[~2014-08-16 19:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-03 8:53 [Qemu-devel] [PATCH 0/3] arm_gic: Improve handling of GICD_ICFGR Adam Lackorzynski
2014-08-03 8:53 ` [Qemu-devel] [PATCH 1/3] arm_gic: Fix read " Adam Lackorzynski
2014-08-15 12:03 ` Christoffer Dall
2014-08-03 8:53 ` [Qemu-devel] [PATCH 2/3] arm_gic: SGIs for GICD_ICFGR are WI Adam Lackorzynski
2014-08-15 12:07 ` Christoffer Dall
2014-08-15 12:10 ` Adam Lackorzynski
2014-08-15 12:12 ` Christoffer Dall
2014-08-16 19:50 ` Adam Lackorzynski [this message]
2014-08-03 8:53 ` [Qemu-devel] [PATCH 3/3] arm_gic: GICD_ICFGR: Do not force edge-triggered PPIs Adam Lackorzynski
2014-08-03 13:21 ` [Qemu-devel] [PATCH 0/3] arm_gic: Improve handling of GICD_ICFGR Peter Maydell
2014-08-03 19:36 ` Christoffer Dall
2014-08-11 17:26 ` Adam Lackorzynski
2014-08-11 17:40 ` Christoffer Dall
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=20140816195016.GC27311@os.inf.tu-dresden.de \
--to=adam@os.inf.tu-dresden.de \
--cc=christoffer.dall@linaro.org \
--cc=qemu-devel@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).