From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPpsQ-0000zu-Se for qemu-devel@nongnu.org; Mon, 14 Nov 2011 01:18:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RPpsP-0004sj-PY for qemu-devel@nongnu.org; Mon, 14 Nov 2011 01:18:42 -0500 Received: from e28smtp09.in.ibm.com ([122.248.162.9]:41500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RPpsP-0004sW-5f for qemu-devel@nongnu.org; Mon, 14 Nov 2011 01:18:41 -0500 Received: from /spool/local by e28smtp09.in.ibm.com with XMail ESMTP for from ; Mon, 14 Nov 2011 11:48:33 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pAE6I3YZ327932 for ; Mon, 14 Nov 2011 11:48:03 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pAE6I3TC004601 for ; Mon, 14 Nov 2011 17:18:03 +1100 Message-ID: <4EC0B27C.6020202@linux.vnet.ibm.com> Date: Mon, 14 Nov 2011 14:17:32 +0800 From: "Cao,Bing Bu" MIME-Version: 1.0 References: <4EBBB4B4.8030103@redhat.com> <1320995379-20861-1-git-send-email-mars@linux.vnet.ibm.com> In-Reply-To: <1320995379-20861-1-git-send-email-mars@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Give an error when using -icount option with kvm accelerator List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Cao,Bing Bu" Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, jcmvbkbc@gmail.com On 11/11/2011 03:09 PM, Cao,Bing Bu wrote: > 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: Cao,Bing Bu > --- > vl.c | 8 ++++++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/vl.c b/vl.c > index f169aac..d2857a4 100644 > --- a/vl.c > +++ b/vl.c > @@ -3226,8 +3226,12 @@ int main(int argc, char **argv, char **envp) > fprintf(stderr, "could not initialize alarm timer\n"); > exit(1); > } > - configure_icount(icount_option); > - > + if (!kvm_enabled()) { > + configure_icount(icount_option); > + } else { > + fprintf(stderr, "-icount option only allowed without kvm accelerator\n"); > + exit(1); > + } > if (net_init_clients()< 0) { > exit(1); > } This patch has a obvious bug,so bad! Sorry for that, and the new patch has been added by Max Filippov. + if (icount_option && (kvm_enabled() || xen_enabled())) { + fprintf(stderr, "-icount is not allowed with kvm or xen\n"); + exit(1); + } configure_icount(icount_option); -- Best Regards, Cao,Bing Bu