qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: qemu-ppc@nongnu.org
Cc: "Nicholas Piggin" <npiggin@gmail.com>,
	qemu-devel@nongnu.org,
	"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Cédric Le Goater" <clg@kaod.org>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Greg Kurz" <groug@kaod.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH v2 4/7] hw/ppc/spapr: Test whether TCG is enabled with tcg_enabled()
Date: Thu, 22 Jun 2023 19:33:54 +1000	[thread overview]
Message-ID: <20230622093357.255649-5-npiggin@gmail.com> (raw)
In-Reply-To: <20230622093357.255649-1-npiggin@gmail.com>

From: Philippe Mathieu-Daudé <philmd@linaro.org>

Although the PPC target only supports the TCG and KVM
accelerators, QEMU supports more. We can not assume that
'!kvm == 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.

Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
[np: Fix changelog typo noticed by Zoltan]
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 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 e55905a1f0..8e7d497f25 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2525,7 +2525,7 @@ static void spapr_set_vsmt_mode(SpaprMachineState *spapr, Error **errp)
     int ret;
     unsigned int smp_threads = ms->smp.threads;
 
-    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;
-- 
2.40.1



  parent reply	other threads:[~2023-06-22  9:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22  9:33 [PATCH v2 0/7] target/ppc: TCG SMT support for spapr machine Nicholas Piggin
2023-06-22  9:33 ` [PATCH v2 1/7] target/ppc: Add initial flags and helpers for SMT support Nicholas Piggin
2023-06-22 17:33   ` Cédric Le Goater
2023-06-22  9:33 ` [PATCH v2 2/7] target/ppc: Add support for SMT CTRL register Nicholas Piggin
2023-06-22 17:32   ` Cédric Le Goater
2023-06-22  9:33 ` [PATCH v2 3/7] target/ppc: Add msgsnd/p and DPDES SMT support Nicholas Piggin
2023-06-22 17:33   ` Cédric Le Goater
2023-06-22  9:33 ` Nicholas Piggin [this message]
2023-06-22  9:33 ` [PATCH v2 5/7] spapr: TCG allow up to 8-thread SMT on POWER8 and newer CPUs Nicholas Piggin
2023-06-22 10:06   ` Cédric Le Goater
2023-06-22 10:49     ` Cédric Le Goater
2023-06-23  6:32       ` Cédric Le Goater
2023-06-22  9:33 ` [PATCH v2 6/7] tests/avocado: boot ppc64 pseries to Linux VFS mount Nicholas Piggin
2023-06-22 17:33   ` Cédric Le Goater
2023-06-22  9:33 ` [PATCH v2 7/7] tests/avocado: Add ppc64 pseries multiprocessor boot tests Nicholas Piggin
2023-06-22 17:33   ` Cédric Le Goater
2023-06-23  9:33 ` [PATCH v2 0/7] target/ppc: TCG SMT support for spapr machine Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230622093357.255649-5-npiggin@gmail.com \
    --to=npiggin@gmail.com \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=harshpb@linux.ibm.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).