From nobody Mon Feb 9 09:32:43 2026 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=1564063612; cv=none; d=zoho.com; s=zohoarc; b=NEeIp3w3XWxGUqi4iV9nvEP5p/dm16kBXpe7TBQZLbDQTdIH8SpmpXyuanbaWuWS0FbfI49q5tsep5r8dS0jXLvuwKnjtTOEEcaLxjmycehD3mpkVJ9pLQsdST2hTCEJ3SfdRXFTEJoIEdi/x/fFI+hs5wcbsLiv/yN3c1p/XDY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564063612; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=m0VWCabsVMiJabG0bNQQhVE7WS3czbkRYkuNhMK0OHA=; b=kTQG/Wfqhdj33u98DqyTRnlLY0FGI4vqVKKIxyWHfHcxvV98U/fBCAF/rLsVAhxzXSBfAdmTi+ApmlbKFKyEq2NVwmc2iFeUKWZT7AZL4LrW+2c5PiL6rDFtbA6dRMwIeeX9Gicd3AfqRSBDzRPH+36XADtJGzrI6qvO/p1RCbU= 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 1564063612266267.38335870383935; Thu, 25 Jul 2019 07:06:52 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D6238309265F; Thu, 25 Jul 2019 14:06: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 31F5F1001B0F; Thu, 25 Jul 2019 14:06:50 +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 DEB3C19732; Thu, 25 Jul 2019 14:06:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x6PE6nom007546 for ; Thu, 25 Jul 2019 10:06:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id 08176608AB; Thu, 25 Jul 2019 14:06:49 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8635A60624 for ; Thu, 25 Jul 2019 14:06:43 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 25 Jul 2019 16:06:21 +0200 Message-Id: <20190725140625.2397-8-abologna@redhat.com> In-Reply-To: <20190725140625.2397-1-abologna@redhat.com> References: <20190725140625.2397-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH RFC 07/11] qemu: Perform full expansion on ARM 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.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 25 Jul 2019 14:06:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The ARM implementation of query-cpu-model-expansion only supports full expansion, so we have to make sure we're using that expansion mode if we want to obtain any useful data. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 7 +- .../caps_4.1.0.aarch64.replies | 100 ++++++++++++++++-- .../caps_4.1.0.aarch64.xml | 42 ++++++++ 3 files changed, 141 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index b3fbc76d07..e87bde837a 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2509,10 +2509,13 @@ virQEMUCapsProbeQMPHostCPU(virQEMUCapsPtr qemuCaps, * the initial static expansion to get all variants of feature names. */ if (ARCH_IS_X86(qemuCaps->arch) && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_CANONICAL_CPU_FEATURES)) + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_CANONICAL_CPU_FEATURES)) { type =3D QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC_FULL; - else + } else if (ARCH_IS_ARM(qemuCaps->arch)) { + type =3D QEMU_MONITOR_CPU_MODEL_EXPANSION_FULL; + } else { type =3D QEMU_MONITOR_CPU_MODEL_EXPANSION_STATIC; + } =20 if (qemuMonitorGetCPUModelExpansion(mon, type, model, true, &modelInfo= ) < 0) goto cleanup; diff --git a/tests/qemucapabilitiesdata/caps_4.1.0.aarch64.replies b/tests/= qemucapabilitiesdata/caps_4.1.0.aarch64.replies index 4dd40ecee6..66c7bc4237 100644 --- a/tests/qemucapabilitiesdata/caps_4.1.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_4.1.0.aarch64.replies @@ -20280,7 +20280,7 @@ { "execute": "query-cpu-model-expansion", "arguments": { - "type": "static", + "type": "full", "model": { "name": "host" } @@ -20289,10 +20289,54 @@ } =20 { - "id": "libvirt-42", + "return": { + "model": { + "name": "host", + "props": { + "sve128": false, + "sve768": false, + "sve1024": false, + "sve1280": false, + "sve256": false, + "sve896": false, + "sve1536": false, + "sve1792": false, + "sve384": false, + "sve": false, + "sve2048": false, + "sve512": false, + "aarch64": true, + "pmu": true, + "sve1920": false, + "sve1152": false, + "sve640": false, + "sve1408": false, + "sve1664": false + } + } + }, + "id": "libvirt-42" +} + +{ + "execute": "query-cpu-model-expansion", + "arguments": { + "type": "full", + "model": { + "name": "host", + "props": { + "migratable": false + } + } + }, + "id": "libvirt-43" +} + +{ + "id": "libvirt-43", "error": { "class": "GenericError", - "desc": "The requested expansion type is not supported." + "desc": "Parameter 'migratable' is unexpected" } } =20 @@ -20506,7 +20550,7 @@ { "execute": "query-cpu-model-expansion", "arguments": { - "type": "static", + "type": "full", "model": { "name": "max" } @@ -20515,9 +20559,53 @@ } =20 { - "id": "libvirt-3", + "return": { + "model": { + "name": "max", + "props": { + "sve128": true, + "sve768": true, + "sve1024": true, + "sve1280": true, + "sve256": true, + "sve896": true, + "sve1536": true, + "sve1792": true, + "sve384": true, + "sve": true, + "sve2048": true, + "sve512": true, + "aarch64": true, + "pmu": true, + "sve1920": true, + "sve1152": true, + "sve640": true, + "sve1408": true, + "sve1664": true + } + } + }, + "id": "libvirt-3" +} + +{ + "execute": "query-cpu-model-expansion", + "arguments": { + "type": "full", + "model": { + "name": "max", + "props": { + "migratable": false + } + } + }, + "id": "libvirt-4" +} + +{ + "id": "libvirt-4", "error": { "class": "GenericError", - "desc": "The requested expansion type is not supported." + "desc": "Parameter 'migratable' is unexpected" } } diff --git a/tests/qemucapabilitiesdata/caps_4.1.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.1.0.aarch64.xml index 99def43be9..950b954bdd 100644 --- a/tests/qemucapabilitiesdata/caps_4.1.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.1.0.aarch64.xml @@ -171,6 +171,48 @@ 61700759 v4.0.0-1532-ga44ee58faa-dirty aarch64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list