On Fri, Feb 07, 2020 at 03:27:05PM +0100, Andrea Bolognani wrote:
Its behavior is controlled by a KVM-specific CPU feature.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/qemu/qemu_command.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 71ae1f72e5..60f8820c64 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6611,6 +6611,19 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
virBufferAsprintf(&buf, ",tsc-frequency=%lu",
timer->frequency);
break;
case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
+ switch (timer->tickpolicy) {
+ case VIR_DOMAIN_TIMER_TICKPOLICY_DELAY:
+ virBufferAddLit(&buf, ",kvm-no-adjvtime=off");
+ break;
+ case VIR_DOMAIN_TIMER_TICKPOLICY_DISCARD:
+ virBufferAddLit(&buf, ",kvm-no-adjvtime=on");
+ break;
+ case -1:
+ case VIR_DOMAIN_TIMER_TICKPOLICY_CATCHUP:
+ case VIR_DOMAIN_TIMER_TICKPOLICY_MERGE:
+ break;
+ }
+ break;
case VIR_DOMAIN_TIMER_NAME_PLATFORM:
case VIR_DOMAIN_TIMER_NAME_PIT:
case VIR_DOMAIN_TIMER_NAME_RTC:
--
2.24.1
Reviewed-by: Masayoshi Mizuma <m.mizuma(a)jp.fujitsu.com>