From nobody Sat May 4 03:25:55 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1509984539652983.2689239909911; Mon, 6 Nov 2017 08:08:59 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id D743F4205F; Mon, 6 Nov 2017 16:08:57 +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 B72C1190C3; Mon, 6 Nov 2017 16:08:57 +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 823AD3FCFD; Mon, 6 Nov 2017 16:08:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA6G8l1w026675 for ; Mon, 6 Nov 2017 11:08:47 -0500 Received: by smtp.corp.redhat.com (Postfix) id ED5E54C48B; Mon, 6 Nov 2017 16:08:47 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.219]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4E7384C48A for ; Mon, 6 Nov 2017 16:08:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D743F4205F Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 6 Nov 2017 17:08:36 +0100 Message-Id: <20171106160839.29403-2-abologna@redhat.com> In-Reply-To: <20171106160839.29403-1-abologna@redhat.com> References: <20171106160839.29403-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/4] qemu: Enable configuration of HPT resizing for pSeries guests 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 06 Nov 2017 16:08:58 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Most of the time it's okay to leave this up to negotiation between the guest and the host, but in some situations it can be useful to manually decide the behavior, especially to enforce its availability. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1308743 Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- docs/schemas/domaincommon.rng | 15 ++++++++ src/conf/domain_conf.c | 46 ++++++++++++++++++++= +++- src/conf/domain_conf.h | 12 +++++++ src/libvirt_private.syms | 1 + src/qemu/qemu_capabilities.c | 8 +++++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 20 +++++++++++ src/qemu/qemu_domain.c | 8 +++++ tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml | 1 + 9 files changed, 111 insertions(+), 1 deletion(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 9cec1a063..82fdfd5f7 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4736,6 +4736,9 @@ + + + @@ -4924,6 +4927,18 @@ =20 + + + + + enabled + disabled + required + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 400e90032..0c0819fe5 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -148,7 +148,9 @@ VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST, "vmport", "gic", "smm", - "ioapic") + "ioapic", + "hpt", +); =20 VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, VIR_DOMAIN_CAPABILITIES_POLICY_= LAST, "default", @@ -882,6 +884,13 @@ VIR_ENUM_IMPL(virDomainIOAPIC, "qemu", "kvm") =20 +VIR_ENUM_IMPL(virDomainHPTResizing, + VIR_DOMAIN_HPT_RESIZING_LAST, + "enabled", + "disabled", + "required", +); + /* Internal mapping: subset of block job types that can be present in * XML (remaining types are not two-phase). */ VIR_ENUM_DECL(virDomainBlockJob) @@ -18776,6 +18785,22 @@ virDomainDefParseXML(xmlDocPtr xml, } break; =20 + case VIR_DOMAIN_FEATURE_HPT: + tmp =3D virXMLPropString(nodes[i], "resizing"); + if (tmp) { + int value =3D virDomainHPTResizingTypeFromString(tmp); + if (value < 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("Unknown HPT resizing setting: %s"), + tmp); + goto error; + } + def->hpt_resizing =3D value; + def->features[val] =3D VIR_TRISTATE_SWITCH_ON; + VIR_FREE(tmp); + } + break; + /* coverity[dead_error_begin] */ case VIR_DOMAIN_FEATURE_LAST: break; @@ -20966,6 +20991,18 @@ virDomainDefFeaturesCheckABIStability(virDomainDef= Ptr src, return false; } =20 + /* HPT resizing */ + if (src->features[VIR_DOMAIN_FEATURE_HPT] =3D=3D VIR_TRISTATE_SWITCH_O= N) { + if (src->hpt_resizing !=3D dst->hpt_resizing) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("HPT resizing configuration differs: " + "source: '%s', destination: '%s'"), + virDomainHPTResizingTypeToString(src->hpt_resiz= ing), + virDomainHPTResizingTypeToString(dst->hpt_resiz= ing)); + return false; + } + } + return true; } =20 @@ -26215,6 +26252,13 @@ virDomainDefFormatInternal(virDomainDefPtr def, } break; =20 + case VIR_DOMAIN_FEATURE_HPT: + if (def->features[i] =3D=3D VIR_TRISTATE_SWITCH_ON) { + virBufferAsprintf(buf, "\n", + virDomainHPTResizingTypeToString(def= ->hpt_resizing)); + } + break; + /* coverity[dead_error_begin] */ case VIR_DOMAIN_FEATURE_LAST: break; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index be38792c6..c661bc0c2 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1723,6 +1723,7 @@ typedef enum { VIR_DOMAIN_FEATURE_GIC, VIR_DOMAIN_FEATURE_SMM, VIR_DOMAIN_FEATURE_IOAPIC, + VIR_DOMAIN_FEATURE_HPT, =20 VIR_DOMAIN_FEATURE_LAST } virDomainFeature; @@ -1851,6 +1852,16 @@ typedef enum { =20 VIR_ENUM_DECL(virDomainIOAPIC); =20 +typedef enum { + VIR_DOMAIN_HPT_RESIZING_ENABLED =3D 0, + VIR_DOMAIN_HPT_RESIZING_DISABLED, + VIR_DOMAIN_HPT_RESIZING_REQUIRED, + + VIR_DOMAIN_HPT_RESIZING_LAST +} virDomainHPTResizing; + +VIR_ENUM_DECL(virDomainHPTResizing); + /* Operating system configuration data & machine / arch */ typedef struct _virDomainOSEnv virDomainOSEnv; typedef virDomainOSEnv *virDomainOSEnvPtr; @@ -2323,6 +2334,7 @@ struct _virDomainDef { virGICVersion gic_version; char *hyperv_vendor_id; virDomainIOAPIC ioapic; + virDomainHPTResizing hpt_resizing; =20 /* These options are of type virTristateSwitch: ON =3D keep, OFF =3D d= rop */ int caps_features[VIR_DOMAIN_CAPS_FEATURE_LAST]; diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 36cd5b55b..aa3b94720 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -386,6 +386,7 @@ virDomainHostdevModeTypeToString; virDomainHostdevRemove; virDomainHostdevSubsysPCIBackendTypeToString; virDomainHostdevSubsysTypeToString; +virDomainHPTResizingTypeToString; virDomainHubTypeFromString; virDomainHubTypeToString; virDomainHypervTypeFromString; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 7cb091056..1badadbc2 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -443,6 +443,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, /* 270 */ "vxhs", "virtio-blk.num-queues", + "machine.pseries.resize-hpt", ); =20 =20 @@ -4776,6 +4777,13 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, if (qemuCaps->version >=3D 2006000) virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_KERNEL_IRQCHIP_SPLIT); =20 + /* HPT resizing is supported since QEMU 2.10 on ppc64; unfortunately + * there's no sane way to probe for it */ + if (qemuCaps->version >=3D 2010000 && + ARCH_IS_PPC64(qemuCaps->arch)) { + virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT); + } + if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0) goto cleanup; =20 diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index cacc2b77e..f0e2e9016 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -429,6 +429,7 @@ typedef enum { /* 270 */ QEMU_CAPS_VXHS, /* -drive file.driver=3Dvxhs via query-qmp-schema */ QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES, /* virtio-blk-*.num-queues */ + QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT, /* -machine pseries,resize-hpt */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8708b79ed..e8868a34a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7526,6 +7526,26 @@ qemuBuildMachineCommandLine(virCommandPtr cmd, } } =20 + if (def->features[VIR_DOMAIN_FEATURE_HPT] =3D=3D VIR_TRISTATE_SWIT= CH_ON) { + const char *str; + + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_RESIZE= _HPT)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("HTP resizing is not supported by this " + "QEMU binary")); + goto cleanup; + } + + str =3D virDomainHPTResizingTypeToString(def->hpt_resizing); + if (!str) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Invalid setting for HPT resizing")); + goto cleanup; + } + + virBufferAsprintf(&buf, ",resize-hpt=3D%s", str); + } + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BOOTINDEX) && virQEMUCapsGet(qemuCaps, QEMU_CAPS_LOADPARM)) qemuAppendLoadparmMachineParm(&buf, def); diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b248a3ddc..60e6da327 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3142,6 +3142,14 @@ qemuDomainDefVerifyFeatures(const virDomainDef *def) return -1; } =20 + if (def->features[VIR_DOMAIN_FEATURE_HPT] =3D=3D VIR_TRISTATE_SWITCH_O= N && + !qemuDomainIsPSeries(def)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + "%s", + _("HPT tuning is only supported for pSeries guests"= )); + return -1; + } + return 0; } =20 diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml b/tests/qemuc= apabilitiesdata/caps_2.10.0.ppc64.xml index 0dfa20726..b0ee3f152 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml @@ -177,6 +177,7 @@ + 2010000 0 (v2.10.0) --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 03:25:55 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1509984533096650.5548486247981; Mon, 6 Nov 2017 08:08:53 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id 1E0D680C1A; Mon, 6 Nov 2017 16:08:51 +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 BEA45512F3; Mon, 6 Nov 2017 16:08:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 726024BB79; Mon, 6 Nov 2017 16:08:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA6G8nt6026682 for ; Mon, 6 Nov 2017 11:08:49 -0500 Received: by smtp.corp.redhat.com (Postfix) id 012AF4C48A; Mon, 6 Nov 2017 16:08:49 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.219]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 55DD55C8BA for ; Mon, 6 Nov 2017 16:08:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1E0D680C1A Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 6 Nov 2017 17:08:37 +0100 Message-Id: <20171106160839.29403-3-abologna@redhat.com> In-Reply-To: <20171106160839.29403-1-abologna@redhat.com> References: <20171106160839.29403-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/4] tests: Add tests for configuration of HPT resizing 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 06 Nov 2017 16:08:51 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- ...qemuxml2argv-pseries-hpt-resizing-disabled.args | 20 ++++++++++++++++ .../qemuxml2argv-pseries-hpt-resizing-disabled.xml | 19 +++++++++++++++ .../qemuxml2argv-pseries-hpt-resizing-enabled.args | 20 ++++++++++++++++ .../qemuxml2argv-pseries-hpt-resizing-enabled.xml | 19 +++++++++++++++ ...l2argv-pseries-hpt-resizing-invalid-machine.xml | 18 ++++++++++++++ ...qemuxml2argv-pseries-hpt-resizing-required.args | 20 ++++++++++++++++ .../qemuxml2argv-pseries-hpt-resizing-required.xml | 19 +++++++++++++++ tests/qemuxml2argvtest.c | 20 ++++++++++++++++ ...emuxml2xmlout-pseries-hpt-resizing-disabled.xml | 28 ++++++++++++++++++= ++++ ...qemuxml2xmlout-pseries-hpt-resizing-enabled.xml | 28 ++++++++++++++++++= ++++ ...emuxml2xmlout-pseries-hpt-resizing-required.xml | 28 ++++++++++++++++++= ++++ tests/qemuxml2xmltest.c | 13 ++++++++++ 12 files changed, 252 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizin= g-disabled.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizin= g-disabled.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizin= g-enabled.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizin= g-enabled.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizin= g-invalid-machine.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizin= g-required.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizin= g-required.xml create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hpt-res= izing-disabled.xml create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hpt-res= izing-enabled.xml create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hpt-res= izing-required.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-disab= led.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-disable= d.args new file mode 100644 index 000000000..795d7cb60 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-disabled.args @@ -0,0 +1,20 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-ppc64 \ +-name guest \ +-S \ +-machine pseries,accel=3Dtcg,resize-hpt=3Ddisabled \ +-m 512 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-nographic \ +-nodefconfig \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-guest/monitor.s= ock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ +-boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-disab= led.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-disabled= .xml new file mode 100644 index 000000000..4429f55ec --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-disabled.xml @@ -0,0 +1,19 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 524288 + 1 + + hvm + + + + + + + /usr/bin/qemu-system-ppc64 + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-enabl= ed.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-enabled.= args new file mode 100644 index 000000000..56b860cf0 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-enabled.args @@ -0,0 +1,20 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-ppc64 \ +-name guest \ +-S \ +-machine pseries,accel=3Dtcg,resize-hpt=3Denabled \ +-m 512 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-nographic \ +-nodefconfig \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-guest/monitor.s= ock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ +-boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-enabl= ed.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-enabled.x= ml new file mode 100644 index 000000000..2ac2ae4b2 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-enabled.xml @@ -0,0 +1,19 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 524288 + 1 + + hvm + + + + + + + /usr/bin/qemu-system-ppc64 + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-inval= id-machine.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-i= nvalid-machine.xml new file mode 100644 index 000000000..757fcc70e --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-invalid-mach= ine.xml @@ -0,0 +1,18 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 524288 + 1 + + hvm + + + + + + + /usr/bin/qemu-system-x86_64 + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-requi= red.args b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-require= d.args new file mode 100644 index 000000000..994789a5e --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-required.args @@ -0,0 +1,20 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-ppc64 \ +-name guest \ +-S \ +-machine pseries,accel=3Dtcg,resize-hpt=3Drequired \ +-m 512 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ +-nographic \ +-nodefconfig \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-guest/monitor.s= ock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ +-boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-requi= red.xml b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-required= .xml new file mode 100644 index 000000000..f9dc9cac9 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pseries-hpt-resizing-required.xml @@ -0,0 +1,19 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 524288 + 1 + + hvm + + + + + + + /usr/bin/qemu-system-ppc64 + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 2e07b85aa..cb15b5229 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1848,6 +1848,26 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VFIO_PCI); =20 + DO_TEST("pseries-hpt-resizing-enabled", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_MACHINE_OPT, + QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT); + DO_TEST("pseries-hpt-resizing-disabled", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_MACHINE_OPT, + QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT); + DO_TEST("pseries-hpt-resizing-required", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_MACHINE_OPT, + QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT); + DO_TEST_FAILURE("pseries-hpt-resizing-enabled", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_MACHINE_OPT); + DO_TEST_PARSE_ERROR("pseries-hpt-resizing-invalid-machine", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_MACHINE_OPT, + QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT); + DO_TEST("disk-ide-drive-split", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_IDE_CD); diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hpt-resizing-d= isabled.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hpt-resizing-= disabled.xml new file mode 100644 index 000000000..80cd73555 --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hpt-resizing-disabled= .xml @@ -0,0 +1,28 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 524288 + 524288 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + + + + + + + + + diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hpt-resizing-e= nabled.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hpt-resizing-e= nabled.xml new file mode 100644 index 000000000..cb46fadcf --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hpt-resizing-enabled.= xml @@ -0,0 +1,28 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 524288 + 524288 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + + + + + + + + + diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hpt-resizing-r= equired.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hpt-resizing-= required.xml new file mode 100644 index 000000000..5dd0dbd0b --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pseries-hpt-resizing-required= .xml @@ -0,0 +1,28 @@ + + guest + 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 + 524288 + 524288 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + + + + + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 5a282e5ff..0f8527aab 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -761,6 +761,19 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_DEVICE_VFIO_PCI); =20 + DO_TEST("pseries-hpt-resizing-enabled", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_MACHINE_OPT, + QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT); + DO_TEST("pseries-hpt-resizing-disabled", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_MACHINE_OPT, + QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT); + DO_TEST("pseries-hpt-resizing-required", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_MACHINE_OPT, + QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT); + DO_TEST("balloon-device-auto", NONE); DO_TEST("balloon-device-period", NONE); DO_TEST("channel-virtio-auto", NONE); --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 03:25:55 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1509984540045609.5869723233353; Mon, 6 Nov 2017 08:09:00 -0800 (PST) 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 mx1.redhat.com (Postfix) with ESMTPS id 5E55E90C77; Mon, 6 Nov 2017 16:08:58 +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 38EEB190D7; Mon, 6 Nov 2017 16:08:58 +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 EFB621800BDD; Mon, 6 Nov 2017 16:08:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA6G8nfh026715 for ; Mon, 6 Nov 2017 11:08:49 -0500 Received: by smtp.corp.redhat.com (Postfix) id C8C414C48A; Mon, 6 Nov 2017 16:08:49 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.219]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4F7925C8BA for ; Mon, 6 Nov 2017 16:08:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5E55E90C77 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 6 Nov 2017 17:08:38 +0100 Message-Id: <20171106160839.29403-4-abologna@redhat.com> In-Reply-To: <20171106160839.29403-1-abologna@redhat.com> References: <20171106160839.29403-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/4] docs: Document configuration of HPT resizing 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 06 Nov 2017 16:08:58 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- docs/formatdomain.html.in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 92e14a919..0ca693092 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -1709,7 +1709,7 @@ <pvspinlock state=3D'on'/> <gic version=3D'2'/> <ioapic driver=3D'qemu'/> - + <hpt resizing=3D'required'/> </features> ... =20 @@ -1878,6 +1878,17 @@ which is also known as a split I/O APIC mode. Since 3.4.0 (QEMU/KVM only) +
hpt
+
Configure the HPT (Hash Page Table) of a pSeries guest. Possible + values for the resizing attribute are + enabled, which causes HPT resizing to be enabled if + both the guest and the host support it; disabled, w= hich + causes HPT resizing to be disabled regardless of guest and host + support; and required, which prevents the guest from + starting unless both the guest and the host support HPT resizing= . If + the attribute is not defined, the hypervisor default will be use= d. + Since 3.10.0 (QEMU/KVM only) +
=20

