qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Pavel Dovgalyuk" <dovgaluk@ispras.ru>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Richard Henderson" <rth@twiddle.net>
Subject: [PATCH-for-5.1 v2 1/2] exec: Restrict icount to softmmu
Date: Wed,  5 Aug 2020 10:55:25 +0200	[thread overview]
Message-ID: <20200805085526.9787-2-philmd@redhat.com> (raw)
In-Reply-To: <20200805085526.9787-1-philmd@redhat.com>

'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;
-- 
2.21.3



  reply	other threads:[~2020-08-05  8:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05  8:55 [PATCH-for-5.1 v2 0/2] stubs: Fix notify-event stub linkage error on MinGW Philippe Mathieu-Daudé
2020-08-05  8:55 ` Philippe Mathieu-Daudé [this message]
2020-08-05  8:55 ` [PATCH-for-5.1 v2 2/2] stubs: Remove qemu_notify_event() Philippe Mathieu-Daudé
2020-08-05  9:42   ` Philippe Mathieu-Daudé
2020-08-05  9:59     ` Philippe Mathieu-Daudé
2020-08-05 11:49       ` Thomas Huth
2020-08-18  6:34         ` Paolo Bonzini
2020-08-18  6:37 ` [PATCH-for-5.1 v2 0/2] stubs: Fix notify-event stub linkage error on MinGW Paolo Bonzini
2020-08-18  7:09   ` Philippe Mathieu-Daudé

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=20200805085526.9787-2-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=dovgaluk@ispras.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.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).