From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToGKs-0000hr-LZ for qemu-devel@nongnu.org; Thu, 27 Dec 2012 11:29:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ToGKq-0006Od-VU for qemu-devel@nongnu.org; Thu, 27 Dec 2012 11:29:34 -0500 Received: from e23smtp02.au.ibm.com ([202.81.31.144]:36949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ToGKq-0006Np-7Z for qemu-devel@nongnu.org; Thu, 27 Dec 2012 11:29:32 -0500 Received: from /spool/local by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 28 Dec 2012 02:24:48 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id D4FDE2CE804A for ; Fri, 28 Dec 2012 03:29:18 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qBRGI3pg58065066 for ; Fri, 28 Dec 2012 03:18:04 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qBRGTHX5005032 for ; Fri, 28 Dec 2012 03:29:17 +1100 Message-ID: <50DC775B.9070800@linux.vnet.ibm.com> Date: Fri, 28 Dec 2012 00:29:15 +0800 From: Lei Li MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [RFC] Time resync by qemu-ga List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: Anthony Liguori , mdroth , Luiz Capitulino Hi guys, I am working on the time drift issue as background info here. http://mid.gmane.org/87pq5r5otp.fsf@codemonkey.ws As Anthony proposed, one part of the solutions is that we want to add a qemu-ga command to resync the guest clock by reading the wallclock time when the tick overflow the limit to the number of missed ticks. When I implement on the qemu-ga side, I got some problems and I'd like to send this RFC out and ask for suggestions and comments to make sure I am in the right direction before I send out the code. The proposed interface for qemu-ga command as link here: http://wiki.qemu.org/Features/GuestAgent/UsefulCommands This maybe easier to implement, but I think this interface may have problem, like the delta issue. So I am trying to implement it like below. The interface looks like: { 'command': 'guest-resync-time' } The way it works: When calling this command in the host, qemu-ga would try to get the wallclock time in the host by handling guest->host commands, and then write this time to the guest hardware. But looks like we don't have the way to get host information now, since qemu-ga just handle host->guest commands (Correct me if I am wrong). To solve this, we should add support to get host information by handling guest->host commands by qemu-ga first. Please correct me if I am wrong. And suggestions and comments are very appreciated, specifically the way to handle quest->host commands by qemu-ga since I am still struggling with this. Thanks! -- Lei