qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Claudio Fontana <cfontana@suse.de>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Riku Voipio" <riku.voipio@iki.fi>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Huacai Chen" <chenhuacai@kernel.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH 3/6] accel/tcg: Restrict tb_gen_code() from other accelerators
Date: Mon, 18 Jan 2021 10:12:15 +0100	[thread overview]
Message-ID: <7359d7bd-ed7d-71ad-3610-b839c9c99fd5@suse.de> (raw)
In-Reply-To: <20210117164813.4101761-4-f4bug@amsat.org>

On 1/17/21 5:48 PM, Philippe Mathieu-Daudé wrote:
> tb_gen_code() is only called within TCG accelerator,
> declare it locally.

Is this used only in accel/tcg/cpu-exec.c ? Should it be a static function there?

Ciao,

Claudio

> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  accel/tcg/internal.h    | 5 +++++
>  include/exec/exec-all.h | 5 -----
>  accel/tcg/cpu-exec.c    | 1 +
>  accel/tcg/user-exec.c   | 1 +
>  4 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/accel/tcg/internal.h b/accel/tcg/internal.h
> index 4981d98dbfd..f7e18c3498b 100644
> --- a/accel/tcg/internal.h
> +++ b/accel/tcg/internal.h
> @@ -11,6 +11,11 @@
>  
>  #include "exec/exec-all.h"
>  
> +TranslationBlock *tb_gen_code(CPUState *cpu,
> +                              target_ulong pc, target_ulong cs_base,
> +                              uint32_t flags,
> +                              int cflags);
> +
>  void tb_flush_jmp_cache(CPUState *cpu, target_ulong addr);
>  
>  #endif
> diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
> index 1e3e7cf8e78..3acc7c2943a 100644
> --- a/include/exec/exec-all.h
> +++ b/include/exec/exec-all.h
> @@ -64,11 +64,6 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t searched_pc, bool will_exit);
>  
>  void QEMU_NORETURN cpu_loop_exit_noexc(CPUState *cpu);
>  void QEMU_NORETURN cpu_io_recompile(CPUState *cpu, uintptr_t retaddr);
> -TranslationBlock *tb_gen_code(CPUState *cpu,
> -                              target_ulong pc, target_ulong cs_base,
> -                              uint32_t flags,
> -                              int cflags);
> -
>  void QEMU_NORETURN cpu_loop_exit(CPUState *cpu);
>  void QEMU_NORETURN cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc);
>  void QEMU_NORETURN cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc);
> diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
> index e0df9b6a1dd..43676ae8d13 100644
> --- a/accel/tcg/cpu-exec.c
> +++ b/accel/tcg/cpu-exec.c
> @@ -41,6 +41,7 @@
>  #include "exec/cpu-all.h"
>  #include "sysemu/cpu-timers.h"
>  #include "sysemu/replay.h"
> +#include "internal.h"
>  
>  /* -icount align implementation. */
>  
> diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
> index 1215b55ca08..05f3c09cbf9 100644
> --- a/accel/tcg/user-exec.c
> +++ b/accel/tcg/user-exec.c
> @@ -28,6 +28,7 @@
>  #include "qemu/atomic128.h"
>  #include "trace/trace-root.h"
>  #include "trace/mem.h"
> +#include "internal.h"
>  
>  #undef EAX
>  #undef ECX
> 



  reply	other threads:[~2021-01-18  9:18 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-17 16:48 [PATCH 0/6] accel: Restrict TCG-specific code Philippe Mathieu-Daudé
2021-01-17 16:48 ` [PATCH 1/6] accel/tcg: Make cpu_gen_init() static Philippe Mathieu-Daudé
2021-01-18  9:14   ` Claudio Fontana
2021-01-21  5:54   ` Richard Henderson
2021-01-17 16:48 ` [PATCH 2/6] accel/tcg: Restrict tb_flush_jmp_cache() from other accelerators Philippe Mathieu-Daudé
2021-01-18  9:14   ` Claudio Fontana
2021-01-21  5:55   ` Richard Henderson
2021-01-17 16:48 ` [PATCH 3/6] accel/tcg: Restrict tb_gen_code() " Philippe Mathieu-Daudé
2021-01-18  9:12   ` Claudio Fontana [this message]
2021-01-21  6:06     ` Richard Henderson
2021-03-15 13:52       ` Claudio Fontana
2021-03-15 14:48         ` Philippe Mathieu-Daudé
2021-01-17 16:48 ` [PATCH 4/6] accel/tcg: Declare missing cpu_loop_exit*() stubs Philippe Mathieu-Daudé
2021-01-18  9:02   ` Claudio Fontana
2021-01-18  9:29   ` Claudio Fontana
2021-01-18  9:39     ` Philippe Mathieu-Daudé
2021-01-18 10:03       ` Claudio Fontana
2021-02-15 12:01         ` Alex Bennée
2021-01-21  6:21   ` Richard Henderson
2021-01-17 16:48 ` [RFC PATCH 5/6] accel/tcg: Restrict cpu_io_recompile() from other accelerators Philippe Mathieu-Daudé
2021-01-18  9:04   ` Claudio Fontana
2021-01-21  6:53   ` Richard Henderson
2021-01-17 16:48 ` [RFC PATCH 6/6] softmmu: Restrict watchpoint handlers to TCG accelerator Philippe Mathieu-Daudé
2021-01-18  9:10   ` Claudio Fontana
2021-01-18  9:36     ` Philippe Mathieu-Daudé
2021-02-15 10:42       ` Claudio Fontana
2021-02-15 12:05         ` Alex Bennée
2021-01-21  6:56   ` Richard Henderson
2021-01-18  9:20 ` [PATCH 0/6] accel: Restrict TCG-specific code Claudio Fontana

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=7359d7bd-ed7d-71ad-3610-b839c9c99fd5@suse.de \
    --to=cfontana@suse.de \
    --cc=alex.bennee@linaro.org \
    --cc=chenhuacai@kernel.org \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=riku.voipio@iki.fi \
    /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).