From nobody Wed May 15 22:10:52 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1647539612; cv=none; d=zohomail.com; s=zohoarc; b=VY6d4FaEIJl623XsVTtp5VrypP6ChxTNlXBKxrdq/LBb+m4c0LPX6+jBgAHjJ4Zsi+YEDh8Nx23phhBw3veJAYPYPaah8DCAlNGTFO9VzWz+RzwJ+2aynQfAEyZjQnJPJ0DHxsg4AaiCEVD5mK3jLNKxzQPS+CN8yBbU1wNyu4M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1647539612; 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; bh=qVnkXw9YoJ8Swneww2sYABnYGjU/IY0PlsFZKC58Vw8=; b=K8Jlz4jqTZFs0ilETa2B/vSDvZIZtcSgupEOp4Im/ucrmXN6cfOTiW4nfGZDppcEAYTfOXhddEJepxsf9cTELk5ReOj7jQSioLTGhTJs0QV8gYOQ8yTg3sS9BQuwezRBQLCM/fzIsu6YW7kpmqCThRoWwwQNxO+oMf0b8g/u0+s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1647539612725390.69163966138353; Thu, 17 Mar 2022 10:53:32 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-526-qDxODE0pMpyr3NYwJUTkog-1; Thu, 17 Mar 2022 13:53:29 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 27C0A1044560; Thu, 17 Mar 2022 17:53:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 07C3E40E80E1; Thu, 17 Mar 2022 17:53:26 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 90F351940372; Thu, 17 Mar 2022 17:53:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CA1F61940349 for ; Thu, 17 Mar 2022 17:53:24 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9560340D282B; Thu, 17 Mar 2022 17:53:24 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.39.194.80]) by smtp.corp.redhat.com (Postfix) with ESMTP id E9C3C40D2829; Thu, 17 Mar 2022 17:53:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647539611; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qVnkXw9YoJ8Swneww2sYABnYGjU/IY0PlsFZKC58Vw8=; b=GmEqnLy1nWDER/QUfq1w+Vz5rQvnOHDdvJlqmXwiRswGjJma2nSdlIAxxn3FDoX7G3I32n CdIOJcZCnuzdsUiHEML6+aJQje5xYwBMER4eyeW3JoZF2sh+oJevvAjaQySQ57ZplpNsRG dU1CWRbKmLu+f3NjnCaTJRgoiYY+E7A= X-MC-Unique: qDxODE0pMpyr3NYwJUTkog-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: fix recording of CPU deprecations Date: Thu, 17 Mar 2022 17:53:22 +0000 Message-Id: <20220317175322.3946790-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1647539614288100001 The code parsing thue query-cpu-definitions response will short-circuit the for loop in the case where usable=3Dyes, resulting in us failing to parse the CPU deprecation flag. IOW, we only reported deprecations in domain capabilities for CPU models which were not runnable on the host. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michal Privoznik --- src/qemu/qemu_monitor_json.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 27c5e1c992..d5622bd6d9 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -5309,10 +5309,9 @@ qemuMonitorJSONGetCPUDefinitions(qemuMonitor *mon, if (g_strv_length(cpu->blockers) =3D=3D 0) { cpu->usable =3D VIR_DOMCAPS_CPU_USABLE_YES; g_clear_pointer(&cpu->blockers, g_strfreev); - continue; + } else { + cpu->usable =3D VIR_DOMCAPS_CPU_USABLE_NO; } - - cpu->usable =3D VIR_DOMCAPS_CPU_USABLE_NO; } =20 if (virJSONValueObjectHasKey(child, "deprecated") && --=20 2.34.1