From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDZVW-0006pz-MX for qemu-devel@nongnu.org; Fri, 30 Mar 2012 06:56:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDZVR-0002u1-UK for qemu-devel@nongnu.org; Fri, 30 Mar 2012 06:56:38 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:51015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDZVR-0002tr-LR for qemu-devel@nongnu.org; Fri, 30 Mar 2012 06:56:33 -0400 From: Peter Maydell Date: Fri, 30 Mar 2012 11:39:09 +0100 Message-Id: <1333103953-3430-2-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1333103953-3430-1-git-send-email-peter.maydell@linaro.org> References: <1333103953-3430-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 1/5] rtc: add -rtc clock=rt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Paul Brook From: Paolo Bonzini This will let people use backwards-compatible semantics for devices that will be affected by the following patches. Signed-off-by: Paolo Bonzini Signed-off-by: Peter Maydell --- 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 662f571..a6cd8e9 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2453,7 +2453,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) @@ -2469,8 +2469,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 0fccf50..71a4755 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 { -- 1.7.1