[PATCH 4/7] xen: fix timer bug found by updated test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Only 'tsc' timer allows set mode and track is valid only for 'rtc' and
'platform' timers.

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/xenconfig/xen_common.c | 2 ++
 src/xenconfig/xen_sxpr.c   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c
index 0890c73..ed6978f 100644
--- a/src/xenconfig/xen_common.c
+++ b/src/xenconfig/xen_common.c
@@ -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;
diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c
index f9a3187..09989ac 100644
--- a/src/xenconfig/xen_sxpr.c
+++ b/src/xenconfig/xen_sxpr.c
@@ -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;
-- 
2.6.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]