qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] icount: disable icount with multiprocessor guests
@ 2013-09-24 15:52 Paolo Bonzini
  2013-09-24 23:39 ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2013-09-24 15:52 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-27  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-24 15:52 [Qemu-devel] [PATCH] icount: disable icount with multiprocessor guests Paolo Bonzini
2013-09-24 23:39 ` Peter Maydell
2013-09-27  8:23   ` Paolo Bonzini

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).