mirror of https://github.com/proxmox/mirror_qemu
rtc: add -rtc clock=rt
This will let people use backwards-compatible semantics for devices that will be affected by the following patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>master
parent
f638f0d3ae
commit
788081417a
|
@ -2453,7 +2453,7 @@ DEF("localtime", 0, QEMU_OPTION_localtime, "", QEMU_ARCH_ALL)
|
||||||
DEF("startdate", HAS_ARG, QEMU_OPTION_startdate, "", QEMU_ARCH_ALL)
|
DEF("startdate", HAS_ARG, QEMU_OPTION_startdate, "", QEMU_ARCH_ALL)
|
||||||
|
|
||||||
DEF("rtc", HAS_ARG, QEMU_OPTION_rtc, \
|
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",
|
" set the RTC base and clock, enable drift fix for clock ticks (x86 only)\n",
|
||||||
QEMU_ARCH_ALL)
|
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
|
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
|
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.
|
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
|
If you want to isolate the guest time from the host, you can set @option{clock}
|
||||||
progressing during suspension, you can set @option{clock} to @code{vm} instead.
|
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,
|
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
|
specifically with Windows' ACPI HAL. This option will try to figure out how
|
||||||
|
|
2
vl.c
2
vl.c
|
@ -529,6 +529,8 @@ static void configure_rtc(QemuOpts *opts)
|
||||||
if (value) {
|
if (value) {
|
||||||
if (!strcmp(value, "host")) {
|
if (!strcmp(value, "host")) {
|
||||||
rtc_clock = host_clock;
|
rtc_clock = host_clock;
|
||||||
|
} else if (!strcmp(value, "rt")) {
|
||||||
|
rtc_clock = rt_clock;
|
||||||
} else if (!strcmp(value, "vm")) {
|
} else if (!strcmp(value, "vm")) {
|
||||||
rtc_clock = vm_clock;
|
rtc_clock = vm_clock;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue