From patchwork Thu Nov 10 11:38:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 124857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4008DB6F85 for ; Thu, 10 Nov 2011 22:39:19 +1100 (EST) Received: from localhost ([::1]:37060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROSyM-0001LA-Bt for incoming@patchwork.ozlabs.org; Thu, 10 Nov 2011 06:39:10 -0500 Received: from eggs.gnu.org ([140.186.70.92]:51778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROSyH-0001L5-FU for qemu-devel@nongnu.org; Thu, 10 Nov 2011 06:39:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROSyD-0004gP-N4 for qemu-devel@nongnu.org; Thu, 10 Nov 2011 06:39:05 -0500 Received: from [195.131.132.186] (port=45509 helo=shelob.oktetlabs.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROSyD-0004g5-Bx for qemu-devel@nongnu.org; Thu, 10 Nov 2011 06:39:01 -0500 Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id 3614D7F526; Thu, 10 Nov 2011 15:38:56 +0400 (MSK) Received: from marish.oktetlabs.ru (marish.oktetlabs.ru [192.168.38.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPS id 2F0E47F4CE; Thu, 10 Nov 2011 15:38:53 +0400 (MSK) X-DKIM: Sendmail DKIM Filter v2.8.2 shelob.oktetlabs.ru 2F0E47F4CE Authentication-Results: shelob.oktetlabs.ru/2F0E47F4CE; dkim=none (no signature) header.i=unknown; dkim-adsp=none Received: from jcmvbkbc by marish.oktetlabs.ru with local (Exim 4.72) (envelope-from ) id 1ROSy6-00019o-3b; Thu, 10 Nov 2011 15:38:54 +0400 From: Max Filippov To: Date: Thu, 10 Nov 2011 15:38:42 +0400 Message-Id: <1320925122-4422-1-git-send-email-jcmvbkbc@gmail.com> X-Mailer: git-send-email 1.7.2.5 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 195.131.132.186 Cc: Paolo Bonzini , Max Filippov Subject: [Qemu-devel] [PATCH v2] vl.c: prohibit simultaneous use of -icount with kvm or xen X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org With -icount, The vm_clock is updated with help from TCG (it counts instructions at 2^ICOUNT ns/instructions). With KVM, the instruction count is not available so KVM cannot provide this help. Signed-off-by: Max Filippov Acked-by: Paolo Bonzini --- v1 -> v2 changes: - cover both kvm and xen; - add explanation text. --- vl.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index f169aac..bb601e2 100644 --- a/vl.c +++ b/vl.c @@ -3226,6 +3226,11 @@ int main(int argc, char **argv, char **envp) fprintf(stderr, "could not initialize alarm timer\n"); exit(1); } + + if (icount_option && (kvm_enabled() || xen_enabled())) { + fprintf(stderr, "-icount is not allowed with kvm or xen\n"); + exit(1); + } configure_icount(icount_option); if (net_init_clients() < 0) {