From: Andrea Bolognani Date: Fri, 7 Feb 2020 11:45:49 +0000 (+0100) Subject: qemu: Format the armvtimer timer on the command line X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7c4bc108a9bd7bda1543131d232e2ccee92a9e43;p=libvirt.git qemu: Format the armvtimer timer on the command line Its behavior is controlled by a KVM-specific CPU feature. Signed-off-by: Andrea Bolognani Reviewed-by: Masayoshi Mizuma Reviewed-by: Ján Tomko --- 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: