From nobody Thu Jul 3 21:44:03 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 1529415089552760.3319909970952; Tue, 19 Jun 2018 06:31:29 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 05627308212A; Tue, 19 Jun 2018 13:31:28 +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 A5C5A60BE3; Tue, 19 Jun 2018 13:31:27 +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 19C5D3D3BF; Tue, 19 Jun 2018 13:31:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5JDUx5i016270 for ; Tue, 19 Jun 2018 09:30:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id A407B2156888; Tue, 19 Jun 2018 13:30:59 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D53A2156880 for ; Tue, 19 Jun 2018 13:30:58 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Tue, 19 Jun 2018 15:30:52 +0200 Message-Id: <20180619133054.18931-2-abologna@redhat.com> In-Reply-To: <20180619133054.18931-1-abologna@redhat.com> References: <20180619133054.18931-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/3] qemu: Add capability for the HTM pSeries feature 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 19 Jun 2018 13:31:28 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 8 + src/qemu/qemu_capabilities.h | 1 + .../caps_2.12.0.aarch64.replies | 48 +++-- .../caps_2.12.0.aarch64.xml | 2 +- .../caps_2.12.0.ppc64.replies | 197 ++++++++++++++++-- .../caps_2.12.0.ppc64.xml | 3 +- .../caps_2.12.0.s390x.replies | 52 +++-- .../caps_2.12.0.s390x.xml | 2 +- .../caps_2.12.0.x86_64.replies | 64 +++--- .../caps_2.12.0.x86_64.xml | 2 +- 10 files changed, 303 insertions(+), 76 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 419208ad5c..4c96038c94 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -500,6 +500,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, =20 /* 310 */ "sev-guest", + "machine.pseries.cap-htm", ); =20 =20 @@ -1428,10 +1429,17 @@ static struct virQEMUCapsStringFlags virQEMUCapsObj= ectPropsMemoryBackendFile[] =3D { "discard-data", QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD }, }; =20 +static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsSPAPRMachine[] = =3D { + { "cap-htm", QEMU_CAPS_MACHINE_PSERIES_CAP_HTM }, +}; + static virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] =3D { { "memory-backend-file", virQEMUCapsObjectPropsMemoryBackendFile, ARRAY_CARDINALITY(virQEMUCapsObjectPropsMemoryBackendFile), QEMU_CAPS_OBJECT_MEMORY_FILE }, + { "spapr-machine", virQEMUCapsObjectPropsSPAPRMachine, + ARRAY_CARDINALITY(virQEMUCapsObjectPropsSPAPRMachine), + -1 }, }; =20 static void diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 3519a194e9..78c4e280cd 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -484,6 +484,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ =20 /* 310 */ QEMU_CAPS_SEV_GUEST, /* -object sev-guest,... */ + QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, /* -machine pseries.cap-htm */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.replies b/tests= /qemucapabilitiesdata/caps_2.12.0.aarch64.replies index e0b4f6da38..9a8e54c63d 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.replies +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.replies @@ -5582,10 +5582,26 @@ } =20 { - "execute": "query-machines", + "execute": "qom-list-properties", + "arguments": { + "typename": "spapr-machine" + }, "id": "libvirt-37" } =20 +{ + "id": "libvirt-37", + "error": { + "class": "DeviceNotFound", + "desc": "Class 'spapr-machine' not found" + } +} + +{ + "execute": "query-machines", + "id": "libvirt-38" +} + { "return": [ { @@ -5880,12 +5896,12 @@ "cpu-max": 1 } ], - "id": "libvirt-37" + "id": "libvirt-38" } =20 { "execute": "query-cpu-definitions", - "id": "libvirt-38" + "id": "libvirt-39" } =20 { @@ -6061,35 +6077,35 @@ "static": false } ], - "id": "libvirt-38" + "id": "libvirt-39" } =20 { "execute": "query-tpm-models", - "id": "libvirt-39" + "id": "libvirt-40" } =20 { "return": [ ], - "id": "libvirt-39" + "id": "libvirt-40" } =20 { "execute": "query-tpm-types", - "id": "libvirt-40" + "id": "libvirt-41" } =20 { "return": [ "emulator" ], - "id": "libvirt-40" + "id": "libvirt-41" } =20 { "execute": "query-command-line-options", - "id": "libvirt-41" + "id": "libvirt-42" } =20 { @@ -7250,12 +7266,12 @@ "option": "drive" } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -7317,12 +7333,12 @@ "capability": "dirty-bitmaps" } ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-qmp-schema", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -18690,12 +18706,12 @@ "meta-type": "object" } ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-gic-capabilities", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -18711,7 +18727,7 @@ "kernel": false } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qem= ucapabilitiesdata/caps_2.12.0.aarch64.xml index 5ed0290397..ecc029f403 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml @@ -171,7 +171,7 @@ 2011090 0 - 347313 + 347550 v2.12.0-rc0 aarch64 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.replies b/tests/q= emucapabilitiesdata/caps_2.12.0.ppc64.replies index 1bd1baa8a8..4f819150fe 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.replies +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.replies @@ -5637,10 +5637,179 @@ } =20 { - "execute": "query-machines", + "execute": "qom-list-properties", + "arguments": { + "typename": "spapr-machine" + }, + "id": "libvirt-38" +} + +{ + "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": "memory-encryption", + "description": "Set memory encyption object to use", + "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 Speculation (broken, fixed-ibs, fixe= d-ccd)", + "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 Speculation (broken, fixed-ibs, fixe= d-ccd)", + "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-38" } =20 +{ + "execute": "query-machines", + "id": "libvirt-39" +} + { "return": [ { @@ -5776,12 +5945,12 @@ "cpu-max": 1 } ], - "id": "libvirt-38" + "id": "libvirt-39" } =20 { "execute": "query-cpu-definitions", - "id": "libvirt-39" + "id": "libvirt-40" } =20 { @@ -7977,35 +8146,35 @@ "static": false } ], - "id": "libvirt-39" + "id": "libvirt-40" } =20 { "execute": "query-tpm-models", - "id": "libvirt-40" + "id": "libvirt-41" } =20 { "return": [ ], - "id": "libvirt-40" + "id": "libvirt-41" } =20 { "execute": "query-tpm-types", - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "return": [ "emulator" ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-command-line-options", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -9161,12 +9330,12 @@ "option": "drive" } ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -9228,12 +9397,12 @@ "capability": "dirty-bitmaps" } ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-qmp-schema", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -20601,7 +20770,7 @@ "meta-type": "object" } ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml b/tests/qemuc= apabilitiesdata/caps_2.12.0.ppc64.xml index c61029e479..7139179304 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.ppc64.xml @@ -166,9 +166,10 @@ + 2011090 0 - 424244 + 428334 v2.12.0-rc0 ppc64 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies b/tests/q= emucapabilitiesdata/caps_2.12.0.s390x.replies index fb57bcfd23..0a028a2fe6 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.replies @@ -3936,10 +3936,26 @@ } =20 { - "execute": "query-machines", + "execute": "qom-list-properties", + "arguments": { + "typename": "spapr-machine" + }, "id": "libvirt-37" } =20 +{ + "id": "libvirt-37", + "error": { + "class": "DeviceNotFound", + "desc": "Class 'spapr-machine' not found" + } +} + +{ + "execute": "query-machines", + "id": "libvirt-38" +} + { "return": [ { @@ -3995,12 +4011,12 @@ "alias": "s390-ccw-virtio" } ], - "id": "libvirt-37" + "id": "libvirt-38" } =20 { "execute": "query-cpu-definitions", - "id": "libvirt-38" + "id": "libvirt-39" } =20 { @@ -4535,35 +4551,35 @@ "migration-safe": true } ], - "id": "libvirt-38" + "id": "libvirt-39" } =20 { "execute": "query-tpm-models", - "id": "libvirt-39" + "id": "libvirt-40" } =20 { "return": [ ], - "id": "libvirt-39" + "id": "libvirt-40" } =20 { "execute": "query-tpm-types", - "id": "libvirt-40" + "id": "libvirt-41" } =20 { "return": [ "emulator" ], - "id": "libvirt-40" + "id": "libvirt-41" } =20 { "execute": "query-command-line-options", - "id": "libvirt-41" + "id": "libvirt-42" } =20 { @@ -5688,12 +5704,12 @@ "option": "drive" } ], - "id": "libvirt-41" + "id": "libvirt-42" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -5755,12 +5771,12 @@ "capability": "dirty-bitmaps" } ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-qmp-schema", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -17128,7 +17144,7 @@ "meta-type": "object" } ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -17139,7 +17155,7 @@ "name": "host" } }, - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -17177,7 +17193,7 @@ } } }, - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -17191,11 +17207,11 @@ } } }, - "id": "libvirt-45" + "id": "libvirt-46" } =20 { - "id": "libvirt-45", + "id": "libvirt-46", "error": { "class": "GenericError", "desc": "Property '.migratable' not found" diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml b/tests/qemuc= apabilitiesdata/caps_2.12.0.s390x.xml index 6fac6d6906..87d189e58d 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml @@ -135,7 +135,7 @@ 2012000 0 - 375762 + 375999 s390x diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.replies b/tests/= qemucapabilitiesdata/caps_2.12.0.x86_64.replies index 73365126f1..6f37e4301e 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.replies @@ -4995,10 +4995,26 @@ } =20 { - "execute": "query-machines", + "execute": "qom-list-properties", + "arguments": { + "typename": "spapr-machine" + }, "id": "libvirt-42" } =20 +{ + "id": "libvirt-42", + "error": { + "class": "DeviceNotFound", + "desc": "Class 'spapr-machine' not found" + } +} + +{ + "execute": "query-machines", + "id": "libvirt-43" +} + { "return": [ { @@ -5195,12 +5211,12 @@ "cpu-max": 255 } ], - "id": "libvirt-42" + "id": "libvirt-43" } =20 { "execute": "query-cpu-definitions", - "id": "libvirt-43" + "id": "libvirt-44" } =20 { @@ -5714,12 +5730,12 @@ "migration-safe": true } ], - "id": "libvirt-43" + "id": "libvirt-44" } =20 { "execute": "query-tpm-models", - "id": "libvirt-44" + "id": "libvirt-45" } =20 { @@ -5727,12 +5743,12 @@ "tpm-crb", "tpm-tis" ], - "id": "libvirt-44" + "id": "libvirt-45" } =20 { "execute": "query-tpm-types", - "id": "libvirt-45" + "id": "libvirt-46" } =20 { @@ -5740,12 +5756,12 @@ "passthrough", "emulator" ], - "id": "libvirt-45" + "id": "libvirt-46" } =20 { "execute": "query-command-line-options", - "id": "libvirt-46" + "id": "libvirt-47" } =20 { @@ -7032,12 +7048,12 @@ "option": "drive" } ], - "id": "libvirt-46" + "id": "libvirt-47" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-47" + "id": "libvirt-48" } =20 { @@ -7099,12 +7115,12 @@ "capability": "dirty-bitmaps" } ], - "id": "libvirt-47" + "id": "libvirt-48" } =20 { "execute": "query-qmp-schema", - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -18472,7 +18488,7 @@ "meta-type": "object" } ], - "id": "libvirt-48" + "id": "libvirt-49" } =20 { @@ -18483,7 +18499,7 @@ "name": "host" } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -18673,7 +18689,7 @@ } } }, - "id": "libvirt-49" + "id": "libvirt-50" } =20 { @@ -18865,7 +18881,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { @@ -19120,7 +19136,7 @@ } } }, - "id": "libvirt-50" + "id": "libvirt-51" } =20 { @@ -19134,7 +19150,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } =20 { @@ -19324,7 +19340,7 @@ } } }, - "id": "libvirt-51" + "id": "libvirt-52" } =20 { @@ -19516,7 +19532,7 @@ } } }, - "id": "libvirt-52" + "id": "libvirt-53" } =20 { @@ -19771,12 +19787,12 @@ } } }, - "id": "libvirt-52" + "id": "libvirt-53" } =20 { "execute": "query-sev-capabilities", - "id": "libvirt-53" + "id": "libvirt-54" } =20 { @@ -19786,7 +19802,7 @@ "cert-chain": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAA= ", "pdh": "AQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAAOAAAAQAAAAA= OAAA" }, - "id": "libvirt-52" + "id": "libvirt-54" } =20 { diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.12.0.x86_64.xml index 2167f06976..9c1f6c327c 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -213,7 +213,7 @@ 2011090 0 - 415959 + 416196 v2.12.0-rc0 x86_64 --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list