Before version 3.1 xen only implemented clock/@offset='utc' and
'localtime'.
With the introduction of managed domains in 3.1 xend keeps track of the
rtc_timeoffset, even over reboots. This translates to libvirts
clock/@offset='variable' variant. Be advised that only HV domains have a RTC.
In addition xen also supports a variant where the offset is tracked to
'localtime', which is currently not supported by libvirt. To make matters
worse, this was somehow broken in some versions of xen and was finally fixed
with version xen-3.4.
The following patch set ...
* adds support for handling variable offsets relative to localtime,
* fixes libvirt to use clock/@offset='variable' for newer xen versions,
* adapts the test suit accordingly
I've tested this on CenOS5 (xend-3.0.3 + 3.1.2 hypervisor?), UCS-2.3
(xen-3.2.1), UCS-2.4 (xen-3.4.3) and UCS-3.0 (xen-4.1.2).
Since v1:
+ fix handling of direct-PV-domains
+ added handling of localtime=1 + rtc_timeoffset
+ fixed test suite
Since v2: (on feedback by Eric)
+ add the adjustment='reset' attribute to force the old behaviour
+ handle adjustment='$timeDelta' as a short-cut for the conversion to variable.
+ simplify error path handling
+ update version numbers to 0.9.11
Since v3:
+ Add missing offset=VARIALE for adjustment='$timeDelta' conversion.
Philipp Hahn (3):
Support clock=variable relative to localtime
Xen: Fix <clock> handling
Xen: Adapt <clock> tests
docs/formatdomain.html.in | 18 ++-
docs/schemas/domaincommon.rng | 30 +++-
src/conf/domain_conf.c | 61 +++++++-
src/conf/domain_conf.h | 17 ++-
src/libvirt_private.syms | 1 +
src/qemu/qemu_command.c | 8 +-
src/qemu/qemu_process.c | 2 +-
src/xenxs/xen_sxpr.c | 167 +++++++++++++++-----
src/xenxs/xen_xm.c | 123 ++++++++++++---
.../qemuxml2argv-clock-variable.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-boot-grub.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-curmem.xml | 2 +-
.../sexpr2xml-disk-block-shareable.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-disk-block.xml | 2 +-
.../sexpr2xml-disk-drv-blktap-qcow.xml | 2 +-
.../sexpr2xml-disk-drv-blktap-raw.xml | 2 +-
.../sexpr2xml-disk-drv-blktap2-raw.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-disk-file.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 2 +-
.../sexpr2xml-fv-serial-dev-2-ports.xml | 2 +-
.../sexpr2xml-fv-serial-dev-2nd-port.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 2 +-
.../sexpr2xml-fv-serial-tcp-telnet.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-fv.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-net-bridged.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-net-e1000.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-net-routed.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pci-devs.xml | 2 +-
.../sexpr2xml-pv-bootloader-cmdline.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml | 2 +-
.../sexpr2xml-pv-vfb-new-vncdisplay.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml | 2 +-
.../sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml | 2 +-
tests/sexpr2xmldata/sexpr2xml-pv.xml | 2 +-
tests/xmconfigdata/sexpr2xml-pv-bootloader.cfg | 1 +
tests/xmconfigdata/test-escape-paths.xml | 2 +-
tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-force-hpet.xml | 2 +-
tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 2 +-
tests/xmconfigdata/test-fullvirt-localtime.xml | 2 +-
tests/xmconfigdata/test-fullvirt-net-ioemu.xml | 2 +-
tests/xmconfigdata/test-fullvirt-net-netfront.xml | 2 +-
tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 2 +-
tests/xmconfigdata/test-fullvirt-old-cdrom.cfg | 2 +-
tests/xmconfigdata/test-fullvirt-old-cdrom.xml | 2 +-
tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 2 +-
.../test-fullvirt-serial-dev-2-ports.xml | 2 +-
.../test-fullvirt-serial-dev-2nd-port.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-file.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-null.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-pty.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 2 +-
.../test-fullvirt-serial-tcp-telnet.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-udp.xml | 2 +-
tests/xmconfigdata/test-fullvirt-serial-unix.xml | 2 +-
tests/xmconfigdata/test-fullvirt-sound.xml | 2 +-
tests/xmconfigdata/test-fullvirt-usbmouse.xml | 2 +-
.../test-fullvirt-usbtablet-no-bus.xml | 2 +-
tests/xmconfigdata/test-fullvirt-usbtablet.xml | 2 +-
tests/xmconfigdata/test-fullvirt-utc.xml | 2 +-
tests/xmconfigdata/test-no-source-cdrom.xml | 2 +-
tests/xmconfigdata/test-paravirt-net-e1000.cfg | 1 +
tests/xmconfigdata/test-paravirt-net-e1000.xml | 2 +-
tests/xmconfigdata/test-paravirt-net-vifname.cfg | 1 +
tests/xmconfigdata/test-paravirt-net-vifname.xml | 2 +-
.../test-paravirt-new-pvfb-vncdisplay.cfg | 1 +
.../test-paravirt-new-pvfb-vncdisplay.xml | 2 +-
tests/xmconfigdata/test-paravirt-new-pvfb.cfg | 1 +
tests/xmconfigdata/test-paravirt-new-pvfb.xml | 2 +-
.../test-paravirt-old-pvfb-vncdisplay.cfg | 1 +
.../test-paravirt-old-pvfb-vncdisplay.xml | 2 +-
tests/xmconfigdata/test-paravirt-old-pvfb.cfg | 1 +
tests/xmconfigdata/test-paravirt-old-pvfb.xml | 2 +-
tests/xmconfigdata/test-paravirt-vcpu.cfg | 1 +
tests/xmconfigdata/test-paravirt-vcpu.xml | 2 +-
tests/xmconfigdata/test-pci-devs.xml | 2 +-
tests/xml2sexprdata/xml2sexpr-boot-grub.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-bridge-ipaddr.sexpr | 4 +-
tests/xml2sexprdata/xml2sexpr-curmem.sexpr | 1 +
.../xml2sexpr-disk-block-shareable.sexpr | 4 +-
tests/xml2sexprdata/xml2sexpr-disk-block.sexpr | 4 +-
.../xml2sexprdata/xml2sexpr-disk-drv-blkback.sexpr | 4 +-
.../xml2sexpr-disk-drv-blktap-qcow.sexpr | 4 +-
.../xml2sexpr-disk-drv-blktap-raw.sexpr | 4 +-
.../xml2sexprdata/xml2sexpr-disk-drv-blktap.sexpr | 4 +-
.../xml2sexpr-disk-drv-blktap2-raw.sexpr | 4 +-
.../xml2sexprdata/xml2sexpr-disk-drv-blktap2.sexpr | 4 +-
tests/xml2sexprdata/xml2sexpr-disk-drv-loop.sexpr | 4 +-
tests/xml2sexprdata/xml2sexpr-disk-file.sexpr | 4 +-
tests/xml2sexprdata/xml2sexpr-escape.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-force-hpet.sexpr | 1 +
.../xml2sexprdata/xml2sexpr-fv-force-nohpet.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-kernel.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr | 5 +-
tests/xml2sexprdata/xml2sexpr-fv-net-ioemu.sexpr | 3 +-
.../xml2sexprdata/xml2sexpr-fv-net-netfront.sexpr | 3 +-
.../xml2sexprdata/xml2sexpr-fv-parallel-tcp.sexpr | 1 +
.../xml2sexpr-fv-serial-dev-2-ports.sexpr | 3 +-
.../xml2sexpr-fv-serial-dev-2nd-port.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-serial-file.sexpr | 3 +-
tests/xml2sexprdata/xml2sexpr-fv-serial-null.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-serial-pipe.sexpr | 3 +-
tests/xml2sexprdata/xml2sexpr-fv-serial-pty.sexpr | 1 +
.../xml2sexprdata/xml2sexpr-fv-serial-stdio.sexpr | 1 +
.../xml2sexpr-fv-serial-tcp-telnet.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-serial-tcp.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-serial-udp.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-serial-unix.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-sound.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-usbmouse.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-usbtablet.sexpr | 3 +-
tests/xml2sexprdata/xml2sexpr-fv-utc.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr | 3 +-
tests/xml2sexprdata/xml2sexpr-fv.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-net-bridged.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-net-e1000.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-net-routed.sexpr | 2 +-
.../xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-pci-devs.sexpr | 2 +-
.../xml2sexpr-pv-bootloader-cmdline.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr | 4 +-
tests/xml2sexprdata/xml2sexpr-pv-vcpus.sexpr | 2 +-
.../xml2sexprdata/xml2sexpr-pv-vfb-new-auto.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr | 2 +-
tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr | 1 +
tests/xml2sexprdata/xml2sexpr-pv.sexpr | 2 +-
157 files changed, 526 insertions(+), 200 deletions(-)