[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] This patch fixes processing of rfi instructions
From: |
Mark Cave-Ayland |
Subject: |
Re: [Qemu-devel] [PATCH] This patch fixes processing of rfi instructions in icount mode. |
Date: |
Wed, 7 Nov 2018 18:25:19 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
On 30/10/2018 12:21, Pavel Dovgalyuk wrote:
> From: Maria Klimushenkova <address@hidden>
>
> 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 <address@hidden>
> Signed-off-by: Pavel Dovgalyuk <address@hidden>
> ---
> 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 <address@hidden>
ATB,
Mark.
- Re: [Qemu-devel] [PATCH] This patch fixes processing of rfi instructions in icount mode.,
Mark Cave-Ayland <=