[libvirt] [PATCH v3 2/2] qemu: Default hwclock source for sPAPR to RTC

Kothapally Madhu Pavan kmp at linux.vnet.ibm.com
Tue Jul 25 14:36:09 UTC 2017


QEMU fails to launch a sPAPR guest with clock sources other that RTC.
Internally qemu only uses RTC timer for hwclock. This patch reports
the right error message instead of qemu erroring out when any other
timer other than RTC is used.

Signed-off-by: Kothapally Madhu Pavan <kmp at linux.vnet.ibm.com>
---
 src/qemu/qemu_domain.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index e5e4208..b3cfb6c 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3103,6 +3103,14 @@ qemuDomainDefValidate(const virDomainDef *def,
                            virArchToString(def->os.arch));
             goto cleanup;
         }
+        /* /* Only RTC timer is supported as hwclock for sPAPR machines */
+        if (ARCH_IS_PPC64(def->os.arch) && timer->name != VIR_DOMAIN_TIMER_NAME_RTC) {
+            virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                           _("unsupported clock timer '%s' for %s architecture"),
+                           virDomainTimerNameTypeToString(def->clock.timers[i]->name),
+                           virArchToString(def->os.arch));
+            goto cleanup;
+        }
     }
 
     if (def->mem.min_guarantee) {
-- 
1.8.3.1




More information about the libvir-list mailing list