From patchwork Mon Feb 27 09:31:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 143163 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 814CAB6FD0 for ; Mon, 27 Feb 2012 20:28:40 +1100 (EST) Received: from localhost ([::1]:55359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1wso-00035s-OS for incoming@patchwork.ozlabs.org; Mon, 27 Feb 2012 04:28:38 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1wsf-00035L-1p for qemu-devel@nongnu.org; Mon, 27 Feb 2012 04:28:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1wsY-0004Zw-Ra for qemu-devel@nongnu.org; Mon, 27 Feb 2012 04:28:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1wsY-0004YX-K8 for qemu-devel@nongnu.org; Mon, 27 Feb 2012 04:28:22 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1R9RfhF006068 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 27 Feb 2012 04:27:41 -0500 Received: from dhcp-5-188.str.redhat.com (vpn1-6-92.ams2.redhat.com [10.36.6.92]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q1R9Rcna023695 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 27 Feb 2012 04:27:39 -0500 Message-ID: <4F4B4D5E.4070609@redhat.com> Date: Mon, 27 Feb 2012 10:31:10 +0100 From: Kevin Wolf User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 MIME-Version: 1.0 To: Paolo Bonzini References: <1330268124-10725-1-git-send-email-stefanha@linux.vnet.ibm.com> <4F4B41E1.3080006@redhat.com> In-Reply-To: <4F4B41E1.3080006@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Zhi Yong Wu , Zhi Yong Wu , Stefan Hajnoczi , qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [PATCH] qed: replace vm_clock with rt_clock for qemu-tool compatibility 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 Am 27.02.2012 09:42, schrieb Paolo Bonzini: > On 02/27/2012 08:35 AM, Zhi Yong Wu wrote: >> Since vm_clock is created via qemu_init_main_loop(), when QED read >> vm_clock, why will this call abort()? >> Can you elaborate this? what is its call path? >> > > It will crash in cpu_get_clock() (in qemu-tool.c). The fix isn't very nice if it makes migration impossible. I'd like to introduce a similar timer in qcow2 which does support migration and breaking it is not an option. So what about (completely untested)... int64_t cpu_get_icount(void) Kevin diff --git a/qemu-tool.c b/qemu-tool.c index 183a583..edb84f5 100644 --- a/qemu-tool.c +++ b/qemu-tool.c @@ -61,7 +61,7 @@ void monitor_protocol_event(MonitorEvent event, QObject *data) int64_t cpu_get_clock(void) { - abort(); + return 0; }