From: David Gibson <david@gibson.dropbear.id.au>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>,
qemu-devel@nongnu.org, maria.klimushenkova@ispras.ru,
dovgaluk@ispras.ru, agraf@suse.de
Subject: Re: [Qemu-devel] [PATCH] This patch fixes processing of rfi instructions in icount mode.
Date: Thu, 8 Nov 2018 12:09:51 +1100 [thread overview]
Message-ID: <20181108010951.GK5575@umbus.fritz.box> (raw)
In-Reply-To: <2024ff61-7744-3ea5-f017-a48340fd5c36@ilande.co.uk>
[-- Attachment #1: Type: text/plain, Size: 2174 bytes --]
On Wed, Nov 07, 2018 at 06:25:19PM +0000, Mark Cave-Ayland wrote:
> On 30/10/2018 12:21, Pavel Dovgalyuk wrote:
>
> > From: Maria Klimushenkova <maria.klimushenkova@ispras.ru>
> >
> > In this mode writing to interrupt/peripheral state is controlled
> > by can_do_io flag. This flag must be set explicitly before helper
> > function invocation.
> >
> > Signed-off-by: Maria Klimushenkova <maria.klimushenkova@ispras.ru>
> > Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> > ---
> > target/ppc/translate.c | 12 ++++++++++++
> > 1 file changed, 12 insertions(+)
> >
> > diff --git a/target/ppc/translate.c b/target/ppc/translate.c
> > index 987ce6e..980862c 100644
> > --- a/target/ppc/translate.c
> > +++ b/target/ppc/translate.c
> > @@ -3878,9 +3878,15 @@ static void gen_rfi(DisasContext *ctx)
> > }
> > /* Restore CPU state */
> > CHK_SV;
> > + if (tb_cflags(ctx->base.tb) & CF_USE_ICOUNT) {
> > + gen_io_start();
> > + }
> > gen_update_cfar(ctx, ctx->base.pc_next - 4);
> > gen_helper_rfi(cpu_env);
> > gen_sync_exception(ctx);
> > + if (tb_cflags(ctx->base.tb) & CF_USE_ICOUNT) {
> > + gen_io_end();
> > + }
> > #endif
> > }
> >
> > @@ -3892,9 +3898,15 @@ static void gen_rfid(DisasContext *ctx)
> > #else
> > /* Restore CPU state */
> > CHK_SV;
> > + if (tb_cflags(ctx->base.tb) & CF_USE_ICOUNT) {
> > + gen_io_start();
> > + }
> > gen_update_cfar(ctx, ctx->base.pc_next - 4);
> > gen_helper_rfid(cpu_env);
> > gen_sync_exception(ctx);
> > + if (tb_cflags(ctx->base.tb) & CF_USE_ICOUNT) {
> > + gen_io_end();
> > + }
> > #endif
> > }
>
> I've given this patch a spin on top of ppc-for-3.1 and it allows my test images to
> boot with icount enabled without asserting, so:
>
> Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Good enough for me. Applied to ppc-for-3.1.
--
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-11-08 1:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 12:21 [Qemu-devel] [PATCH] This patch fixes processing of rfi instructions in icount mode Pavel Dovgalyuk
2018-11-07 18:25 ` Mark Cave-Ayland
2018-11-08 1:09 ` David Gibson [this message]
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=20181108010951.GK5575@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=Pavel.Dovgaluk@ispras.ru \
--cc=agraf@suse.de \
--cc=dovgaluk@ispras.ru \
--cc=maria.klimushenkova@ispras.ru \
--cc=mark.cave-ayland@ilande.co.uk \
--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).