From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOUuv-0008FO-QS for qemu-devel@nongnu.org; Tue, 24 Sep 2013 11:52:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOUun-0006Yc-CC for qemu-devel@nongnu.org; Tue, 24 Sep 2013 11:52:49 -0400 Received: from mail-qe0-x236.google.com ([2607:f8b0:400d:c02::236]:43699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOUun-0006YY-76 for qemu-devel@nongnu.org; Tue, 24 Sep 2013 11:52:41 -0400 Received: by mail-qe0-f54.google.com with SMTP id cy11so3329119qeb.13 for ; Tue, 24 Sep 2013 08:52:40 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 24 Sep 2013 17:52:49 +0200 Message-Id: <1380037969-26411-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH] icount: disable icount with multiprocessor guests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org 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 --- 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