Francesco Romani has uploaded a new change for review.
Change subject: vm: make new timekeeping revertable ......................................................................
vm: make new timekeeping revertable
The commit Icb0752e54a4cb9ff609b8ddfaf5c8fe2ed5b9e72 implemented the new timekeeping options recommended by QEMU developers.
In order to maximize the backward compatibility and to deal with possible regression with old guests, this patch makes the new timekeeping settings revertable by exposing a new configuration variable.
The default is enabled because those settings, being recommended, are supposed to be safe.
Change-Id: I471be44454dcae6e73c46a473eb1eee19a5275ab Signed-off-by: Francesco Romani fromani@redhat.com --- M lib/vdsm/config.py.in M vdsm/vm.py 2 files changed, 8 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/43/24443/1
diff --git a/lib/vdsm/config.py.in b/lib/vdsm/config.py.in index 01590a1..075face 100644 --- a/lib/vdsm/config.py.in +++ b/lib/vdsm/config.py.in @@ -192,6 +192,9 @@
('transient_disks_repository', '@VDSMLIBDIR@/transient', 'Local path to the transient disks repository.'), + + ('new_timekeeping_enable', 'true', + 'Enable the new recomended QEMU time keeping settings'), ]),
# Section: [ksm] diff --git a/vdsm/vm.py b/vdsm/vm.py index 9371049..d3baca8 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -970,10 +970,12 @@ m = XMLElement('clock', offset='variable', adjustment=str(self.conf.get('timeOffset', 0))) m.appendChildWithArgs('timer', name='rtc', tickpolicy='catchup') - m.appendChildWithArgs('timer', name='pit', tickpolicy='delay')
- if self.arch == caps.Architecture.X86_64: - m.appendChildWithArgs('timer', name='hpet', present='no') + if config.getboolean('vars', 'new_timekeeping_enable'): + m.appendChildWithArgs('timer', name='pit', tickpolicy='delay') + + if self.arch == caps.Architecture.X86_64: + m.appendChildWithArgs('timer', name='hpet', present='no')
self.dom.appendChild(m)