Time keeping

--=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 03:25:55 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1509984543179292.1150473900375; Mon, 6 Nov 2017 08:09:03 -0800 (PST) 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 ADDA86A7CD; Mon, 6 Nov 2017 16:09:01 +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 EFE0660C8D; Mon, 6 Nov 2017 16:09:00 +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 B66AB1800BDE; Mon, 6 Nov 2017 16:09:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA6G8q0Y026748 for ; Mon, 6 Nov 2017 11:08:52 -0500 Received: by smtp.corp.redhat.com (Postfix) id E41EC5E1B8; Mon, 6 Nov 2017 16:08:52 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.219]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6665E5E1B7 for ; Mon, 6 Nov 2017 16:08:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com ADDA86A7CD Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 6 Nov 2017 17:08:39 +0100 Message-Id: <20171106160839.29403-5-abologna@redhat.com> In-Reply-To: <20171106160839.29403-1-abologna@redhat.com> References: <20171106160839.29403-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/4] news: Update for configuration of HPT resizing 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.27]); Mon, 06 Nov 2017 16:09:02 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- docs/news.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index ef855d895..9fbc61f0c 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -35,6 +35,16 @@
+ + + qemu: Add the ability to configure HPT resizing for pSeries gues= ts + + + The user can now decide whether HPT (Hash Page Table) resizing + should be enabled, disabled or required instead of leaving it up= to + hypervisor defaults and negotiation between the guest and the ho= st. + +
--=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list