From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [Qemu-devel] [PATCH] icount: disable icount with multiprocessor guests
Date: Tue, 24 Sep 2013 17:52:49 +0200 [thread overview]
Message-ID: <1380037969-26411-1-git-send-email-pbonzini@redhat.com> (raw)
If -icount is enabled with multiprocessor guests, all CPUs increment
the same counter, which then basically runs too fast by a factor of
smp_cpus. This makes little sense and complicates further a feature
whose implementation is pretty obscure already.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
cpus.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/cpus.c b/cpus.c
index 6fb2bc8..e74166e 100644
--- a/cpus.c
+++ b/cpus.c
@@ -401,6 +401,11 @@ void configure_icount(const char *option)
return;
}
+ if (smp_cpus > 1) {
+ fprintf(stderr, "-icount is not allowed with SMP guests\n");
+ exit(1);
+ }
+
icount_warp_timer = timer_new_ns(QEMU_CLOCK_REALTIME,
icount_warp_rt, NULL);
if (strcmp(option, "auto") != 0) {
--
1.8.3.1
next reply other threads:[~2013-09-24 15:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-24 15:52 Paolo Bonzini [this message]
2013-09-24 23:39 ` [Qemu-devel] [PATCH] icount: disable icount with multiprocessor guests Peter Maydell
2013-09-27 8:23 ` Paolo Bonzini
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=1380037969-26411-1-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).