summaryrefslogtreecommitdiff
path: root/qemu-options.hx
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2009-09-15 13:36:04 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:45 -0500
commit6875204c782e7c9aa5c28f96b2583fd31c50468f (patch)
tree108600320ec5820c8f13e8a1e5c24954132eb293 /qemu-options.hx
parent1ed2fc1fa35fadc0d6f5d9b55b9f84ccaa87a036 (diff)
Enable host-clock-based RTC
Switch RTC emulations to the new host_clock instead of vm_clock by default. This has the advantage that the emulated RTC will follow automatically the host time while it might be tuned via NTP. vm_clock can still be selected by passing '-rtc clock=vm' on the command line. Note that some RTC emulations (at least M48T59) already use the host time unconditionally while others (namely MC146818) do not. This patch introduces the required infrastructure for selecting the base clock but only converts MC146818 for now. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-options.hx')
-rw-r--r--qemu-options.hx14
1 files changed, 10 insertions, 4 deletions
diff --git a/qemu-options.hx b/qemu-options.hx
index 586474e39..f21e9f9da 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1500,22 +1500,28 @@ DEF("startdate", HAS_ARG, QEMU_OPTION_startdate, "")
#ifdef TARGET_I386
DEF("rtc", HAS_ARG, QEMU_OPTION_rtc, \
- "-rtc [base=utc|localtime|date][,driftfix=none|slew]\n" \
- " set the RTC base, enable drift fix for clock ticks\n")
+ "-rtc [base=utc|localtime|date][,clock=host|vm][,driftfix=none|slew]\n" \
+ " set the RTC base and clock, enable drift fix for clock ticks\n")
#else
DEF("rtc", HAS_ARG, QEMU_OPTION_rtc, \
- "-rtc [base=utc|localtime|date]\n" \
+ "-rtc [base=utc|localtime|date][,clock=host|vm]\n" \
" set the RTC base and clock\n")
#endif
STEXI
-@item -rtc [base=utc|localtime|@var{date}][,driftfix=none|slew]
+@item -rtc [base=utc|localtime|@var{date}][,clock=host|vm][,driftfix=none|slew]
Specify @option{base} as @code{utc} or @code{localtime} to let the RTC start at the current
UTC or local time, respectively. @code{localtime} is required for correct date in
MS-DOS or Windows. To start at a specific point in time, provide @var{date} in the
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.
+
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
many timer interrupts were not processed by the Windows guest and will