qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/ppc/spapr: Test whether TCG is enabled with tcg_enabled()


From: Harsh Prateek Bora
Subject: Re: [PATCH] hw/ppc/spapr: Test whether TCG is enabled with tcg_enabled()
Date: Tue, 20 Jun 2023 13:29:11 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0



On 6/20/23 13:18, Philippe Mathieu-Daudé wrote:
Although the PPC target only supports the TCG and KVM
accelerators, QEMU supports more. We can no 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.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  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 *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");

Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>

          return;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]