]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
xen: fix timer bug found by updated test
authorPavel Hrdina <phrdina@redhat.com>
Sat, 28 Nov 2015 06:18:29 +0000 (07:18 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Wed, 9 Dec 2015 11:59:27 +0000 (12:59 +0100)
Only 'tsc' timer allows set mode and track is valid only for 'rtc' and
'platform' timers.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/xenconfig/xen_common.c
src/xenconfig/xen_sxpr.c

index 0890c73b8d53370a4d99f8720aecb580fe3849a7..ed6978ffa4aa2d5cfaca955d1d209242cd9d7b2b 100644 (file)
@@ -553,6 +553,8 @@ xenParseCPUFeatures(virConfPtr conf, virDomainDefPtr def)
             timer->name = VIR_DOMAIN_TIMER_NAME_HPET;
             timer->present = val;
             timer->tickpolicy = -1;
+            timer->mode = -1;
+            timer->track = -1;
 
             def->clock.ntimers = 1;
             def->clock.timers[0] = timer;
index f9a3187f97b70717b9baa599dc794501d60a7979..09989acc30c3cd0f4b0108b98dcc27ff51dd0d88 100644 (file)
@@ -1262,6 +1262,8 @@ xenParseSxpr(const struct sexpr *root,
             timer->name = VIR_DOMAIN_TIMER_NAME_HPET;
             timer->present = sexpr_int(root, "domain/image/hvm/hpet");
             timer->tickpolicy = -1;
+            timer->mode = -1;
+            timer->track = -1;
 
             def->clock.ntimers = 1;
             def->clock.timers[0] = timer;