From nobody Fri Mar 29 08:02:40 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1559806453; cv=none; d=zoho.com; s=zohoarc; b=I9LHIJ6ZGhzn49/BZl8bInrOGsA1J+PYGftrYHoXoUC4bJyADprlNrVmUu5sLC4GlSS4ZeuwTruRKlw+69XQCFuL14NLjKq5bLEXMROIlaPXlngzGef6UlZd+D/gUh6/ERxNcBi8wtvvq7nMPQeaj3SfCz4mGlx+EdoBY8b3Wv8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559806453; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=gpKbEqMQidJlF95w1CZuWDdnLCFJxgUIIKg7oXQ8mgY=; b=hiAj2ypiom3QsUkGX7aBASpkjzYbXa/BfphAizlQ/34tc4pcCkJzxAX6QlzlFh46bP2tWut0pCNDnVHemlBuJiO77DZwNQ3jjp1s+gMXc1uwdxSbMtz5+VGScdQ+RFujSNuNDuAYeHgx2gShcVacStQD+FcEGpgHyaCbh31Im6M= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1559806453389717.2038662829227; Thu, 6 Jun 2019 00:34:13 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8D27F3092667; Thu, 6 Jun 2019 07:33:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BFC766729E; Thu, 6 Jun 2019 07:33:38 +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 6B9471806B16; Thu, 6 Jun 2019 07:33:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x567XCX5001590 for ; Thu, 6 Jun 2019 03:33:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5413B1057FDD; Thu, 6 Jun 2019 07:33:12 +0000 (UTC) Received: from orkuz.int.mamuti.net (ovpn-116-197.ams2.redhat.com [10.36.116.197]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 25B7B104B514 for ; Thu, 6 Jun 2019 07:33:09 +0000 (UTC) Received: by orkuz.int.mamuti.net (Postfix, from userid 500) id C75DF2A1180; Thu, 6 Jun 2019 09:33:07 +0200 (CEST) From: Jiri Denemark To: libvir-list@redhat.com Date: Thu, 6 Jun 2019 09:33:02 +0200 Message-Id: <3ea90614a378f58638a74c785fbb0c033d512072.1559806382.git.jdenemar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] cpu_conf: Fix XPath for parsing TSC frequency 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: , 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 06 Jun 2019 07:34:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Due to this bug the following command would fail on any host where TSC frequency can be probed: $ virsh capabilities | virsh cpu-baseline /dev/stdin error: unsupported configuration: Invalid TSC frequency https://bugzilla.redhat.com/show_bug.cgi?id=3D1641702 Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- src/conf/cpu_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index dc46e7f57a..825df88246 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -417,8 +417,8 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, if (VIR_ALLOC(tsc) < 0) goto cleanup; =20 - if (virXPathULongLong("./counter[@name=3D'tsc']/@frequency", c= txt, - &tsc->frequency) < 0) { + if (virXPathULongLong("string(./counter[@name=3D'tsc']/@freque= ncy)", + ctxt, &tsc->frequency) < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("Invalid TSC frequency")); goto cleanup; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list