[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-5.1 v3 1/2] exec: Restrict icount to softmmu
From: |
Claudio Fontana |
Subject: |
Re: [PATCH-for-5.1 v3 1/2] exec: Restrict icount to softmmu |
Date: |
Wed, 5 Aug 2020 12:12:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
Hi Philippe,
could you take a look if this series already addresses the issue?
https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg00067.html
Everything icount related is already moved to softmmu and made TCG only.
I will post a new version of the series today with a couple changes;
the series could then be ready if HVF is already ready with its
synchronize_state implementation? Otherwise we'd have to hold back the HVF
patch.
Thanks!
Claudio
On 8/5/20 12:01 PM, Philippe Mathieu-Daudé wrote:
> 'icount' feature is only meaningful when using softmmu.
> Move it out of the globally used exec.c, and define it as
> 'false' in user-mode emulation.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> include/sysemu/cpus.h | 4 ++++
> exec.c | 4 ----
> softmmu/cpus.c | 7 +++++++
> 3 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h
> index 3c1da6a018..d8442aa9f0 100644
> --- a/include/sysemu/cpus.h
> +++ b/include/sysemu/cpus.h
> @@ -11,9 +11,13 @@ void pause_all_vcpus(void);
> void cpu_stop_current(void);
> void cpu_ticks_init(void);
>
> +#if !defined(CONFIG_USER_ONLY)
> void configure_icount(QemuOpts *opts, Error **errp);
> extern int use_icount;
> extern int icount_align_option;
> +#else
> +#define use_icount false
> +#endif
>
> /* drift information for info jit command */
> extern int64_t max_delay;
> diff --git a/exec.c b/exec.c
> index 6f381f98e2..a89ffa93c1 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -102,10 +102,6 @@ uintptr_t qemu_host_page_size;
> intptr_t qemu_host_page_mask;
>
> #if !defined(CONFIG_USER_ONLY)
> -/* 0 = Do not count executed instructions.
> - 1 = Precise instruction counting.
> - 2 = Adaptive rate instruction counting. */
> -int use_icount;
>
> typedef struct PhysPageEntry PhysPageEntry;
>
> diff --git a/softmmu/cpus.c b/softmmu/cpus.c
> index a802e899ab..a4772034c0 100644
> --- a/softmmu/cpus.c
> +++ b/softmmu/cpus.c
> @@ -81,6 +81,13 @@
>
> #endif /* CONFIG_LINUX */
>
> +/*
> + * 0 = Do not count executed instructions.
> + * 1 = Precise instruction counting.
> + * 2 = Adaptive rate instruction counting.
> + */
> +int use_icount;
> +
> static QemuMutex qemu_global_mutex;
>
> int64_t max_delay;
>