From nobody Mon Feb 9 12:42:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1529946756328714.056919960893; Mon, 25 Jun 2018 10:12:36 -0700 (PDT) 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 96E5CC057F84; Mon, 25 Jun 2018 17:12: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 546018BE59; Mon, 25 Jun 2018 17:12: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 02A4A4A46D; Mon, 25 Jun 2018 17:12:34 +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 w5PHC9ag030620 for ; Mon, 25 Jun 2018 13:12:09 -0400 Received: by smtp.corp.redhat.com (Postfix) id BAC9821565E1; Mon, 25 Jun 2018 17:12:09 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5DD522166B5D for ; Mon, 25 Jun 2018 17:12:09 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 25 Jun 2018 19:12:00 +0200 Message-Id: <20180625171201.21827-7-abologna@redhat.com> In-Reply-To: <20180625171201.21827-1-abologna@redhat.com> References: <20180625171201.21827-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/7] qemu: Format HPT maxpagesize on the command line 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.32]); Mon, 25 Jun 2018 17:12:35 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This makes the feature fully functional. https://bugzilla.redhat.com/show_bug.cgi?id=3D1571078 Signed-off-by: Andrea Bolognani --- src/qemu/qemu_command.c | 12 ++++++++++++ tests/qemuxml2argvdata/pseries-features.args | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5cd6d44a88..748b596f63 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7265,6 +7265,18 @@ qemuBuildMachineCommandLine(virCommandPtr cmd, =20 virBufferAsprintf(&buf, ",resize-hpt=3D%s", str); } + + if (def->hpt_maxpagesize > 0) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_CAP_HP= T_MAX_PAGE_SIZE)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("Configuring the page size for HPT guests= " + "is not supported by this QEMU binary")); + goto cleanup; + } + + virBufferAsprintf(&buf, ",cap-hpt-max-page-size=3D%lluk", + def->hpt_maxpagesize); + } } =20 if (cpu && cpu->model && diff --git a/tests/qemuxml2argvdata/pseries-features.args b/tests/qemuxml2a= rgvdata/pseries-features.args index f5c1959cca..12c14715c6 100644 --- a/tests/qemuxml2argvdata/pseries-features.args +++ b/tests/qemuxml2argvdata/pseries-features.args @@ -7,7 +7,8 @@ QEMU_AUDIO_DRV=3Dnone \ /usr/bin/qemu-system-ppc64 \ -name guest \ -S \ --machine pseries,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff,resize-hpt=3D= required \ +-machine pseries,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff,resize-hpt=3D= required,\ +cap-hpt-max-page-size=3D1048576k \ -m 512 \ -smp 1,sockets=3D1,cores=3D1,threads=3D1 \ -uuid 1ccfd97d-5eb4-478a-bbe6-88d254c16db7 \ --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list