qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [Qemu-devel] [PULL 20/22] This patch fixes processing of


From: Greg Kurz
Subject: Re: [Qemu-ppc] [Qemu-devel] [PULL 20/22] This patch fixes processing of rfi instructions in icount mode.
Date: Thu, 8 Nov 2018 14:17:33 +0100

On Thu,  8 Nov 2018 23:16:44 +1100
David Gibson <address@hidden> 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>
> Tested-by: Mark Cave-Ayland <address@hidden>
> Signed-off-by: David Gibson <address@hidden>
> ---

The 'This patch fixes ...' wording in the commit title looks weird, and
it doesn't even mention the target/ppc subsystem...

What about this ?

target/ppc: fix processing of rfi instructions in icount mode

>  target/ppc/translate.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/target/ppc/translate.c b/target/ppc/translate.c
> index fb18cedcf0..2b37910248 100644
> --- a/target/ppc/translate.c
> +++ b/target/ppc/translate.c
> @@ -3919,9 +3919,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
>  }
>  
> @@ -3933,9 +3939,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
>  }
>  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]