From nobody Tue Oct 28 01:56:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516156302682105.98213980191656; Tue, 16 Jan 2018 18:31:42 -0800 (PST) Received: from localhost ([::1]:55882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebdVt-0003hx-Sh for importer@patchew.org; Tue, 16 Jan 2018 21:31:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45563) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebdQJ-0007rK-B5 for qemu-devel@nongnu.org; Tue, 16 Jan 2018 21:25:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebdQI-0001JC-3k for qemu-devel@nongnu.org; Tue, 16 Jan 2018 21:25:55 -0500 Received: from ozlabs.org ([103.22.144.67]:49587) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebdQH-0001HD-OO; Tue, 16 Jan 2018 21:25:54 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3zLrY55w0bz9sR8; Wed, 17 Jan 2018 13:25:45 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1516155945; bh=q3/GpQ4wNBpNLwjxmtIxIqeiUmGQLvKntcmK816fe28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N3u0cW3+W5C0LnjPfdAIDlMLxCcIrLUs8q3QILCOnvQSBZa9IuTixdujF+9xy7ZHl QmAz6II8JOas4WsYIxc6PYk/+FpHy5NjfXoZW54KAwjqMgfuDoaczuEyGSxAOVFYhp iI4nOtBvGPRGM2FkAAPG0kWkKVu16hlzTur+AKKE= From: David Gibson To: peter.maydell@linaro.org Date: Wed, 17 Jan 2018 13:25:13 +1100 Message-Id: <20180117022525.31767-11-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180117022525.31767-1-david@gibson.dropbear.id.au> References: <20180117022525.31767-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 10/22] ppc: Change Power9 compat table to support at most 8 threads/core X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, surajjs@au1.ibm.com, joserz@linux.vnet.ibm.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Jose Ricardo Ziviani Increases the max smt mode to 8 for Power9. That's because KVM supports smt emulation in this platform so QEMU should allow users to use it as well. Today if we try to pass -smp ...,threads=3D8, QEMU will silently truncate it to smt4 mode and may cause a crash if we try to perform a cpu hotplug. Signed-off-by: Jose Ricardo Ziviani [dwg: Added an explanatory comment] Signed-off-by: David Gibson --- target/ppc/compat.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/target/ppc/compat.c b/target/ppc/compat.c index ad8f93c064..276b5b52c2 100644 --- a/target/ppc/compat.c +++ b/target/ppc/compat.c @@ -73,7 +73,14 @@ static const CompatInfo compat_table[] =3D { .pvr =3D CPU_POWERPC_LOGICAL_3_00, .pcr =3D PCR_COMPAT_3_00, .pcr_level =3D PCR_COMPAT_3_00, - .max_threads =3D 4, + /* + * POWER9 hardware only supports 4 threads / core, but this + * limit is for guests. We need to support 8 vthreads/vcore + * on POWER9 for POWER8 compatibility guests, and it's very + * confusing if half of the threads disappear from the guest + * if it announces it's POWER9 aware at CAS time. + */ + .max_threads =3D 8, }, }; =20 --=20 2.14.3