From nobody Thu May 2 14:04:14 2024 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; 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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1518164435548778.9620156186126; Fri, 9 Feb 2018 00:20:35 -0800 (PST) Received: from localhost ([::1]:46817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ek3uz-0000sd-C5 for importer@patchew.org; Fri, 09 Feb 2018 03:20:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ek3tq-0000F4-L1 for qemu-devel@nongnu.org; Fri, 09 Feb 2018 03:19:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ek3tn-000560-Gs for qemu-devel@nongnu.org; Fri, 09 Feb 2018 03:19:14 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50864 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ek3tn-00055T-BF; Fri, 09 Feb 2018 03:19:11 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8BA104040073; Fri, 9 Feb 2018 08:19:06 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-204-80.brq.redhat.com [10.40.204.80]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6E16E10083B5; Fri, 9 Feb 2018 08:18:59 +0000 (UTC) From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 9 Feb 2018 09:18:58 +0100 Message-Id: <20180209081858.27013-1-lvivier@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 09 Feb 2018 08:19:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 09 Feb 2018 08:19:06 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lvivier@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3] spapr: set vsmt to MAX(8, smp_threads) 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: qemu-ppc@nongnu.org, Greg Kurz , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We ignore silently the value of smp_threads when we set the default VSMT value, and if smp_threads is greater than VSMT kernel is going into trouble later. Fixes: 8904e5a750 ("spapr: Adjust default VSMT value for better migration compatibility") Signed-off-by: Laurent Vivier Reviewed-by: Greg Kurz --- Notes: v3: use MAX(8, smp_threads) and let KVM to return an error if nb_threads is too big update subject to reflect the change =20 v2: display a specific error message when the default VSMT is used fix subject hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 32a876be56..c8a1eefa17 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2310,7 +2310,7 @@ static void spapr_set_vsmt_mode(sPAPRMachineState *sp= apr, Error **errp) * the value that we'd get with KVM on POWER8, the * overwhelmingly common case in production systems. */ - spapr->vsmt =3D 8; + spapr->vsmt =3D MAX(8, smp_threads); } =20 /* KVM: If necessary, set the SMT mode: */ --=20 2.14.3