[libvirt PATCH v2 5/8] qemu: Format the armvtimer timer on the command line

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

 



Its behavior is controlled by a KVM-specific CPU feature.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 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





[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]

  Powered by Linux