From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCRVp-0008U7-00 for qemu-devel@nongnu.org; Mon, 04 Mar 2013 04:16:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCRVl-0002Ae-4h for qemu-devel@nongnu.org; Mon, 04 Mar 2013 04:16:48 -0500 Received: from e28smtp01.in.ibm.com ([122.248.162.1]:47470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCRVk-0002AD-EF for qemu-devel@nongnu.org; Mon, 04 Mar 2013 04:16:45 -0500 Received: from /spool/local by e28smtp01.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 4 Mar 2013 14:43:30 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 8A16E125804F for ; Mon, 4 Mar 2013 14:47:33 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r249GX1228049464 for ; Mon, 4 Mar 2013 14:46:33 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r249Gaim021607 for ; Mon, 4 Mar 2013 09:16:36 GMT From: Lei Li Date: Mon, 4 Mar 2013 17:16:28 +0800 Message-Id: <1362388590-13010-1-git-send-email-lilei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 0/2 v4] Time resync support by qemu-ga List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, mdroth@linux.vnet.ibm.com, Lei Li This patch series attempts to add time resync support to qemu-ga by introducing qemu-ga commands guest-get-time and guest-set-time. Right now, when a guest is paused or migrated to a file then loaded from that file, the guest OS has no idea that there was a big gap in the time. Depending on how long the gap was, NTP might not be able to resynchronize the guest. So adding new guest-agent command that is called any time a guest is resumed and which tells the guest to update its own wall clock time based on the information from the host will make it easier for a guest to resynchronize without waiting for NTP. The previous RFC send for discussion and suggestion as link here: http://article.gmane.org/gmane.comp.emulators.qemu/186126 The interface for these commands like: { 'command': 'guest-get-time', 'returns': 'int' } { 'command': 'guest-set-time', 'data': { 'time': int } } Notes: For the implementition of win32-specific commands, I plan to send it out in another thread later. Suggestions and comments are welcome! Changes since v3: - Doc improvement based on Eric's suggestions. - Overflow check improve from Eric. Changes since v2: - Get rid of utc-offset, and make it just pass single nanoseconds relative to the Epoch in UTC/GMT according to Anthony and Eric's comments. - Make time argument mandatory. - Fix the overflow check for year-2038 problem. - Error handel improvment from Eric. Changes since v1: - Squashed patches add support to get host time and add guest-get-time command into one. - Documents improvment based on the suggestions from Eric and Mike. - Change the name of 'HostTimeInfo' to 'TimeInfo'. - Better use-case and logic for 'guest-set-time' command suggested by Eric. - Error handel improvment from Luiz. Lei Li (2): qga: add guest-get-time command qga: add guest-set-time command