From patchwork Mon Mar 5 09:08:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 144632 X-Patchwork-Delegate: peter.maydell@linaro.org 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 42D37B6FA1 for ; Mon, 5 Mar 2012 20:09:54 +1100 (EST) Received: from localhost ([::1]:50368 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4TvU-0006TP-2j for incoming@patchwork.ozlabs.org; Mon, 05 Mar 2012 04:09:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4TuV-0004KW-7S for qemu-devel@nongnu.org; Mon, 05 Mar 2012 04:09:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4TuB-0002aF-5Q for qemu-devel@nongnu.org; Mon, 05 Mar 2012 04:08:50 -0500 Received: from mail-pw0-f45.google.com ([209.85.160.45]:35032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4TuA-0002ZD-Tt for qemu-devel@nongnu.org; Mon, 05 Mar 2012 04:08:31 -0500 Received: by mail-pw0-f45.google.com with SMTP id uo5so4074065pbc.4 for ; Mon, 05 Mar 2012 01:08:30 -0800 (PST) Received-SPF: pass (google.com: domain of paolo.bonzini@gmail.com designates 10.68.125.133 as permitted sender) client-ip=10.68.125.133; Authentication-Results: mr.google.com; spf=pass (google.com: domain of paolo.bonzini@gmail.com designates 10.68.125.133 as permitted sender) smtp.mail=paolo.bonzini@gmail.com; dkim=pass header.i=paolo.bonzini@gmail.com Received: from mr.google.com ([10.68.125.133]) by 10.68.125.133 with SMTP id mq5mr46121971pbb.103.1330938510185 (num_hops = 1); Mon, 05 Mar 2012 01:08:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=u0tieFkMjg0A/3Nr4pjE3GtO+MwMdzJyWLV3PfL7pRE=; b=r4i/UJxK3b+KU/joi7CQ7lZFUqSR/jOMmwWsJE4E/6c3C1430NIdJBVJZFCASQZtjU z1dUdXUKTmUJR18xPQTJeqaQF3pfJG1fMYJpWpns9hQOgrrgVn7avMP9jVFqqiXljsan DUos7l6qJ0OfSmjETbdyM0Rn6YLj4qF7IWKLFlXXPG4vc6Y3iQQcZutKVU3rxMc2wBK4 zf9qsn4qBn4Z0DrSI8gmdsF7ceUu6l8P2hhrl58fUxiJu9S7D72KEqoJX8wJDBH78U+v 3dLfvSBWNtX8WWyZk28ImHL8oBifNsSUSg9yYrNMaLz8p3zpT8vb3G2uyGp332tKOHpj uRHg== Received: by 10.68.125.133 with SMTP id mq5mr39405042pbb.103.1330938510148; Mon, 05 Mar 2012 01:08:30 -0800 (PST) Received: from yakj.usersys.redhat.com (93-34-182-16.ip50.fastwebnet.it. [93.34.182.16]) by mx.google.com with ESMTPS id l8sm12838857pbi.0.2012.03.05.01.08.27 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Mar 2012 01:08:28 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2012 10:08:11 +0100 Message-Id: <1330938495-30573-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1330938495-30573-1-git-send-email-pbonzini@redhat.com> References: <1330938495-30573-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.160.45 Cc: peter.maydell@linaro.org Subject: [Qemu-devel] [PATCH v2 1/5] rtc: add -rtc clock=rt 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 This will let people use backwards-compatible semantics for devices that will be affected by the following patches. Signed-off-by: Paolo Bonzini --- qemu-options.hx | 7 ++++--- vl.c | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index b129996..44af861 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2436,7 +2436,7 @@ DEF("localtime", 0, QEMU_OPTION_localtime, "", QEMU_ARCH_ALL) DEF("startdate", HAS_ARG, QEMU_OPTION_startdate, "", QEMU_ARCH_ALL) DEF("rtc", HAS_ARG, QEMU_OPTION_rtc, \ - "-rtc [base=utc|localtime|date][,clock=host|vm][,driftfix=none|slew]\n" \ + "-rtc [base=utc|localtime|date][,clock=host|rt|vm][,driftfix=none|slew]\n" \ " set the RTC base and clock, enable drift fix for clock ticks (x86 only)\n", QEMU_ARCH_ALL) @@ -2452,8 +2452,9 @@ format @code{2006-06-17T16:01:21} or @code{2006-06-17}. The default base is UTC. By default the RTC is driven by the host system time. This allows to use the RTC as accurate reference clock inside the guest, specifically if the host time is smoothly following an accurate external reference clock, e.g. via NTP. -If you want to isolate the guest time from the host, even prevent it from -progressing during suspension, you can set @option{clock} to @code{vm} instead. +If you want to isolate the guest time from the host, you can set @option{clock} +to @code{rt} instead. To even prevent it from progressing during suspension, +you can set it to @code{vm}. Enable @option{driftfix} (i386 targets only) if you experience time drift problems, specifically with Windows' ACPI HAL. This option will try to figure out how diff --git a/vl.c b/vl.c index 4a77696..510609e 100644 --- a/vl.c +++ b/vl.c @@ -529,6 +529,8 @@ static void configure_rtc(QemuOpts *opts) if (value) { if (!strcmp(value, "host")) { rtc_clock = host_clock; + } else if (!strcmp(value, "rt")) { + rtc_clock = rt_clock; } else if (!strcmp(value, "vm")) { rtc_clock = vm_clock; } else {