From nobody Wed Apr 24 16:18:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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=1573055254; cv=none; d=zoho.com; s=zohoarc; b=OrFRglMVQFQTdZZjEeBwG+GzZTKH6QoAM+/u0WL8QSfPMj4hRA9ZlOhHJQLjAmAgOrrrgUHw+czS4CV2FHfrA5lpPyVD8GM5fCIMpac+gG8YQm7t0ofg3RTO8CD2nyjeXFtTwWHwYnsO8eBALwcCQLeHxwl8gP4JMyDqBkqJ9lY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573055254; 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; bh=7jhdAjCftPVua1Ax4HIouh2ucsEuvNwBnjtFaX/EwdQ=; b=gnz/mEUlJCnLteBiGFe8yD27Ed1kq+xPdf5uQ4HEdNc7wNGuZrd6Jrl0t79oyUiZI+xlDs1+zOZN1gCWeEkuPPmP37LVB1+xmIJ6axVrBgRS/30ZIvzD/mBgecu7i3GajY2tJ8yyhLyX1QeW9RxGT4UN+OTNUz51Betis8Likn0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1573055254115549.350175067961; Wed, 6 Nov 2019 07:47:34 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-280-aTwaD79lOkK_XE_jBQUorw-1; Wed, 06 Nov 2019 10:47:28 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A2F76102; Wed, 6 Nov 2019 15:47:23 +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 5EABDF6EE; Wed, 6 Nov 2019 15:47:23 +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 1CC691819AD0; Wed, 6 Nov 2019 15:47:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA6FlLDb007865 for ; Wed, 6 Nov 2019 10:47:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id 16D175D9E5; Wed, 6 Nov 2019 15:47:21 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-95.brq.redhat.com [10.40.204.95]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6FD2A5DA2C for ; Wed, 6 Nov 2019 15:47:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573055253; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=7jhdAjCftPVua1Ax4HIouh2ucsEuvNwBnjtFaX/EwdQ=; b=fxFOaWYOkKnFZGECRPYoEOzMx0OHyi2IMkAV8gqwmQ7uNowpxohreX2B0rWkhyUWICopJn JVcfdFvHl3ltyR/nSRvL9Np9pMAjN1qXnhOMlRcounAKr9cJMsRITHjXHil6q41pAm7NRl UHqvjl6uBoiAj47LpGGrVonZN6Gp9zc= From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 6 Nov 2019 16:47:01 +0100 Message-Id: <20191106154711.8616-2-abologna@redhat.com> In-Reply-To: <20191106154711.8616-1-abologna@redhat.com> References: <20191106154711.8616-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 01/11] tests: Update capabilities for QEMU 4.2.0 on aarch64 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: aTwaD79lOkK_XE_jBQUorw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Unfortunately this results in a lot of churn because of the eigth hundred and change QEMU commits since the file was last touched, but the only part we actually care about is the fact that the query-cpu-model-expansion QMP command is now available on aarch64. Signed-off-by: Andrea Bolognani Tested-by: Andrew Jones Reviewed-by: Michal Privoznik --- This patch is heavily snipped. .../qemu_4.2.0-virt.aarch64.xml | 2 +- tests/domaincapsdata/qemu_4.2.0.aarch64.xml | 2 +- .../caps_4.2.0.aarch64.replies | 3394 ++++++++++------- .../caps_4.2.0.aarch64.xml | 9 +- 4 files changed, 2001 insertions(+), 1406 deletions(-) diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.replies b/tests/= qemucapabilitiesdata/caps_4.2.0.aarch64.replies index 08987b91d3..a51a3a42bd 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.replies @@ -21,7 +21,7 @@ "minor": 1, "major": 4 }, - "package": "v4.1.0-1378-g98b2e3c9ab" + "package": "v4.1.0-2221-g36609b4fa3" }, "id": "libvirt-2" } @@ -20476,6 +21030,25 @@ "id": "libvirt-40" } =20 +{ + "execute": "query-cpu-model-expansion", + "arguments": { + "type": "static", + "model": { + "name": "host" + } + }, + "id": "libvirt-41" +} + +{ + "id": "libvirt-41", + "error": { + "class": "GenericError", + "desc": "The requested expansion type is not supported" + } +} + { "execute": "qmp_capabilities", "id": "libvirt-1" @@ -20682,3 +21255,22 @@ ], "id": "libvirt-2" } + +{ + "execute": "query-cpu-model-expansion", + "arguments": { + "type": "static", + "model": { + "name": "max" + } + }, + "id": "libvirt-3" +} + +{ + "id": "libvirt-3", + "error": { + "class": "GenericError", + "desc": "The requested expansion type is not supported" + } +} diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.2.0.aarch64.xml index 7b13da4dca..15a6050dd3 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -109,6 +110,7 @@ + @@ -170,7 +172,7 @@ 4001050 0 61700242 - v4.1.0-1378-g98b2e3c9ab + v4.1.0-2221-g36609b4fa3 aarch64 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 16:18:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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=1573055263; cv=none; d=zoho.com; s=zohoarc; b=R8gifH2jnZWLD5O5KHDj4baErdRI1FJHCr8U3pNENkCOAKxLCYim9XCG/LyWw9NFFONpkqu5AVueFYTWNtVZWSfQeTAx0IFWYHqQ7HSLlEx5oktM5FHK+DMParKwJA+vzPtxuc8NH/KkUY2ABySoO3GJuT4nCniHmPizZ/hH+4A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573055263; 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; bh=GG2BSw4r4+wBat5DXZWyyyqtWz8kP9jiIstEpWAfwIc=; b=cFR/PZceyG8QXEx6CrbcupujS5RQ49c7gKkauD2Xq9caCl7ZV0G+GFCgS5jG7eYNQlP5Ob2RhabRUKha1mdBrcl7D/iUFRf45eBpGdcUWy0f9gQstFmpD9F0bTD+heD2J2xGYwLnlgJzombLLyKujPCfNx02P3O9V1aYxLu8sds= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1573055263393848.673124934801; Wed, 6 Nov 2019 07:47:43 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-224-Svu3SgOrPzCrpwHGYFQNAA-1; Wed, 06 Nov 2019 10:47:40 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id C78F11005509; Wed, 6 Nov 2019 15:47:34 +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 9C5741001DE0; Wed, 6 Nov 2019 15:47:34 +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 552CA1819ADA; Wed, 6 Nov 2019 15:47:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA6FlMiS007872 for ; Wed, 6 Nov 2019 10:47:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id 23B5B5DA7C; Wed, 6 Nov 2019 15:47:22 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-95.brq.redhat.com [10.40.204.95]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B5445D9E1 for ; Wed, 6 Nov 2019 15:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573055262; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=GG2BSw4r4+wBat5DXZWyyyqtWz8kP9jiIstEpWAfwIc=; b=fAm0Me3mwD5U1TuBNqWcYn1Ij5eSkNCkUAsfjk2oFvjozaQWEMt6pliErcOEz143SeYnzD MsdsN3WuBdp3IDOCKVJxM84vwRn3yPArqtFjdUjS5WZMWNL77VrMT1bxT18FDmHUVioKi9 7hY3iEf0V1tmNw5EllHb+K1v9uHQA2c= From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 6 Nov 2019 16:47:02 +0100 Message-Id: <20191106154711.8616-3-abologna@redhat.com> In-Reply-To: <20191106154711.8616-1-abologna@redhat.com> References: <20191106154711.8616-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 02/11] qemu: Rename virQEMUCapsObjectPropsMaxX86CPU 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: , 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-MC-Unique: Svu3SgOrPzCrpwHGYFQNAA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" We're going to use it on non-x86 soon, so it needs a more generic name: virQEMUCapsObjectPropsMaxCPU. Signed-off-by: Andrea Bolognani Tested-by: Andrew Jones Reviewed-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 9bb3c96448..c11756dc42 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1421,7 +1421,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjec= tPropsMemoryBackendMemfd[] { "hugetlb", QEMU_CAPS_OBJECT_MEMORY_MEMFD_HUGETLB }, }; =20 -static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMaxX86CPU[] =3D= { +static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMaxCPU[] =3D { { "unavailable-features", QEMU_CAPS_CPU_UNAVAILABLE_FEATURES }, }; =20 @@ -1432,8 +1432,8 @@ static virQEMUCapsObjectTypeProps virQEMUCapsObjectPr= ops[] =3D { { "memory-backend-memfd", virQEMUCapsObjectPropsMemoryBackendMemfd, G_N_ELEMENTS(virQEMUCapsObjectPropsMemoryBackendMemfd), QEMU_CAPS_OBJECT_MEMORY_MEMFD }, - { "max-x86_64-cpu", virQEMUCapsObjectPropsMaxX86CPU, - G_N_ELEMENTS(virQEMUCapsObjectPropsMaxX86CPU), + { "max-x86_64-cpu", virQEMUCapsObjectPropsMaxCPU, + G_N_ELEMENTS(virQEMUCapsObjectPropsMaxCPU), QEMU_CAPS_X86_MAX_CPU }, }; =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 16:18:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 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=1573055255; cv=none; d=zoho.com; s=zohoarc; b=nSYn3nFNAsi5CXgUAQzKfZ8Wqrd6Kx11ufty/tmoHt1v2zbrAYxuVFmb3a/2TTyMXRTSsEP5hYDeW+wXpX/eORuU98EtksvOy3QOT9DIPlV6AdNEQYsTJWjBN+M2G0S3loxywP9f/aW+DSfcBUtbG82oVdwywHtYmkLDXAMLAUo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573055255; 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; bh=dA2Knq4T08PCgxgu1w7cmJzDDBmlwFX4BDG2AAueors=; b=e/II8rGWSSi07aJHSIKUyoF9nngW6dUQy1TB4nq6akIYGk9z8d3U8suoDJfVMbFpKmNCxWUfVHsAlLdKkHBPEcclqL9jNkLiM42XdvZvPcecpN7fapxlk2XRDacCyCB9tuJXhLqMdNegjfAI3vNpHNGEOKhG5w+N0YpXc8sZrNY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1573055255308785.1085112790752; Wed, 6 Nov 2019 07:47:35 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-7-7aFganqKNfqKGBUdKpCKxA-1; Wed, 06 Nov 2019 10:47:32 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 90ECE1005500; Wed, 6 Nov 2019 15:47:26 +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 6287560BF4; Wed, 6 Nov 2019 15:47:26 +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 1F3C61819AD1; Wed, 6 Nov 2019 15:47:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA6FlNf7007882 for ; Wed, 6 Nov 2019 10:47:23 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2D2065DA2C; Wed, 6 Nov 2019 15:47:23 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-95.brq.redhat.com [10.40.204.95]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 86DCD5D9E5 for ; Wed, 6 Nov 2019 15:47:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573055254; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=dA2Knq4T08PCgxgu1w7cmJzDDBmlwFX4BDG2AAueors=; b=bwoSv/esXdd7+fC4qEUN5MaJ68E3ymre0UaoL/D2RszGLNRpbm0DBgnvLecMYAjHK9HKyA IYmIWyN5/bYBxISdWTe81XlPb5rcSYWqLEjEUGXnkp2FD1Gx+LA4VtdSioYiZuIfmRtMH4 1WiOkDPwSfCK1S+SWZNKB5PhCmNFVHc= From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 6 Nov 2019 16:47:03 +0100 Message-Id: <20191106154711.8616-4-abologna@redhat.com> In-Reply-To: <20191106154711.8616-1-abologna@redhat.com> References: <20191106154711.8616-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/11] qemu: Introduce QEMU_CAPS_ARM_MAX_CPU 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: 7aFganqKNfqKGBUdKpCKxA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Mirrors the existing QEMU_CAPS_X86_MAX_CPU. Signed-off-by: Andrea Bolognani Tested-by: Andrew Jones Reviewed-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 4 ++++ src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 + 5 files changed, 10 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c11756dc42..6c8e119e56 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -547,6 +547,9 @@ VIR_ENUM_IMPL(virQEMUCaps, "query-cpu-model-comparison", "ramfb", "machine.pseries.cap-ccf-assist", + + /* 345 */ + "arm-max-cpu", ); =20 =20 @@ -1141,6 +1144,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "vhost-user-gpu", QEMU_CAPS_DEVICE_VHOST_USER_GPU }, { "vhost-user-vga", QEMU_CAPS_DEVICE_VHOST_USER_VGA }, { "ramfb", QEMU_CAPS_DEVICE_RAMFB }, + { "max-arm-cpu", QEMU_CAPS_ARM_MAX_CPU }, }; =20 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[]= =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 10f0ce2654..32e9798cda 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -529,6 +529,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_DEVICE_RAMFB, /* -device ramfb */ QEMU_CAPS_MACHINE_PSERIES_CAP_CCF_ASSIST, /* -machine pseries.cap-ccf-= assist */ =20 + /* 345 */ + QEMU_CAPS_ARM_MAX_CPU, /* max-arm-cpu type exists */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; =20 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qem= ucapabilitiesdata/caps_2.12.0.aarch64.xml index 1787248110..0a2f801f53 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml @@ -153,6 +153,7 @@ + 2012000 0 61700289 diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.0.0.aarch64.xml index 66e3ca9205..83459c33cf 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml @@ -166,6 +166,7 @@ + 4000000 0 61700240 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.2.0.aarch64.xml index 15a6050dd3..a4cb7ba4e6 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -169,6 +169,7 @@ + 4001050 0 61700242 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 16:18:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 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=1573055283; cv=none; d=zoho.com; s=zohoarc; b=Ulk0IJTrsPJqoci8GzaHxmTJZl8wMf8o4lgK6LGltP3Fb8eNsu2x0QboOanKWEcqmCGubljvFCnD4SkGUZSLq/TobMzAbRrvkpXGO4BnWLmrNgIUYmR08qAiWQedepb0IPv2t0xZ2RQVeRmztcNukNisIppBhtC9O+iLJ5vDCxw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573055283; 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; bh=55wpIugGvjbt6lzWcYmGBoE2WP2TjrzEdSPGkxt56z8=; b=Tku8Z99fdSeSE0MSPemXFm4l7Hxa5U6oCdcqpAFTQrxlm+uro3YXhl4ETd/A/DQ9TUWbvS8ULB30G921KyQg8f5Da3WR3UWYY2nmYQ4vegXWyLl81KnnzfKMWLGDkS7ALlNWZB052jYgX6LGeUAm7If9lsmYGdkt30m9gLELWfI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1573055283139252.5895375488991; Wed, 6 Nov 2019 07:48:03 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-386-gN4wJO5YOAmJysXQ9rmyaw-1; Wed, 06 Nov 2019 10:47:39 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 428591800E07; Wed, 6 Nov 2019 15:47:32 +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 14564600CD; Wed, 6 Nov 2019 15:47:32 +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 C81F61819AD4; Wed, 6 Nov 2019 15:47:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA6FlOJU007888 for ; Wed, 6 Nov 2019 10:47:24 -0500 Received: by smtp.corp.redhat.com (Postfix) id 25D3A5DA2C; Wed, 6 Nov 2019 15:47:24 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-95.brq.redhat.com [10.40.204.95]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D9F45D9E5 for ; Wed, 6 Nov 2019 15:47:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573055281; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=55wpIugGvjbt6lzWcYmGBoE2WP2TjrzEdSPGkxt56z8=; b=AtFj5Jb5HsDzi6mduVJi3F9Hw7UJP4uXaJxGZUYbDCFp5F7H1jJKjADc348eCQWifg1QUI s7Gy4vxs/aJkUe2ZYVtMoWk/xjWDbjDfSg8GNJQPzk9GzY6AAdtNt6b5ThXBlmUuc8jsYh aw8iGkgZQ58na+N/pK1IXvE09KEOoy0= From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 6 Nov 2019 16:47:04 +0100 Message-Id: <20191106154711.8616-5-abologna@redhat.com> In-Reply-To: <20191106154711.8616-1-abologna@redhat.com> References: <20191106154711.8616-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 04/11] qemu: Query max-arm-cpu properties 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: gN4wJO5YOAmJysXQ9rmyaw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Tested-by: Andrew Jones Reviewed-by: Michal Privoznik --- This patch is heavily snipped. src/qemu/qemu_capabilities.c | 3 + .../caps_2.12.0.aarch64.replies | 159 ++++++++++-- .../caps_4.0.0.aarch64.replies | 159 ++++++++++-- .../caps_4.2.0.aarch64.replies | 235 ++++++++++++++++-- 4 files changed, 500 insertions(+), 56 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 6c8e119e56..363fb0e197 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1439,6 +1439,9 @@ static virQEMUCapsObjectTypeProps virQEMUCapsObjectPr= ops[] =3D { { "max-x86_64-cpu", virQEMUCapsObjectPropsMaxCPU, G_N_ELEMENTS(virQEMUCapsObjectPropsMaxCPU), QEMU_CAPS_X86_MAX_CPU }, + { "max-arm-cpu", virQEMUCapsObjectPropsMaxCPU, + G_N_ELEMENTS(virQEMUCapsObjectPropsMaxCPU), + QEMU_CAPS_ARM_MAX_CPU }, }; =20 static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsPSeries[] =3D { diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.replies b/tests= /qemucapabilitiesdata/caps_2.12.0.aarch64.replies index c4d9c42d72..2e1d8d345d 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.replies @@ -5376,10 +5376,133 @@ } =20 { - "execute": "query-machines", + "execute": "qom-list-properties", + "arguments": { + "typename": "max-arm-cpu" + }, "id": "libvirt-31" } =20 +{ + "return": [ + { + "name": "pmu", + "type": "bool" + }, + { + "name": "midr", + "type": "uint32" + }, + { + "name": "mp-affinity", + "type": "uint64" + }, + { + "name": "hotpluggable", + "type": "bool" + }, + { + "name": "unnamed-gpio-in[0]", + "type": "child" + }, + { + "name": "cfgend", + "type": "bool" + }, + { + "name": "psci-conduit", + "type": "uint32" + }, + { + "name": "reset-hivecs", + "type": "bool" + }, + { + "name": "memory", + "type": "link" + }, + { + "name": "unnamed-gpio-out[2]", + "type": "link" + }, + { + "name": "hotplugged", + "type": "bool" + }, + { + "name": "unnamed-gpio-out[3]", + "type": "link" + }, + { + "name": "parent_bus", + "type": "link" + }, + { + "name": "node-id", + "type": "int32" + }, + { + "name": "start-powered-off", + "type": "bool" + }, + { + "name": "unnamed-gpio-out[1]", + "type": "link" + }, + { + "name": "core-count", + "type": "int32" + }, + { + "name": "unnamed-gpio-out[0]", + "type": "link" + }, + { + "name": "gicv3-maintenance-interrupt[0]", + "type": "link" + }, + { + "name": "rvbar", + "type": "uint64" + }, + { + "name": "type", + "type": "string" + }, + { + "name": "pmu-interrupt[0]", + "type": "link" + }, + { + "name": "aarch64", + "description": "Set on/off to enable/disable aarch64 execution state= ", + "type": "bool" + }, + { + "name": "unnamed-gpio-in[2]", + "type": "child" + }, + { + "name": "unnamed-gpio-in[3]", + "type": "child" + }, + { + "name": "realized", + "type": "bool" + }, + { + "name": "unnamed-gpio-in[1]", + "type": "child" + } + ], + "id": "libvirt-31" +} + +{ + "execute": "query-machines", + "id": "libvirt-32" +} + { "return": [ { diff --git a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.replies b/tests/= qemucapabilitiesdata/caps_4.0.0.aarch64.replies index 91943860b1..3a9b1b8dc7 100644 --- a/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_4.0.0.aarch64.replies @@ -5864,10 +5864,133 @@ } =20 { - "execute": "query-machines", + "execute": "qom-list-properties", + "arguments": { + "typename": "max-arm-cpu" + }, "id": "libvirt-32" } =20 +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "pmu", + "type": "bool" + }, + { + "name": "midr", + "type": "uint32" + }, + { + "name": "mp-affinity", + "type": "uint64" + }, + { + "name": "hotpluggable", + "type": "bool" + }, + { + "name": "unnamed-gpio-in[0]", + "type": "child" + }, + { + "name": "psci-conduit", + "type": "uint32" + }, + { + "name": "reset-hivecs", + "type": "bool" + }, + { + "name": "memory", + "type": "link" + }, + { + "name": "unnamed-gpio-out[2]", + "type": "link" + }, + { + "name": "hotplugged", + "type": "bool" + }, + { + "name": "unnamed-gpio-out[3]", + "type": "link" + }, + { + "name": "parent_bus", + "type": "link" + }, + { + "name": "node-id", + "type": "int32" + }, + { + "name": "start-powered-off", + "type": "bool" + }, + { + "name": "unnamed-gpio-out[1]", + "type": "link" + }, + { + "name": "core-count", + "type": "int32" + }, + { + "name": "unnamed-gpio-out[0]", + "type": "link" + }, + { + "name": "gicv3-maintenance-interrupt[0]", + "type": "link" + }, + { + "name": "rvbar", + "type": "uint64" + }, + { + "name": "cfgend", + "type": "bool" + }, + { + "name": "pmu-interrupt[0]", + "type": "link" + }, + { + "name": "aarch64", + "description": "Set on/off to enable/disable aarch64 execution state= ", + "type": "bool" + }, + { + "name": "unnamed-gpio-in[2]", + "type": "child" + }, + { + "name": "unnamed-gpio-in[3]", + "type": "child" + }, + { + "name": "realized", + "type": "bool" + }, + { + "name": "unnamed-gpio-in[1]", + "type": "child" + } + ], + "id": "libvirt-32" +} + +{ + "execute": "query-machines", + "id": "libvirt-33" +} + { "return": [ { diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.replies b/tests/= qemucapabilitiesdata/caps_4.2.0.aarch64.replies index a51a3a42bd..efd193d90d 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.replies @@ -6236,10 +6236,205 @@ } =20 { - "execute": "query-machines", + "execute": "qom-list-properties", + "arguments": { + "typename": "max-arm-cpu" + }, + "id": "libvirt-32" +} + +{ + "return": [ + { + "name": "type", + "type": "string" + }, + { + "name": "sve640", + "type": "bool" + }, + { + "name": "psci-conduit", + "type": "uint32" + }, + { + "name": "sve128", + "type": "bool" + }, + { + "name": "sve1152", + "type": "bool" + }, + { + "name": "node-id", + "type": "int32" + }, + { + "name": "sve1408", + "type": "bool" + }, + { + "name": "memory", + "type": "link" + }, + { + "name": "unnamed-gpio-in[3]", + "type": "child" + }, + { + "name": "core-count", + "type": "int32" + }, + { + "name": "sve2048", + "type": "bool" + }, + { + "name": "aarch64", + "description": "Set on/off to enable/disable aarch64 execution state= ", + "type": "bool" + }, + { + "name": "unnamed-gpio-in[1]", + "type": "child" + }, + { + "name": "sve1664", + "type": "bool" + }, + { + "name": "realized", + "type": "bool" + }, + { + "name": "rvbar", + "type": "uint64" + }, + { + "name": "sve384", + "type": "bool" + }, + { + "name": "unnamed-gpio-out[2]", + "type": "link" + }, + { + "name": "mp-affinity", + "type": "uint64" + }, + { + "name": "sve512", + "type": "bool" + }, + { + "name": "unnamed-gpio-out[0]", + "type": "link" + }, + { + "name": "parent_bus", + "type": "link" + }, + { + "name": "hotplugged", + "type": "bool" + }, + { + "name": "gicv3-maintenance-interrupt[0]", + "type": "link" + }, + { + "name": "sve896", + "type": "bool" + }, + { + "name": "sve1024", + "type": "bool" + }, + { + "name": "pmu-interrupt[0]", + "type": "link" + }, + { + "name": "sve1280", + "type": "bool" + }, + { + "name": "sve1536", + "type": "bool" + }, + { + "name": "unnamed-gpio-in[2]", + "type": "child" + }, + { + "name": "sve-max-vq", + "type": "uint32" + }, + { + "name": "sve", + "type": "bool" + }, + { + "name": "start-powered-off", + "type": "bool" + }, + { + "name": "unnamed-gpio-in[0]", + "type": "child" + }, + { + "name": "sve256", + "type": "bool" + }, + { + "name": "sve1792", + "type": "bool" + }, + { + "name": "unnamed-gpio-out[3]", + "type": "link" + }, + { + "name": "cfgend", + "type": "bool" + }, + { + "name": "midr", + "type": "uint32" + }, + { + "name": "hotpluggable", + "type": "bool" + }, + { + "name": "pmu", + "type": "bool" + }, + { + "name": "unnamed-gpio-out[1]", + "type": "link" + }, + { + "name": "sve1920", + "type": "bool" + }, + { + "name": "reset-hivecs", + "type": "bool" + }, + { + "name": "sve768", + "type": "bool" + } + ], "id": "libvirt-32" } =20 +{ + "execute": "query-machines", + "id": "libvirt-33" +} + { "return": [ { --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 16:18:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 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=1573055266; cv=none; d=zoho.com; s=zohoarc; b=cCNF5FfbIZVR+XusuPobRUHvpMwbk7/5iw0kIqDWLvQUrMz10W1RQ6XuxPG2196PLQwfIBgucez9j7TGtB0tf2MTY67yfwbqbfVrxMiMAA/NhDKescpULd17VH/uz9Kt6W+QIUUE9fu3CahCzy1iY+EIkEI+dbPphCig00prQWE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573055266; 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; bh=P96ucUs9PrRyMz4mjZR0vrLMqc7sc66TqU+RwjEdjJU=; b=cpbrp69iepJgCTVpvGDrQxNIYC7UACy2CzJuBPYcQt3bGb24EzS7v72nQZ2cLSKUp1zFrouO0unhNj4lw/2PRZRSg/jkfTmYjlCi0fLbxg5NnBi+4FAAScyT/pCTWElD3+1sN2RryZ+ZU1d8MzmCem8gV5rqIH3A1m1oj3o3uHM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1573055266338616.4676333124355; Wed, 6 Nov 2019 07:47:46 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-146-PsBZ360cOqyQYXDCyjnSTA-1; Wed, 06 Nov 2019 10:47:43 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 37BDA1800D53; Wed, 6 Nov 2019 15:47:38 +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 139E85D9E1; Wed, 6 Nov 2019 15:47: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 C73344E56C; Wed, 6 Nov 2019 15:47:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA6FlQiZ007908 for ; Wed, 6 Nov 2019 10:47:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id B3C6C5D9E5; Wed, 6 Nov 2019 15:47:26 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-95.brq.redhat.com [10.40.204.95]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1CC8A5DA76 for ; Wed, 6 Nov 2019 15:47:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573055265; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=P96ucUs9PrRyMz4mjZR0vrLMqc7sc66TqU+RwjEdjJU=; b=IEaXiao9nz8/kcLBxwoUKQrdkmVV9YC6wuNnGvJRI9wFBHH34PYFJWcsVGFjFXhkmNCAsr dgD2+sCzXDV8CYRVkoSlxfqizH9UvHgYYdh1hLRcifwgtbEtBfSujabJ286IsYbrsmqfoj q4mE4vg+jluURhLvw5X7ufGbvKsvko4= From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 6 Nov 2019 16:47:05 +0100 Message-Id: <20191106154711.8616-6-abologna@redhat.com> In-Reply-To: <20191106154711.8616-1-abologna@redhat.com> References: <20191106154711.8616-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 05/11] qemu: Update query-cpu-model-expansion check 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: PsBZ360cOqyQYXDCyjnSTA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" CPU features are available on ARM only wherever the query-cpu-model-expansion QMP command is available, same as on s390. Update qemuBuildCpuModelArgStr() to reflect this fact. Signed-off-by: Andrea Bolognani Tested-by: Andrew Jones Reviewed-by: Michal Privoznik --- src/qemu/qemu_command.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index be9839cc64..f37aecda37 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6703,7 +6703,8 @@ qemuBuildCpuModelArgStr(virQEMUDriverPtr driver, break; } =20 - if (ARCH_IS_S390(def->os.arch) && cpu->features && + if ((ARCH_IS_S390(def->os.arch) || ARCH_IS_ARM(def->os.arch)) && + cpu->features && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION)) { virReportError(VIR_ERR_INTERNAL_ERROR, _("CPU features not supported by hypervisor for %s " --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 16:18:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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=1573055286; cv=none; d=zoho.com; s=zohoarc; b=C2pM3tLrjEbKj2BS6TPykk7sX+5fI24OX99DnBx5Fo781Z3tSFbM/ThKNrGSW+WoghS4ltpg3Iai8UJ6Ya5UfccrUAvZjr/rWdgwFHw6H3VvneWKRYDKRmF9D5UQY2Cg1yP/eX4n+4Hqzl7My7ASX72cysUqarNBQmoSnZzwMmY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573055286; 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; bh=f0Ab9zSUpcXOoYj7LWBg56ZdoH8w3i+HUDxBRwr/Jwk=; b=PGfS7y/PNy//+TxaybFth1cWaFfxiejmE6j2HMl1b5KzHSgC+pgWwHR0x4v2EG8QKFqvprLVDbQmvvD2bZ1HxFDTaV4ZOBol0j1bveZ9LEY+oaRxAgnNfe9pQnE/oRg/7x/dP0bfP/KYFmRCFtJ+atEFtZKjn6fiAqccvWCsc/w= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1573055286507456.2630823731356; Wed, 6 Nov 2019 07:48:06 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-2-2G7pT9gqMf-Vm-qi0No6Pg-1; Wed, 06 Nov 2019 10:47:43 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 68E6F107ACC9; Wed, 6 Nov 2019 15:47:38 +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 439DD19C6A; Wed, 6 Nov 2019 15:47: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 0392A4E567; Wed, 6 Nov 2019 15:47:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA6FlRPl007913 for ; Wed, 6 Nov 2019 10:47:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9A6EE5DA7F; Wed, 6 Nov 2019 15:47:27 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-95.brq.redhat.com [10.40.204.95]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 245CF5DA2C for ; Wed, 6 Nov 2019 15:47:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573055285; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=f0Ab9zSUpcXOoYj7LWBg56ZdoH8w3i+HUDxBRwr/Jwk=; b=NzPz2x92uOyAOu94BTczFXfeDGcy1lKaJGAyOTDHsUHnYmycekXQoGNU3A9E5E/zmaq2Rj bZP0Sh3wK/Gd//2rc78Ucj4bq8ZhUCYRGYUcvDO/SD+paTcqQ6V1Mg0MWggiZTOljQEpgr I+iS0hdZXRZEE/Bm55QtEck3/KdvAok= From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 6 Nov 2019 16:47:06 +0100 Message-Id: <20191106154711.8616-7-abologna@redhat.com> In-Reply-To: <20191106154711.8616-1-abologna@redhat.com> References: <20191106154711.8616-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 06/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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 2G7pT9gqMf-Vm-qi0No6Pg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) 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 Tested-by: Andrew Jones Reviewed-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 7 +- .../caps_4.2.0.aarch64.replies | 100 ++++++++++++++++-- .../caps_4.2.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 363fb0e197..fc6473651c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -2559,10 +2559,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 /* Older s390 models do not report a feature set */ if (ARCH_IS_S390(qemuCaps->arch)) diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.replies b/tests/= qemucapabilitiesdata/caps_4.2.0.aarch64.replies index efd193d90d..127f121680 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.replies @@ -21228,7 +21228,7 @@ { "execute": "query-cpu-model-expansion", "arguments": { - "type": "static", + "type": "full", "model": { "name": "host" } @@ -21237,10 +21237,54 @@ } =20 { - "id": "libvirt-42", + "return": { + "model": { + "name": "host", + "props": { + "sve768": false, + "sve128": true, + "sve1024": false, + "sve1280": false, + "sve896": false, + "sve256": true, + "sve1536": false, + "sve1792": false, + "sve384": false, + "sve": true, + "sve2048": false, + "sve512": true, + "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 @@ -21454,7 +21498,7 @@ { "execute": "query-cpu-model-expansion", "arguments": { - "type": "static", + "type": "full", "model": { "name": "max" } @@ -21463,9 +21507,53 @@ } =20 { - "id": "libvirt-3", + "return": { + "model": { + "name": "max", + "props": { + "sve768": true, + "sve128": true, + "sve1024": true, + "sve1280": true, + "sve896": true, + "sve256": 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.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.2.0.aarch64.xml index a4cb7ba4e6..17960460fb 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -175,6 +175,48 @@ 61700242 v4.1.0-2221-g36609b4fa3 aarch64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 16:18:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 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=1573055264; cv=none; d=zoho.com; s=zohoarc; b=oRaC7WTHtD01G5IBleBu2y2FQ6UMXye1To8F4wrJLSVe9FfBiukErGE677WbDRkTrnG0ueXyQqYZoAycydeICVhw2umly1Pl72TTDwzIyb0A3eCKfhKzLEBSpdK9VyZs1MTykhyqXTpMiGEQzsAkoJFCINL/3XVyrz7oLuT/D9g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573055264; 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; bh=SOg2qLJP1fUMeSkx28lZQKphuDgowtfGazg8VvbV4pE=; b=WMYQF2LpEK+O0O6EjfPTUgZSepbs8jMIb9sF39TTV8H5EfMW7Az+dTTGrw5MoyjKqoWocIsXPtT6pniiufE/6zpyQODGXw1EyIjTT0LJVQiz76F42uzVE1aiuT0G9R4gLruYk1kBGkrCZiFvFWQqHq8eagw/SZIe7yaa+4Swe0Q= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1573055264441886.2827077463497; Wed, 6 Nov 2019 07:47:44 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-349-IojS_v-MOP-c1XSeENi0AA-1; Wed, 06 Nov 2019 10:47:40 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id D48CA107ACC4; Wed, 6 Nov 2019 15:47:34 +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 AB1945D70E; Wed, 6 Nov 2019 15:47:34 +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 59F614E562; Wed, 6 Nov 2019 15:47:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA6FlS0g007923 for ; Wed, 6 Nov 2019 10:47:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id 7D5AB5DA2C; Wed, 6 Nov 2019 15:47:28 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-95.brq.redhat.com [10.40.204.95]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E687B5D9E5 for ; Wed, 6 Nov 2019 15:47:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573055263; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=SOg2qLJP1fUMeSkx28lZQKphuDgowtfGazg8VvbV4pE=; b=GWpanennql7AXS8HIV9Y52o4xeOBy5KZM1SyJ23ftdY5EgsER6hbD1ZcmD9QFWQUyJgZir 3EGFYrvsugk+SMSE7AyeqhzwudFH2Hsu7wPvqyM+1Hv5/zOmHS+zcHsjREWCgB/Fc0SJd0 BWdHHrQajsS7RAMmw5UHmbBKngmGzQo= From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 6 Nov 2019 16:47:07 +0100 Message-Id: <20191106154711.8616-8-abologna@redhat.com> In-Reply-To: <20191106154711.8616-1-abologna@redhat.com> References: <20191106154711.8616-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 07/11] cpu_map: Introduce ARM CPU features 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: , 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-MC-Unique: IojS_v-MOP-c1XSeENi0AA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The only feature we care about for the moment is SVE, which can be controlled both with a coarse granularity by turning it on/off completely and with a finer granularity by enabling/disabling individual vector lengths. Signed-off-by: Andrea Bolognani Tested-by: Andrew Jones Reviewed-by: Michal Privoznik --- src/cpu_map/arm_features.xml | 22 ++++++++++++++++++++++ src/cpu_map/index.xml | 4 ++++ 2 files changed, 26 insertions(+) create mode 100644 src/cpu_map/arm_features.xml diff --git a/src/cpu_map/arm_features.xml b/src/cpu_map/arm_features.xml new file mode 100644 index 0000000000..8a53384463 --- /dev/null +++ b/src/cpu_map/arm_features.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml index 3c6885f60c..ed45083dca 100644 --- a/src/cpu_map/index.xml +++ b/src/cpu_map/index.xml @@ -75,4 +75,8 @@ + + + + --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 16:18:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 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=1573055267; cv=none; d=zoho.com; s=zohoarc; b=VQeME8ACukIZ8KJr+K1/+t2q2lNUFI7lglv7ZopONFIFKY5RdeD83SlJ5Ai7G8O7vzYGdBjlRk8q56W5qlJ74tR7a7lxDfjg3qymkQdQm/36VNHOQYfgKgESuKjRX9HeyEWcmRasQeeSmv49ArExb6hVOdRa5DNyoyNukFYsNB4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573055267; 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; bh=45GbEOh2RdcViRA9oKRyeSX/zhDgFFBhPG7x/3kEtJs=; b=N8m8L+KHWz8BEdzGFmhEBR0MfYLzkERwNcKHfI5NigExX2xdZhkqgjRSyX/d8Exad5y2aLb0EyXzE/xDL+cDiTJuUQMOF2y+1ICrnzLENjX2T6nJvtmi7vKex53eIuyOsTfMT/1PRhlXUjHNUP2Wl14srZOe40OrvSsqfT4EtXQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1573055267286692.4938361515174; Wed, 6 Nov 2019 07:47:47 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-231-fRN6Y_XFM7yT3OMN7zClYg-1; Wed, 06 Nov 2019 10:47:43 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6A8A785B6F9; Wed, 6 Nov 2019 15:47:38 +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 40ECB600C4; Wed, 6 Nov 2019 15:47: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 EF1941819ADB; Wed, 6 Nov 2019 15:47:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA6FlVva007939 for ; Wed, 6 Nov 2019 10:47:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 382F45DA2C; Wed, 6 Nov 2019 15:47:31 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-95.brq.redhat.com [10.40.204.95]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A4DDB5DA70 for ; Wed, 6 Nov 2019 15:47:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573055266; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=45GbEOh2RdcViRA9oKRyeSX/zhDgFFBhPG7x/3kEtJs=; b=HgR/PEAhKwBgkCL+ZkBE1ieQ/9+nAILSDjB3VN8wHp84HM0qrCWVdouZWFgJHbj+i4zAqq CDJQalj8lBAD8ohhFY27d29FEgUJo92osfZaG4BrmUKqYqDWIrPHgFW4jAOR97MVQixq1i lwJuG9MvyJ9qpp+dc1Q4lTMr6zaGuQU= From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 6 Nov 2019 16:47:08 +0100 Message-Id: <20191106154711.8616-9-abologna@redhat.com> In-Reply-To: <20191106154711.8616-1-abologna@redhat.com> References: <20191106154711.8616-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 08/11] cpu: Validate ARM CPU features 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: fRN6Y_XFM7yT3OMN7zClYg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" For now we only perform very basic validation, such as making sure that the user is not trying to enable/disable unknown CPU features and the like. Signed-off-by: Andrea Bolognani Tested-by: Andrew Jones Reviewed-by: Michal Privoznik --- src/cpu/cpu_arm.c | 157 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c index a102c6fda4..70dba6021c 100644 --- a/src/cpu/cpu_arm.c +++ b/src/cpu/cpu_arm.c @@ -23,7 +23,9 @@ =20 #include "viralloc.h" #include "cpu.h" +#include "cpu_map.h" #include "virstring.h" +#include "virxml.h" =20 #define VIR_FROM_THIS VIR_FROM_CPU =20 @@ -34,6 +36,137 @@ static const virArch archs[] =3D { VIR_ARCH_AARCH64, }; =20 +typedef struct _virCPUarmFeature virCPUarmFeature; +typedef virCPUarmFeature *virCPUarmFeaturePtr; +struct _virCPUarmFeature { + char *name; +}; + +static virCPUarmFeaturePtr +virCPUarmFeatureNew(void) +{ + return g_new0(virCPUarmFeature, 1); +} + +static void +virCPUarmFeatureFree(virCPUarmFeaturePtr feature) +{ + if (!feature) + return; + + g_free(feature->name); + + g_free(feature); +} + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virCPUarmFeature, virCPUarmFeatureFree); + +typedef struct _virCPUarmMap virCPUarmMap; +typedef virCPUarmMap *virCPUarmMapPtr; +struct _virCPUarmMap { + GPtrArray *features; +}; + +static virCPUarmMapPtr +virCPUarmMapNew(void) +{ + virCPUarmMapPtr map; + + map =3D g_new0(virCPUarmMap, 1); + + map->features =3D g_ptr_array_new(); + g_ptr_array_set_free_func(map->features, + (GDestroyNotify) virCPUarmFeatureFree); + + return map; +} + +static void +virCPUarmMapFree(virCPUarmMapPtr map) +{ + if (!map) + return; + + g_ptr_array_free(map->features, TRUE); + + g_free(map); +} + +G_DEFINE_AUTOPTR_CLEANUP_FUNC(virCPUarmMap, virCPUarmMapFree); + +static virCPUarmFeaturePtr +virCPUarmMapFeatureFind(virCPUarmMapPtr map, + const char *name) +{ + size_t i; + + for (i =3D 0; i < map->features->len; i++) { + virCPUarmFeaturePtr feature =3D g_ptr_array_index(map->features, i= ); + + if (STREQ(feature->name, name)) + return feature; + } + + return NULL; +} + +static int +virCPUarmMapFeatureParse(xmlXPathContextPtr ctxt G_GNUC_UNUSED, + const char *name, + void *data) +{ + g_autoptr(virCPUarmFeature) feature =3D NULL; + virCPUarmMapPtr map =3D data; + + if (virCPUarmMapFeatureFind(map, name)) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("CPU feature %s already defined"), name); + return -1; + } + + feature =3D virCPUarmFeatureNew(); + feature->name =3D g_strdup(name); + + g_ptr_array_add(map->features, g_steal_pointer(&feature)); + + return 0; +} + +static virCPUarmMapPtr +virCPUarmLoadMap(void) +{ + g_autoptr(virCPUarmMap) map =3D NULL; + + map =3D virCPUarmMapNew(); + + if (cpuMapLoad("arm", NULL, virCPUarmMapFeatureParse, NULL, map) < 0) + return NULL; + + return g_steal_pointer(&map); +} + +static virCPUarmMapPtr cpuMap; + +int virCPUarmDriverOnceInit(void); +VIR_ONCE_GLOBAL_INIT(virCPUarmDriver); + +int +virCPUarmDriverOnceInit(void) +{ + if (!(cpuMap =3D virCPUarmLoadMap())) + return -1; + + return 0; +} + +static virCPUarmMapPtr +virCPUarmGetMap(void) +{ + if (virCPUarmDriverInitialize() < 0) + return NULL; + + return cpuMap; +} =20 static int virCPUarmUpdate(virCPUDefPtr guest, @@ -99,6 +232,29 @@ virCPUarmCompare(virCPUDefPtr host G_GNUC_UNUSED, return VIR_CPU_COMPARE_IDENTICAL; } =20 +static int +virCPUarmValidateFeatures(virCPUDefPtr cpu) +{ + virCPUarmMapPtr map; + size_t i; + + if (!(map =3D virCPUarmGetMap())) + return -1; + + for (i =3D 0; i < cpu->nfeatures; i++) { + virCPUFeatureDefPtr feature =3D &cpu->features[i]; + + if (!virCPUarmMapFeatureFind(map, feature->name)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unknown CPU feature: %s"), + feature->name); + return -1; + } + } + + return 0; +} + struct cpuArchDriver cpuDriverArm =3D { .name =3D "arm", .arch =3D archs, @@ -108,4 +264,5 @@ struct cpuArchDriver cpuDriverArm =3D { .encode =3D NULL, .baseline =3D virCPUarmBaseline, .update =3D virCPUarmUpdate, + .validateFeatures =3D virCPUarmValidateFeatures, }; --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 16:18:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 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=1573055292; cv=none; d=zoho.com; s=zohoarc; b=GYXGQNDyqjlpxZ3jGJ6XUZhBQbuamjW383B6ewTaKqd3TnNXmZlsEfdCEn4CZBjyYnZ0xFDBXgMGoHZXA6sWtlIuKFv2T0OuT+7qLiaksL8S6Sh19P+REMGC14Bjhk7nzzERc5/jGt2UWYpqn28G2gFOt5j751y1yLeqOqSUxCM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573055292; 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; bh=GSL3JkHcxsx6KLMIPB1FOqURhhD6Sne8IFrR/WixEOQ=; b=Vbz39VgTGn6jONow6UMJC/4ouT7cYpSlSYY7/i/6aG7PYXIMBXdvy0fwi1Nj+EpH5owFMUwoNPhwMpsBGauzkdJ69Q+rPZV0I1sbTVIv5uevJgDr9aFAj7rao0jiqHmpRw02L6qFrOPvAzRNhwWXS1NsWxewfVKZj2ExYo7P5vA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1573055292695957.6993274479959; Wed, 6 Nov 2019 07:48:12 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-143-aqy7IcoUNT64iCiBXqY0BA-1; Wed, 06 Nov 2019 10:47:47 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E1E531804977; Wed, 6 Nov 2019 15:47:41 +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 BA324608B4; Wed, 6 Nov 2019 15:47:41 +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 718B64E566; Wed, 6 Nov 2019 15:47:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA6FlXY1007949 for ; Wed, 6 Nov 2019 10:47:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4DD535DA2C; Wed, 6 Nov 2019 15:47:33 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-95.brq.redhat.com [10.40.204.95]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 984BC5DA7F for ; Wed, 6 Nov 2019 15:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573055291; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=GSL3JkHcxsx6KLMIPB1FOqURhhD6Sne8IFrR/WixEOQ=; b=bSppasAf+D/MPR6hzXL6M25rBQIudkVEzknPrlHqWUSjX0QiXYA4Rjfi9pKoXnPiAUnvvR ys5+/ZTlYym8VXPEsuhbaV917ZWqCsPg5uTW1XfEbWj77SMkIhlwj9A41hKpWMcwSz0tgn FDWZL6JO0FUOs65mz93e/vnobmZYjVw= From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 6 Nov 2019 16:47:09 +0100 Message-Id: <20191106154711.8616-10-abologna@redhat.com> In-Reply-To: <20191106154711.8616-1-abologna@redhat.com> References: <20191106154711.8616-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 09/11] qemu: Validate ARM CPU features 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: aqy7IcoUNT64iCiBXqY0BA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This introduces semantic validation for SVE-related features, preventing the user from combining them in invalid ways; it also automatically enables overall SVE support if any SVE vector length has been enabled by the user to make sure QEMU behaves correctly. Signed-off-by: Andrea Bolognani Tested-by: Andrew Jones Reviewed-by: Michal Privoznik --- src/qemu/qemu_domain.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 667cc89072..bda357ceb9 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4465,6 +4465,10 @@ qemuDomainDefVcpusPostParse(virDomainDefPtr def) static int qemuDomainDefCPUPostParse(virDomainDefPtr def) { + virCPUFeatureDefPtr sveFeature =3D NULL; + bool sveVectorLengthsProvided =3D false; + size_t i; + if (!def->cpu) return 0; =20 @@ -4522,6 +4526,39 @@ qemuDomainDefCPUPostParse(virDomainDefPtr def) } } =20 + for (i =3D 0; i < def->cpu->nfeatures; i++) { + virCPUFeatureDefPtr feature =3D &def->cpu->features[i]; + + if (STREQ(feature->name, "sve")) { + sveFeature =3D feature; + } else if (STRPREFIX(feature->name, "sve")) { + sveVectorLengthsProvided =3D true; + } + } + + if (sveVectorLengthsProvided) { + if (sveFeature) { + if (sveFeature->policy =3D=3D VIR_CPU_FEATURE_DISABLE || + sveFeature->policy =3D=3D VIR_CPU_FEATURE_FORBID) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("SVE disabled, but SVE vector lengths pro= vided")); + return -1; + } else { + sveFeature->policy =3D VIR_CPU_FEATURE_REQUIRE; + } + } else { + if (VIR_RESIZE_N(def->cpu->features, def->cpu->nfeatures_max, + def->cpu->nfeatures, 1) < 0) { + return -1; + } + + def->cpu->features[def->cpu->nfeatures].name =3D g_strdup("sve= "); + def->cpu->features[def->cpu->nfeatures].policy =3D VIR_CPU_FEA= TURE_REQUIRE; + + def->cpu->nfeatures++; + } + } + /* Nothing to be done if only CPU topology is specified. */ if (def->cpu->mode =3D=3D VIR_CPU_MODE_CUSTOM && !def->cpu->model) --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 16:18:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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=1573055269; cv=none; d=zoho.com; s=zohoarc; b=JdqgBzJnGHEFOrdXLx30UqZrUtj2D1Jr1Pr2T1eCfJkoYe9nE67zasHKRdcIdr+SoGQ5P4AndDN9O8tLAuzodOG5wyBlGk44X8SD4TbnJtV5KxMJNPuzhuroxnQInlXKCGQWTCXFkTTMzNnhPmf1zykQG1JNU2q/yyYcHkFgMHQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573055269; 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; bh=EQvnsY0lpmxFOCb6f6G58k82UCiTqlDhIDtcHpWh55I=; b=jb04OJvZZNE65uHxHP0VphBpI/3pJL+QFkiRsUjbQztoPPHvMxnaBWbgHZ0/n5ZFmFVjm7lJ7NA503q/VCyfgg7wvhVzX91rYdPglGN/XSnR8Zd6J9kuW6Emlpip0z6XPfqMiBSnPsXFaobiuW2IsEfd8BFw6FV30nXuIMkEcg8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1573055269574673.1882097944515; Wed, 6 Nov 2019 07:47:49 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-148-AhktnwxnNdS3SY54H05lTw-1; Wed, 06 Nov 2019 10:47:47 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A23CD1005516; Wed, 6 Nov 2019 15:47:41 +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 74F53608BC; Wed, 6 Nov 2019 15:47:41 +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 37E211819AE9; Wed, 6 Nov 2019 15:47:41 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA6Flb4W007963 for ; Wed, 6 Nov 2019 10:47:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id 139815DA2C; Wed, 6 Nov 2019 15:47:37 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-95.brq.redhat.com [10.40.204.95]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5F5925D9E1 for ; Wed, 6 Nov 2019 15:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573055268; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=EQvnsY0lpmxFOCb6f6G58k82UCiTqlDhIDtcHpWh55I=; b=M0/HvxsDwuoww3/BHD8jGEtStBQN73zwbSD7StdUJj3hEq1KbzeBgd30yL1aoQUkGubBat 5G3ggqNlWgRbzMw9iy72JeD9j92tJAJ3oow/g8E0gOJrdIWCQwvUmvcHXR2/632dHdHycJ la7geNtqpNU2U3zLoB2Nqg0M7NwMEFI= From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 6 Nov 2019 16:47:10 +0100 Message-Id: <20191106154711.8616-11-abologna@redhat.com> In-Reply-To: <20191106154711.8616-1-abologna@redhat.com> References: <20191106154711.8616-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 10/11] tests: Introduce tests for ARM CPU features 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: AhktnwxnNdS3SY54H05lTw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Tested-by: Andrew Jones Reviewed-by: Michal Privoznik --- .../aarch64-features-sve-disabled.xml | 18 +++++++++++ .../aarch64-features-sve.aarch64-latest.args | 32 +++++++++++++++++++ .../qemuxml2argvdata/aarch64-features-sve.xml | 20 ++++++++++++ .../aarch64-features-wrong.xml | 17 ++++++++++ tests/qemuxml2argvtest.c | 9 ++++++ .../aarch64-features-sve.aarch64-latest.xml | 31 ++++++++++++++++++ tests/qemuxml2xmltest.c | 3 ++ 7 files changed, 130 insertions(+) create mode 100644 tests/qemuxml2argvdata/aarch64-features-sve-disabled.xml create mode 100644 tests/qemuxml2argvdata/aarch64-features-sve.aarch64-lat= est.args create mode 100644 tests/qemuxml2argvdata/aarch64-features-sve.xml create mode 100644 tests/qemuxml2argvdata/aarch64-features-wrong.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-features-sve.aarch64-l= atest.xml diff --git a/tests/qemuxml2argvdata/aarch64-features-sve-disabled.xml b/tes= ts/qemuxml2argvdata/aarch64-features-sve-disabled.xml new file mode 100644 index 0000000000..0fa8b1314d --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-features-sve-disabled.xml @@ -0,0 +1,18 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 1048576 + 1 + + hvm + + + + + + + /usr/bin/qemu-system-aarch64 + + + + diff --git a/tests/qemuxml2argvdata/aarch64-features-sve.aarch64-latest.arg= s b/tests/qemuxml2argvdata/aarch64-features-sve.aarch64-latest.args new file mode 100644 index 0000000000..6852f5d54d --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-features-sve.aarch64-latest.args @@ -0,0 +1,32 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-guest \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-guest/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-guest/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-guest/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-aarch64 \ +-name guest=3Dguest,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-guest/master-key.aes \ +-machine virt,accel=3Dkvm,usb=3Doff,dump-guest-core=3Doff,gic-version=3D3 \ +-cpu host,sve512=3Don,sve384=3Doff,sve256=3Don,sve128=3Don,sve=3Don \ +-m 1024 \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-no-acpi \ +-boot strict=3Don \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/aarch64-features-sve.xml b/tests/qemuxm= l2argvdata/aarch64-features-sve.xml new file mode 100644 index 0000000000..0147a9b19d --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-features-sve.xml @@ -0,0 +1,20 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 1048576 + 1 + + hvm + + + + + + + + + /usr/bin/qemu-system-aarch64 + + + + diff --git a/tests/qemuxml2argvdata/aarch64-features-wrong.xml b/tests/qemu= xml2argvdata/aarch64-features-wrong.xml new file mode 100644 index 0000000000..f4a883c9f6 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-features-wrong.xml @@ -0,0 +1,17 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 1048576 + 1 + + hvm + + + + + + /usr/bin/qemu-system-aarch64 + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index fd330df3e0..8c8743abc1 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2669,6 +2669,15 @@ mymain(void) DO_TEST("aarch64-noacpi-nouefi", NONE); DO_TEST_PARSE_ERROR("aarch64-acpi-nouefi", NONE); =20 + /* QEMU 4.0.0 didn't have support for aarch64 CPU features */ + DO_TEST_CAPS_ARCH_VER_FAILURE("aarch64-features-sve", "aarch64", "4.0.= 0"); + /* aarch64 doesn't support the same CPU features as x86 */ + DO_TEST_CAPS_ARCH_LATEST_FAILURE("aarch64-features-wrong", "aarch64"); + /* Can't enable vector lengths when SVE is overall disabled */ + DO_TEST_CAPS_ARCH_LATEST_PARSE_ERROR("aarch64-features-sve-disabled", = "aarch64"); + /* SVE aarch64 CPU features work on modern QEMU */ + DO_TEST_CAPS_ARCH_LATEST("aarch64-features-sve", "aarch64"); + qemuTestSetHostArch(driver.caps, VIR_ARCH_NONE); =20 DO_TEST("kvm-pit-delay", QEMU_CAPS_KVM_PIT_TICK_POLICY); diff --git a/tests/qemuxml2xmloutdata/aarch64-features-sve.aarch64-latest.x= ml b/tests/qemuxml2xmloutdata/aarch64-features-sve.aarch64-latest.xml new file mode 100644 index 0000000000..914cc7957a --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-features-sve.aarch64-latest.xml @@ -0,0 +1,31 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 1048576 + 1048576 + 1 + + hvm + + + + + + + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-aarch64 + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 89c9494e6c..a6c6c20ac1 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1142,6 +1142,9 @@ mymain(void) ARG_GIC, GIC_BOTH, ARG_QEMU_CAPS, NONE); =20 + /* SVE aarch64 CPU features work on modern QEMU */ + DO_TEST_CAPS_ARCH_LATEST("aarch64-features-sve", "aarch64"); + DO_TEST("memory-hotplug", NONE); DO_TEST("memory-hotplug-nonuma", NONE); DO_TEST("memory-hotplug-dimm", NONE); --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Apr 24 16:18:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 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=1573055274; cv=none; d=zoho.com; s=zohoarc; b=jHvavSaF7iInwoKVUWfIiDARqkUsn7XHVM7+e8/4LkSzlUsP3PlNjSSK4h7fPaojuwoaQOt39JzRrRiaj3IcPKGUP9W9Yd5MaroWGX5UC65yt74rVFsGS2rR2zkmtLVQjrIJ5u3kzsfj3H0vzjT6HSNgeE+5IvkMRuM2LELGkgw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573055274; 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; bh=nCAAGRSkwqGAnS6QL+GZV/sf51vyq6Q4AoHbe9hwgbs=; b=l/rF1wmRsEEcU3DfOdx0ntfyA3TiL3s8e4PZFmS7cAFLS0ghca9a4QRWridVyTV2MsSonzKSTUyHtqZYPL34DvPum1wiNc9f6y8gVZl+NvWNfGow3shtsDpJbYNkYKUIjZpXrTbXhkoRHbQP9A82pnc1fDA8XexuN41dX4JUwbc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1573055274162486.44729996690705; Wed, 6 Nov 2019 07:47:54 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-416-s2ZZgDlNMQGDdUyQjkhk2g-1; Wed, 06 Nov 2019 10:47:50 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id D2D19808245; Wed, 6 Nov 2019 15:47:45 +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 A89351001DE0; Wed, 6 Nov 2019 15:47:45 +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 622EE4E572; Wed, 6 Nov 2019 15:47:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xA6Flcll007969 for ; Wed, 6 Nov 2019 10:47:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id 778BB5D9E1; Wed, 6 Nov 2019 15:47:38 +0000 (UTC) Received: from kinshicho.redhat.com (ovpn-204-95.brq.redhat.com [10.40.204.95]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC0F75DA76 for ; Wed, 6 Nov 2019 15:47:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573055273; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=nCAAGRSkwqGAnS6QL+GZV/sf51vyq6Q4AoHbe9hwgbs=; b=dVjS5IFOkG2WPJlO83YoQuRIYYS/vltq+n7tMHhco+6ehBdrMRfnOPfOmuCyO/6BgCtJ4D fHUrDRDxf0WqivaWBm0YS1nj+9ChFmqC0Qit/IFY6pyvTcECZvWyk33WpfdPwi0Ai7fdm5 pE5nEL6+wPV9npSmWpYYoUbnrG3ex5U= From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 6 Nov 2019 16:47:11 +0100 Message-Id: <20191106154711.8616-12-abologna@redhat.com> In-Reply-To: <20191106154711.8616-1-abologna@redhat.com> References: <20191106154711.8616-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 11/11] news: Update for ARM CPU features 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: , 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-MC-Unique: s2ZZgDlNMQGDdUyQjkhk2g-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Tested-by: Andrew Jones Reviewed-by: Michal Privoznik --- docs/news.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 4dd8dd6dcc..dc91368790 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -44,6 +44,15 @@
+ + + qemu: Introduce support for ARM CPU features + + + The only features supported at the moment are SVE vector lengths, + which were introduced in QEMU 4.2.0. + +
--=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list