From nobody Sun May 5 21:33:07 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1499935073584478.6520119044833; Thu, 13 Jul 2017 01:37:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A22804E4D4; Thu, 13 Jul 2017 08:37:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AE32A5D6A5; Thu, 13 Jul 2017 08:37:49 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3AAF341F78; Thu, 13 Jul 2017 08:37:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6D8bkB8004345 for ; Thu, 13 Jul 2017 04:37:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id 708775C8B2; Thu, 13 Jul 2017 08:37:46 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 661285C8AF for ; Thu, 13 Jul 2017 08:37:44 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B8D2061D19 for ; Thu, 13 Jul 2017 08:37:42 +0000 (UTC) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v6D8YMD3095900 for ; Thu, 13 Jul 2017 04:37:42 -0400 Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148]) by mx0b-001b2d01.pphosted.com with ESMTP id 2bnt3kwvkp-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 13 Jul 2017 04:37:41 -0400 Received: from localhost by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 13 Jul 2017 18:37:38 +1000 Received: from d23relay08.au.ibm.com (202.81.31.227) by e23smtp06.au.ibm.com (202.81.31.212) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 13 Jul 2017 18:37:36 +1000 Received: from d23av05.au.ibm.com (d23av05.au.ibm.com [9.190.234.119]) by d23relay08.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v6D8bRcw17105092 for ; Thu, 13 Jul 2017 18:37:35 +1000 Received: from d23av05.au.ibm.com (localhost [127.0.0.1]) by d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v6D8b3mA008720 for ; Thu, 13 Jul 2017 18:37:03 +1000 Received: from powerkvmpok002.pok.stglabs.ibm.com (powerkvmpok002.pok.stglabs.ibm.com [9.114.13.10]) by d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v6D8b18W007868; Thu, 13 Jul 2017 18:37:02 +1000 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A22804E4D4 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A22804E4D4 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B8D2061D19 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=kmp@linux.vnet.ibm.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B8D2061D19 From: Kothapally Madhu Pavan To: libvir-list@redhat.com Date: Thu, 13 Jul 2017 14:06:34 +0530 X-TM-AS-MML: disable x-cbid: 17071308-0040-0000-0000-0000034855CA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071308-0041-0000-0000-00000CC3E10A Message-Id: <1499934994-30841-1-git-send-email-kmp@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-07-13_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707130134 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 203 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 13 Jul 2017 08:37:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 13 Jul 2017 08:37:43 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'kmp@linux.vnet.ibm.com' RCPT:'' X-RedHat-Spam-Score: -2.7 (BAYES_50, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Kothapally Madhu Pavan Subject: [libvirt] [PATCH] qemu: Default hwclock source for sPAPR to RTC X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 13 Jul 2017 08:37:51 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 --- src/qemu/qemu_command.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index c53ab97..31561ce 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6440,6 +6440,15 @@ qemuBuildClockCommandLine(virCommandPtr cmd, break; =20 case VIR_DOMAIN_TIMER_NAME_PIT: + /* Only RTC timer is supported as hwclock for sPAPR machines */ + if (ARCH_IS_PPC64(def->os.arch)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported clock timer '%s' for '%s' ar= chitecture"), + virDomainTimerNameTypeToString(def->clock= .timers[i]->name), + virArchToString(def->os.arch)); + return -1; + } + switch (def->clock.timers[i]->tickpolicy) { case -1: case VIR_DOMAIN_TIMER_TICKPOLICY_DELAY: @@ -6483,13 +6492,21 @@ qemuBuildClockCommandLine(virCommandPtr cmd, break; =20 case VIR_DOMAIN_TIMER_NAME_HPET: + /* Only RTC timer is supported as hwclock for sPAPR machines */ + if (ARCH_IS_PPC64(def->os.arch)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported clock timer '%s' for '%s' ar= chitecture"), + virDomainTimerNameTypeToString(def->clock= .timers[i]->name), + virArchToString(def->os.arch)); + return -1; + } + /* the only meaningful attribute for hpet is "present". If * present is -1, that means it wasn't specified, and * should be left at the default for the * hypervisor. "default" when -no-hpet exists is "yes", * and when -no-hpet doesn't exist is "no". "confusing"? * "yes"! */ - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_HPET)) { if (def->clock.timers[i]->present =3D=3D 0) virCommandAddArg(cmd, "-no-hpet"); @@ -7047,6 +7064,15 @@ qemuBuildCpuCommandLine(virCommandPtr cmd, for (i =3D 0; i < def->clock.ntimers; i++) { virDomainTimerDefPtr timer =3D def->clock.timers[i]; =20 + /* Only RTC timer is supported as hwclock for sPAPR machines */ + if (ARCH_IS_PPC64(def->os.arch) && timer->name !=3D VIR_DOMAIN_TIM= ER_NAME_RTC) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported clock timer '%s' for '%s' archit= ecture"), + virDomainTimerNameTypeToString(def->clock.tim= ers[i]->name), + virArchToString(def->os.arch)); + return -1; + } + if (timer->name =3D=3D VIR_DOMAIN_TIMER_NAME_KVMCLOCK && timer->present !=3D -1) { virBufferAsprintf(&buf, "%s,%ckvmclock", --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list