From nobody Wed May 14 22:50:17 2025 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1519927438484233.40852967459614; Thu, 1 Mar 2018 10:03:58 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id 0042B13AAE; Thu, 1 Mar 2018 18:03:56 +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 CB5BE5D9CD; Thu, 1 Mar 2018 18:03:56 +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 9867E4A478; Thu, 1 Mar 2018 18:03:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w21I3fan017503 for ; Thu, 1 Mar 2018 13:03:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id 797AD2024CA8; Thu, 1 Mar 2018 18:03:41 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.98]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 051912024CA6 for ; Thu, 1 Mar 2018 18:03:40 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 1 Mar 2018 19:03:29 +0100 Message-Id: <20180301180334.4225-5-abologna@redhat.com> In-Reply-To: <20180301180334.4225-1-abologna@redhat.com> References: <20180301180334.4225-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [RFC PATCH v3 4/9] qemu: Add capabilities for optional pSeries 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 01 Mar 2018 18:03:57 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Using the new qom-list-properties QMP command allows us to probe for the corresponding QEMU machine type options. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 16 ++ src/qemu/qemu_capabilities.h | 6 + .../qemucapabilitiesdata/caps_1.2.2.x86_64.replies | 20 ++- tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml | 2 +- .../qemucapabilitiesdata/caps_1.3.1.x86_64.replies | 20 ++- tests/qemucapabilitiesdata/caps_1.3.1.x86_64.xml | 2 +- .../qemucapabilitiesdata/caps_1.4.2.x86_64.replies | 20 ++- tests/qemucapabilitiesdata/caps_1.4.2.x86_64.xml | 2 +- .../qemucapabilitiesdata/caps_1.5.3.x86_64.replies | 20 ++- tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 2 +- .../qemucapabilitiesdata/caps_1.6.0.x86_64.replies | 20 ++- tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 2 +- .../qemucapabilitiesdata/caps_1.7.0.x86_64.replies | 20 ++- tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 2 +- .../qemucapabilitiesdata/caps_2.1.1.x86_64.replies | 20 ++- tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 2 +- .../caps_2.10.0-gicv2.aarch64.replies | 24 ++- .../caps_2.10.0-gicv2.aarch64.xml | 2 +- .../caps_2.10.0-gicv3.aarch64.replies | 24 ++- .../caps_2.10.0-gicv3.aarch64.xml | 2 +- .../qemucapabilitiesdata/caps_2.10.0.ppc64.replies | 22 ++- tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 2 +- .../qemucapabilitiesdata/caps_2.10.0.s390x.replies | 26 ++-- tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 2 +- .../caps_2.10.0.x86_64.replies | 30 ++-- tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 2 +- .../caps_2.12.0-gicv2.aarch64.replies | 24 ++- .../caps_2.12.0-gicv2.aarch64.xml | 2 +- .../caps_2.12.0-gicv3.aarch64.replies | 24 ++- .../caps_2.12.0-gicv3.aarch64.xml | 2 +- .../qemucapabilitiesdata/caps_2.12.0.ppc64.replies | 170 +++++++++++++++++= +++- tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml | 6 +- .../caps_2.12.0.x86_64.replies | 30 ++-- tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 2 +- .../qemucapabilitiesdata/caps_2.4.0.x86_64.replies | 20 ++- tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 2 +- .../qemucapabilitiesdata/caps_2.5.0.x86_64.replies | 22 ++- tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 2 +- .../caps_2.6.0-gicv2.aarch64.replies | 24 ++- .../caps_2.6.0-gicv2.aarch64.xml | 2 +- .../caps_2.6.0-gicv3.aarch64.replies | 24 ++- .../caps_2.6.0-gicv3.aarch64.xml | 2 +- .../qemucapabilitiesdata/caps_2.6.0.ppc64.replies | 22 ++- tests/qemucapabilitiesdata/caps_2.6.0.ppc64.xml | 2 +- .../qemucapabilitiesdata/caps_2.6.0.x86_64.replies | 22 ++- tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 2 +- .../qemucapabilitiesdata/caps_2.7.0.s390x.replies | 22 ++- tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 2 +- .../qemucapabilitiesdata/caps_2.7.0.x86_64.replies | 22 ++- tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 2 +- .../qemucapabilitiesdata/caps_2.8.0.s390x.replies | 26 ++-- tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 2 +- .../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 22 ++- tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 2 +- .../qemucapabilitiesdata/caps_2.9.0.ppc64.replies | 22 ++- tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml | 2 +- .../qemucapabilitiesdata/caps_2.9.0.s390x.replies | 26 ++-- tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 2 +- .../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 30 ++-- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 2 +- 60 files changed, 654 insertions(+), 248 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index fb6b492454..72c0c2a338 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -460,6 +460,12 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "machine.pseries.max-cpu-compat", "dump-completed", "qom-list-properties", + "machine.pseries.cap-htm", + + /* 285 */ + "machine.pseries.cap-sbbc", + "machine.pseries.cap-cfpc", + "machine.pseries.cap-ibs", ); =20 =20 @@ -1819,6 +1825,13 @@ static struct virQEMUCapsStringFlags virQEMUCapsObje= ctPropsIntelIOMMU[] =3D { { "device-iotlb", QEMU_CAPS_INTEL_IOMMU_DEVICE_IOTLB }, }; =20 +static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsSPAPRMachine[] = =3D { + { "cap-htm", QEMU_CAPS_MACHINE_PSERIES_CAP_HTM }, + { "cap-sbbc", QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC }, + { "cap-cfpc", QEMU_CAPS_MACHINE_PSERIES_CAP_CFPC }, + { "cap-ibs", QEMU_CAPS_MACHINE_PSERIES_CAP_IBS }, +}; + /* see documentation for virQEMUCapsQMPSchemaGetByPath for the query forma= t */ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] =3D { { "blockdev-add/arg-type/options/+gluster/debug-level", QEMU_CAPS_GLUS= TER_DEBUG_LEVEL}, @@ -1934,6 +1947,9 @@ static struct virQEMUCapsObjectTypeProps virQEMUCapsO= bjectProps[] =3D { { "spapr-pci-host-bridge", virQEMUCapsObjectPropsSpaprPCIHostBridge, ARRAY_CARDINALITY(virQEMUCapsObjectPropsSpaprPCIHostBridge), QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE }, + { "spapr-machine", virQEMUCapsObjectPropsSPAPRMachine, + ARRAY_CARDINALITY(virQEMUCapsObjectPropsSPAPRMachine), + -1 }, }; =20 struct virQEMUCapsPropTypeObjects { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index ce07dfd6b1..cad18f4134 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -445,6 +445,12 @@ typedef enum { QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT, /* -machine pseries,max-cpu-= compat=3D */ QEMU_CAPS_DUMP_COMPLETED, /* DUMP_COMPLETED event */ QEMU_CAPS_QOM_LIST_PROPERTIES, /* qom-list-properties QMP command */ + QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, /* -machine pseries,cap-htm=3D */ + + /* 285 */ + QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC, /* -machine pseries,cap-sbbc=3D */ + QEMU_CAPS_MACHINE_PSERIES_CAP_CFPC , /* -machine pseries,cap-cfpc=3D */ + QEMU_CAPS_MACHINE_PSERIES_CAP_IBS , /* -machine pseries,cap-ibs=3D */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.replies b/tests/q= emucapabilitiesdata/caps_1.2.2.x86_64.replies index 62c31774c0..62faf58520 100644 --- a/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.replies @@ -1708,6 +1708,14 @@ "id": "libvirt-39" } =20 +{ + "id": "libvirt-40", + "error": { + "class": "DeviceNotFound", + "desc": "Device 'spapr-machine' not found" + } +} + { "return": [ { @@ -1746,7 +1754,7 @@ "name": "none" } ], - "id": "libvirt-40" + "id": "libvirt-41" } =20 { [...] diff --git a/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_1.2.2.x86_64.xml index 3001d487c6..d7109dd0bf 100644 --- a/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_1.2.2.x86_64.xml @@ -112,7 +112,7 @@ 1002002 0 - 26900 + 27022 x86_64 [...] diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.replies b/tests/q= emucapabilitiesdata/caps_2.12.0.ppc64.replies index fa13229776..f15ed0f557 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.replies +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.replies @@ -5620,6 +5620,162 @@ "id": "libvirt-41" } =20 +{ + "return": [ + { + "name": "graphics", + "description": "Set on/off to enable/disable graphics emulation", + "type": "bool" + }, + { + "name": "phandle-start", + "description": "The first phandle ID we may generate dynamically", + "type": "int" + }, + { + "name": "dump-guest-core", + "description": "Include guest memory in a core dump", + "type": "bool" + }, + { + "name": "kernel-irqchip", + "description": "Configure KVM in-kernel irqchip", + "type": "on|off|split" + }, + { + "name": "accel", + "description": "Accelerator list", + "type": "string" + }, + { + "name": "append", + "description": "Linux kernel command line", + "type": "string" + }, + { + "name": "dumpdtb", + "description": "Dump current dtb to a file and quit", + "type": "string" + }, + { + "name": "igd-passthru", + "description": "Set on/off to enable/disable igd passthrou", + "type": "bool" + }, + { + "name": "dt-compatible", + "description": "Overrides the \"compatible\" property of the dt root= node", + "type": "string" + }, + { + "name": "kernel", + "description": "Linux kernel image file", + "type": "string" + }, + { + "name": "usb", + "description": "Set on/off to enable/disable usb", + "type": "bool" + }, + { + "name": "suppress-vmdesc", + "description": "Set on to disable self-describing migration", + "type": "bool" + }, + { + "name": "dtb", + "description": "Linux kernel device tree file", + "type": "string" + }, + { + "name": "firmware", + "description": "Firmware image", + "type": "string" + }, + { + "name": "mem-merge", + "description": "Enable/disable memory merge support", + "type": "bool" + }, + { + "name": "initrd", + "description": "Linux initial ramdisk file", + "type": "string" + }, + { + "name": "enforce-config-section", + "description": "Set on to enforce configuration section migration", + "type": "bool" + }, + { + "name": "kvm-shadow-mem", + "description": "KVM shadow MMU size", + "type": "int" + }, + { + "name": "cap-ibs", + "description": "Indirect Branch Serialisation (broken, fixed)", + "type": "string" + }, + { + "name": "cap-cfpc", + "description": "Cache Flush on Privilege Change (broken, workaround,= fixed)", + "type": "string" + }, + { + "name": "cap-sbbc", + "description": "Speculation Barrier Bounds Checking (broken, workaro= und, fixed)", + "type": "string" + }, + { + "name": "cap-dfp", + "description": "Allow Decimal Floating Point (DFP)", + "type": "bool" + }, + { + "name": "cap-htm", + "description": "Allow Hardware Transactional Memory (HTM)", + "type": "bool" + }, + { + "name": "cap-vsx", + "description": "Allow Vector Scalar Extensions (VSX)", + "type": "bool" + }, + { + "name": "cap-ibs", + "description": "Indirect Branch Serialisation (broken, fixed)", + "type": "string" + }, + { + "name": "cap-cfpc", + "description": "Cache Flush on Privilege Change (broken, workaround,= fixed)", + "type": "string" + }, + { + "name": "cap-sbbc", + "description": "Speculation Barrier Bounds Checking (broken, workaro= und, fixed)", + "type": "string" + }, + { + "name": "cap-dfp", + "description": "Allow Decimal Floating Point (DFP)", + "type": "bool" + }, + { + "name": "cap-htm", + "description": "Allow Hardware Transactional Memory (HTM)", + "type": "bool" + }, + { + "name": "cap-vsx", + "description": "Allow Vector Scalar Extensions (VSX)", + "type": "bool" + } + ], + "id": "libvirt-42" +} + { "return": [ { @@ -5745,7 +5901,7 @@ "cpu-max": 1 } ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { [...] diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemuc= apabilitiesdata/caps_2.12.0.ppc64.xml index bcaa73c48f..36a426dce3 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml @@ -186,9 +186,13 @@ + + + + 2011050 0 - 395796 + 399614 (v2.11.0-1777-g2765615) ppc64 [...] --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list