render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
fbe740
From eb6bdf4798eea9bae5ddca1fdd13fb5ef6e99596 Mon Sep 17 00:00:00 2001
fbe740
Message-Id: <eb6bdf4798eea9bae5ddca1fdd13fb5ef6e99596@dist-git>
fbe740
From: Andrea Bolognani <abologna@redhat.com>
fbe740
Date: Fri, 14 Feb 2020 13:12:35 +0100
fbe740
Subject: [PATCH] conf: Introduce VIR_DOMAIN_TIMER_NAME_ARMVTIMER
fbe740
MIME-Version: 1.0
fbe740
Content-Type: text/plain; charset=UTF-8
fbe740
Content-Transfer-Encoding: 8bit
fbe740
fbe740
This new timer model will be used to control the behavior of the
fbe740
virtual timer for KVM ARM/virt guests.
fbe740
fbe740
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
fbe740
Reviewed-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
fbe740
Reviewed-by: Ján Tomko <jtomko@redhat.com>
fbe740
(cherry picked from commit 3809e88a87e5898c9cf3a277cb32e20fca8fb2d0)
fbe740
fbe740
https://bugzilla.redhat.com/show_bug.cgi?id=1762634
fbe740
fbe740
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
fbe740
Message-Id: <20200214121237.623948-5-abologna@redhat.com>
fbe740
Reviewed-by: Ján Tomko <jtomko@redhat.com>
fbe740
---
fbe740
 docs/schemas/domaincommon.rng | 1 +
fbe740
 src/conf/domain_conf.c        | 1 +
fbe740
 src/conf/domain_conf.h        | 1 +
fbe740
 src/libxl/libxl_conf.c        | 1 +
fbe740
 src/libxl/xen_common.c        | 1 +
fbe740
 src/qemu/qemu_command.c       | 2 ++
fbe740
 src/qemu/qemu_domain.c        | 3 +++
fbe740
 7 files changed, 10 insertions(+)
fbe740
fbe740
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
fbe740
index 026e753567..19476a2735 100644
fbe740
--- a/docs/schemas/domaincommon.rng
fbe740
+++ b/docs/schemas/domaincommon.rng
fbe740
@@ -1239,6 +1239,7 @@
fbe740
             <choice>
fbe740
               <value>hpet</value>
fbe740
               <value>pit</value>
fbe740
+              <value>armvtimer</value>
fbe740
             </choice>
fbe740
           </attribute>
fbe740
           <optional>
fbe740
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
fbe740
index 58f72b3b0f..68d9ce9c4e 100644
fbe740
--- a/src/conf/domain_conf.c
fbe740
+++ b/src/conf/domain_conf.c
fbe740
@@ -1062,6 +1062,7 @@ VIR_ENUM_IMPL(virDomainTimerName,
fbe740
               "tsc",
fbe740
               "kvmclock",
fbe740
               "hypervclock",
fbe740
+              "armvtimer",
fbe740
 );
fbe740
 
fbe740
 VIR_ENUM_IMPL(virDomainTimerTrack,
fbe740
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
fbe740
index ee8eb3ddc0..ef2c1b80f7 100644
fbe740
--- a/src/conf/domain_conf.h
fbe740
+++ b/src/conf/domain_conf.h
fbe740
@@ -1989,6 +1989,7 @@ typedef enum {
fbe740
     VIR_DOMAIN_TIMER_NAME_TSC,
fbe740
     VIR_DOMAIN_TIMER_NAME_KVMCLOCK,
fbe740
     VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK,
fbe740
+    VIR_DOMAIN_TIMER_NAME_ARMVTIMER,
fbe740
 
fbe740
     VIR_DOMAIN_TIMER_NAME_LAST
fbe740
 } virDomainTimerNameType;
fbe740
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
fbe740
index 2488bb9d32..ffac890262 100644
fbe740
--- a/src/libxl/libxl_conf.c
fbe740
+++ b/src/libxl/libxl_conf.c
fbe740
@@ -361,6 +361,7 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
fbe740
         case VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK:
fbe740
         case VIR_DOMAIN_TIMER_NAME_RTC:
fbe740
         case VIR_DOMAIN_TIMER_NAME_PIT:
fbe740
+        case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
fbe740
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
fbe740
                            _("unsupported timer type (name) '%s'"),
fbe740
                            virDomainTimerNameTypeToString(clock.timers[i]->name));
fbe740
diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c
fbe740
index 415549a42c..9a385eba0d 100644
fbe740
--- a/src/libxl/xen_common.c
fbe740
+++ b/src/libxl/xen_common.c
fbe740
@@ -2182,6 +2182,7 @@ xenFormatCPUFeatures(virConfPtr conf, virDomainDefPtr def)
fbe740
         case VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK:
fbe740
         case VIR_DOMAIN_TIMER_NAME_RTC:
fbe740
         case VIR_DOMAIN_TIMER_NAME_PIT:
fbe740
+        case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
fbe740
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
fbe740
                            _("unsupported timer type (name) '%s'"),
fbe740
                            virDomainTimerNameTypeToString(def->clock.timers[i]->name));
fbe740
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
fbe740
index 0ad09baa1d..e1e19e0fcc 100644
fbe740
--- a/src/qemu/qemu_command.c
fbe740
+++ b/src/qemu/qemu_command.c
fbe740
@@ -6200,6 +6200,7 @@ qemuBuildClockCommandLine(virCommandPtr cmd,
fbe740
         case VIR_DOMAIN_TIMER_NAME_TSC:
fbe740
         case VIR_DOMAIN_TIMER_NAME_KVMCLOCK:
fbe740
         case VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK:
fbe740
+        case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
fbe740
             /* Timers above are handled when building -cpu.  */
fbe740
         case VIR_DOMAIN_TIMER_NAME_LAST:
fbe740
             break;
fbe740
@@ -6631,6 +6632,7 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
fbe740
             if (timer->frequency > 0)
fbe740
                 virBufferAsprintf(&buf, ",tsc-frequency=%lu", timer->frequency);
fbe740
             break;
fbe740
+        case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
fbe740
         case VIR_DOMAIN_TIMER_NAME_PLATFORM:
fbe740
         case VIR_DOMAIN_TIMER_NAME_PIT:
fbe740
         case VIR_DOMAIN_TIMER_NAME_RTC:
fbe740
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
fbe740
index 846d1ecb29..4de4f9da53 100644
fbe740
--- a/src/qemu/qemu_domain.c
fbe740
+++ b/src/qemu/qemu_domain.c
fbe740
@@ -5504,6 +5504,9 @@ qemuDomainDefValidateClockTimers(const virDomainDef *def,
fbe740
                 return -1;
fbe740
             }
fbe740
             break;
fbe740
+
fbe740
+        case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
fbe740
+            break;
fbe740
         }
fbe740
     }
fbe740
 
fbe740
-- 
fbe740
2.25.0
fbe740