render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
d76c62
From b9acfbcad6181babba50384741e0c30d6d0cc534 Mon Sep 17 00:00:00 2001
d76c62
Message-Id: <b9acfbcad6181babba50384741e0c30d6d0cc534@dist-git>
d76c62
From: Andrea Bolognani <abologna@redhat.com>
d76c62
Date: Fri, 14 Feb 2020 13:12:37 +0100
d76c62
Subject: [PATCH] qemu: Format the armvtimer timer on the command line
d76c62
MIME-Version: 1.0
d76c62
Content-Type: text/plain; charset=UTF-8
d76c62
Content-Transfer-Encoding: 8bit
d76c62
d76c62
Its behavior is controlled by a KVM-specific CPU feature.
d76c62
d76c62
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
d76c62
Reviewed-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
d76c62
Reviewed-by: Ján Tomko <jtomko@redhat.com>
d76c62
(cherry picked from commit 7c4bc108a9bd7bda1543131d232e2ccee92a9e43)
d76c62
d76c62
https://bugzilla.redhat.com/show_bug.cgi?id=1762634
d76c62
d76c62
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
d76c62
Message-Id: <20200214121237.623948-7-abologna@redhat.com>
d76c62
Reviewed-by: Ján Tomko <jtomko@redhat.com>
d76c62
---
d76c62
 src/qemu/qemu_command.c | 13 +++++++++++++
d76c62
 1 file changed, 13 insertions(+)
d76c62
d76c62
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
d76c62
index e1e19e0fcc..1a5142d472 100644
d76c62
--- a/src/qemu/qemu_command.c
d76c62
+++ b/src/qemu/qemu_command.c
d76c62
@@ -6633,6 +6633,19 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
d76c62
                 virBufferAsprintf(&buf, ",tsc-frequency=%lu", timer->frequency);
d76c62
             break;
d76c62
         case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
d76c62
+            switch (timer->tickpolicy) {
d76c62
+            case VIR_DOMAIN_TIMER_TICKPOLICY_DELAY:
d76c62
+                virBufferAddLit(&buf, ",kvm-no-adjvtime=off");
d76c62
+                break;
d76c62
+            case VIR_DOMAIN_TIMER_TICKPOLICY_DISCARD:
d76c62
+                virBufferAddLit(&buf, ",kvm-no-adjvtime=on");
d76c62
+                break;
d76c62
+            case -1:
d76c62
+            case VIR_DOMAIN_TIMER_TICKPOLICY_CATCHUP:
d76c62
+            case VIR_DOMAIN_TIMER_TICKPOLICY_MERGE:
d76c62
+                break;
d76c62
+            }
d76c62
+            break;
d76c62
         case VIR_DOMAIN_TIMER_NAME_PLATFORM:
d76c62
         case VIR_DOMAIN_TIMER_NAME_PIT:
d76c62
         case VIR_DOMAIN_TIMER_NAME_RTC:
d76c62
-- 
d76c62
2.25.0
d76c62