From: Philipp Hahn Date: Mon, 5 Sep 2011 06:22:36 +0000 (+0800) Subject: Fix localtime handling for Xen-PV domains X-Git-Tag: v0.9.5-rc1~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8be115ff80e6eac8f3c2c0923e13160d0a2c0dad;p=thirdparty%2Flibvirt.git Fix localtime handling for Xen-PV domains At least Xen-3.4.3 translates the /vm/localtime SXPR value to /domain/platform/localtime and /domain/image/{linux,hvm}/localtime when the domain is defined. When reading back that information libvirt only handles HVM domains, but not PV domains: This results in libvirtd always returning while Xend used (localtime 1). For PV domains use /domain/image/linux/localtime. --- diff --git a/src/xenxs/xen_sxpr.c b/src/xenxs/xen_sxpr.c index 1a8a541c67..086ad8b76b 100644 --- a/src/xenxs/xen_sxpr.c +++ b/src/xenxs/xen_sxpr.c @@ -1195,6 +1195,9 @@ xenParseSxpr(const struct sexpr *root, def->clock.ntimers = 1; def->clock.timers[0] = timer; } + } else { /* !hvm */ + if (sexpr_int(root, "domain/image/linux/localtime")) + def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME; } /* Current XenD allows localtime here, for PV and HVM */