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 <k...@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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to