From: Claudio Fontana <cfontana@suse.de>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Roman Bolshakov <r.bolshakov@yadro.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [PATCH-for-5.1 v3 1/2] exec: Restrict icount to softmmu
Date: Wed, 5 Aug 2020 12:12:42 +0200 [thread overview]
Message-ID: <f29544ab-d583-d6ed-48da-aa49c05ab966@suse.de> (raw)
In-Reply-To: <20200805100126.25583-2-philmd@redhat.com>
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;
>
next prev parent reply other threads:[~2020-08-05 10:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-05 10:01 [PATCH-for-5.1 v3 0/2] stubs: Fix notify-event stub linkage error on MinGW Philippe Mathieu-Daudé
2020-08-05 10:01 ` [PATCH-for-5.1 v3 1/2] exec: Restrict icount to softmmu Philippe Mathieu-Daudé
2020-08-05 10:12 ` Claudio Fontana [this message]
2020-08-05 10:45 ` Philippe Mathieu-Daudé
2020-08-05 16:08 ` Richard Henderson
2020-08-05 10:01 ` [PATCH-for-5.1 v3 2/2] stubs: Remove qemu_notify_event() Philippe Mathieu-Daudé
2020-08-05 11:47 ` [PATCH-for-5.1 v3 0/2] stubs: Fix notify-event stub linkage error on MinGW Thomas Huth
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=f29544ab-d583-d6ed-48da-aa49c05ab966@suse.de \
--to=cfontana@suse.de \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=r.bolshakov@yadro.com \
/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).