From nobody Fri Jun 14 13:21:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1687247348; cv=none; d=zohomail.com; s=zohoarc; b=F//YYhZrjpA/vYMKWHRoF3cR+JjFvvGpywnKiy5AzrscFWJMRiQk9j3l2nXJAqtyV8M9RwsKnEckN1Tsi2UmFHhX9Vyx5SpS8qGgh1JAi/BIYL9vw/P+csmmh2fTiVXjuE+B4u+zx0VW3iOQGETcu/yZ+N7AJ2i1oHpzXKEEbOs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1687247348; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=mtegtrCAOBu3HM7a0/agnCLxhf2Gi1yFIfWMg2j2DRs=; b=NI1qNmdiNz+sJhfqL+KVI2SHgLJkHR0Qw2ETgwfV/hQAAlHS/WUY6wlzGAzEhyGkFSiOPSjeM4PVpeAkAutLlSLaiE0/KsFnJ3Ef3K9Bs2TeEiqIw7xnmiBqsWF50erN4nvj8Btmc0bWU3NVEPQRnwykEA7LSzmRPPAbV2WDQPI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1687247348192223.90160823098063; Tue, 20 Jun 2023 00:49:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBW5z-0002hD-4T; Tue, 20 Jun 2023 03:48:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qBW5w-0002f4-Pg for qemu-devel@nongnu.org; Tue, 20 Jun 2023 03:48:09 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBW5v-0005Cy-8L for qemu-devel@nongnu.org; Tue, 20 Jun 2023 03:48:08 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-9889952ed18so321008066b.3 for ; Tue, 20 Jun 2023 00:48:06 -0700 (PDT) Received: from m1x-phil.lan ([176.176.183.29]) by smtp.gmail.com with ESMTPSA id f3-20020a170906390300b009893650453fsm450833eje.173.2023.06.20.00.48.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 20 Jun 2023 00:48:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687247285; x=1689839285; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=mtegtrCAOBu3HM7a0/agnCLxhf2Gi1yFIfWMg2j2DRs=; b=JCYdSS60GtEQN7R0wwEIknru/NLc0XwXzcox0JLAQB1Q+aizacm7zme96J888ruYdN K/b/+jfh5MHwjbhfmZ40MOkPqJGwlOmVtORpdIuFwUOVc93DfQAsI4gwgj7ws/NilLvb xIdulWFsueXION19vQuI6co786gLLlaFNpRaZCYgz8G8Bz7XCyUWEzv58i9+yOB66rzc KrQxmx3mv9jai3m+AMBYd7uIW13h7y/WCZBsYuU7SYa/QNdd8mR/Ymby37JnVTJPjzMA UBn9MAxuILqoSbIkq1Yo27yCgX91czitmcYDoTQxZXpm5VfxTNv5rjYY7LQTq41+F6Tl T13A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687247285; x=1689839285; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mtegtrCAOBu3HM7a0/agnCLxhf2Gi1yFIfWMg2j2DRs=; b=EuRGLnSHKaQJIWkDhEf0Nww2OAXW1stUxPf2ye14BBWigghx2uT8XJrAW6o99i9OGS vyqvDzVmwVr0reLmU7qzhawPZeCbb6gnEBv5jxafSD4t9+XFYm3c+DKw3LcUz0YWgKdt qCQhHDZfFnugsXnMzM/dkmTkjVUzHqrAFsdguJBXH0htlUjZLgBEHqkk1FFdmI++kMcs ripcXUExjWF6Ud1Q1+sk9sQrI+EBcjxBRFrUd/2uIiI57iv9RKk4uYohMo6MC4h7goVB Zoo5MWQQha1TXhpTSlXxxKk4JK4IFKqZzQk1ZLz9mRvI82GdXLQfiRcWcbfW1sVHXLZp SNtA== X-Gm-Message-State: AC+VfDxoRk9aOLCVhd9lBunlyC+8ny6cRt7izOAUvhRHn70Jwp9YAmAm s2U63EjG7Rb+awyuHd2C5A5KQCCneuhW0GYtCZ/Rlg== X-Google-Smtp-Source: ACHHUZ6oTNjoZYIxcTkvwqAqB2H0os/R2pFeg7VFSPe3Vsnc0okX+3HHOYGzJvbBv7PWaRy5fzyksQ== X-Received: by 2002:a17:906:4e8e:b0:97c:d2d1:3066 with SMTP id v14-20020a1709064e8e00b0097cd2d13066mr9543700eju.33.1687247284938; Tue, 20 Jun 2023 00:48:04 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Harsh Prateek Bora , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Daniel Henrique Barboza , David Gibson , Greg Kurz , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH] hw/ppc/spapr: Test whether TCG is enabled with tcg_enabled() Date: Tue, 20 Jun 2023 09:48:02 +0200 Message-Id: <20230620074802.86898-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=philmd@linaro.org; helo=mail-ej1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1687247349291100003 Although the PPC target only supports the TCG and KVM accelerators, QEMU supports more. We can no assume that '!kvm =3D=3D tcg', so test for the correct accelerator. This also eases code review, because here we don't care about KVM, we really want to test for TCG. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: David Gibson Reviewed-by: Greg Kurz Reviewed-by: Harsh Prateek Bora --- 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 dcb7f1c70a..c4b666587b 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2524,7 +2524,7 @@ static void spapr_set_vsmt_mode(SpaprMachineState *sp= apr, Error **errp) int ret; unsigned int smp_threads =3D ms->smp.threads; =20 - if (!kvm_enabled() && (smp_threads > 1)) { + if (tcg_enabled() && (smp_threads > 1)) { error_setg(errp, "TCG cannot support more than 1 thread/core " "on a pseries machine"); return; --=20 2.38.1