From patchwork Thu Feb 16 17:11:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 654067 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp86564wrc; Thu, 16 Feb 2023 09:15:41 -0800 (PST) X-Google-Smtp-Source: AK7set8qSCSsI7ejcKfPpZ7boQnMjI3viDmKvNi5LwbQzfoNuvDv1AqOVyFeBZo3nEyCmy4IMX7V X-Received: by 2002:a05:6214:242d:b0:56e:c0df:8492 with SMTP id gy13-20020a056214242d00b0056ec0df8492mr12946221qvb.31.1676567741044; Thu, 16 Feb 2023 09:15:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676567741; cv=none; d=google.com; s=arc-20160816; b=RyUAf1C3J99c7jpB98jfv4W1JfS14B334ioRsFFwW7JEla38JSFTBzKxxiCYuWIrsN doMCI5nWb6IggMCDdaW5zM3CGfczCezSaLdQUM38XVL1UDnYv7K+ERl6iqm/XlSOFMdg nrxZ8AleauFKLn4LylPsFggcubwjunwxO9ryID5iaP7jAx0z7lcsDSvHFyN62YfGZpgz qpQ/aV1R32P9e2cvvVL6hd1c/pOkpgAnru1F1geVdrIk6rxF1B/KzjXtOgHwAGsCGsWe mgMO92k0DVYmpGU+FKAEjiEIbaiXza4msTuz9dE0PWbEfOmkvKWoWsMDu3RxRTNgvma8 KSkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=MLAn5GKevaRJXltRfdrt51PNhBydmEzcr/VkvxtQ/eA=; b=WOhUznwP3Dz+OrOLFyDQ2MZaB+i+hcT2bk/DNFN7O0OdUT9elxoQfWjJ9Kd6B7SNbG 1uFoTmHxIN1/ZNLMvaCFcTT87rWFgWmRV9P2X1vIX4Frg4omj4SDuc/KOLJYrd1xsFQK 2LK6CSrxcwvNPDtiUAznhd6DY73qgQbM1A/2v10x7KES+1P04NI7Jvj5OW5PmMO/aPTN rypYB6HbBYeEVLAmNYoO5sWK+yHhUJ+Atv8oAgGiAtlXwitXxBBy3BG324FhSIaQ9Ry6 htXQIt9k8bR6AkuH2+0ak6Ur0Y64Qi0UY6jQJC4ivL6BEsJMK5KHP0BeaI6nxDcu7Rw8 yxCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RbrEQ+Am; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c132-20020ae9ed8a000000b0073b841d3303si1766448qkg.82.2023.02.16.09.15.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Feb 2023 09:15:41 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RbrEQ+Am; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pShnR-0000I7-Kg; Thu, 16 Feb 2023 12:11:49 -0500 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 1pShnO-0008U9-El for qemu-devel@nongnu.org; Thu, 16 Feb 2023 12:11:46 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pShnM-0007p5-Sq for qemu-devel@nongnu.org; Thu, 16 Feb 2023 12:11:46 -0500 Received: by mail-wr1-x42a.google.com with SMTP id y1so2553980wru.2 for ; Thu, 16 Feb 2023 09:11:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=MLAn5GKevaRJXltRfdrt51PNhBydmEzcr/VkvxtQ/eA=; b=RbrEQ+AmR7SOWcjt3q6cGXU5Z7Pq4+bSFkyVALOFsgqEMT899oug0Zvt4l4N4m8enI QEN+ZbqZTjzfyNB5/EKR13xXa5ZrhxtcBj92/SfLkCkN2Ebr4jtp4XWW0s+KRNZQrCPS u/izTODjm/9LlXqRApI5OPjsCoIS8po6DtxQwq2Ttb5kWx9LfQ44tzbeyddDfUz1z8lQ whE4Wvlz7TwlowZfwZaMa1FQwpISzCrVwuPvgRob9hOSlkyM7g962jbcQWPm1t4DwqHp r1XvU+FUTuufqaQVN2epBpy8m2aiiWSnhBd5A4b6I3sbGP6i1rMcx7Iua/0BJLLZNU9/ JBtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MLAn5GKevaRJXltRfdrt51PNhBydmEzcr/VkvxtQ/eA=; b=4c96x1x121hrcerMUSl/LlDlUvf/1EQBNB9P+JUATR4ksvx5sNHkryy4juPbn+rWZu W5Hu20CEqoXtmKVvOsPyQ3jJgM1hftwwA/oGNVrlyWQ7t3lWnIZyRPXBsImJzigLvZaO nBeeFJwJq+V+pJHyq76bLwXoKQMcri3rESIlvjgXipzlCpZq22LRiDkGH8qS8xNAdb/m bTqZDn1Dla6alpgsFxqjGcnjexihJUtZy8PPV+558EUrUjVFBwrPGhPKkvo12CbhPl4O J7bGS4wiHIhtFDhamPXybymemVi7E0m+D6vZUcaK20cayXpT+TupM7ohVeRppGdeJR2l ek9A== X-Gm-Message-State: AO0yUKWmr1yinFIPjc+Rak3x6Ny/B1/mov/yHdjhtBgrOEh2To18Z50k WGdb+UJTgRKSFntdD+nUcQUTBZypZeE+SqlC X-Received: by 2002:a5d:6a47:0:b0:2bd:d34e:5355 with SMTP id t7-20020a5d6a47000000b002bdd34e5355mr4936544wrw.20.1676567504211; Thu, 16 Feb 2023 09:11:44 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id f12-20020a5d4dcc000000b002c556a4f1casm2049107wru.42.2023.02.16.09.11.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 09:11:43 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 22/30] target/arm: wrap psci call with tcg_enabled Date: Thu, 16 Feb 2023 17:11:15 +0000 Message-Id: <20230216171123.2518285-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230216171123.2518285-1-peter.maydell@linaro.org> References: <20230216171123.2518285-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Claudio Fontana for "all" builds (tcg + kvm), we want to avoid doing the psci check if tcg is built-in, but not enabled. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Signed-off-by: Fabiano Rosas Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 509e674b0f0..2d38c3ed7aa 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -22,6 +22,7 @@ #include "hw/irq.h" #include "sysemu/cpu-timers.h" #include "sysemu/kvm.h" +#include "sysemu/tcg.h" #include "qapi/qapi-commands-machine-target.h" #include "qapi/error.h" #include "qemu/guest-random.h" @@ -11063,7 +11064,7 @@ void arm_cpu_do_interrupt(CPUState *cs) env->exception.syndrome); } - if (arm_is_psci_call(cpu, cs->exception_index)) { + if (tcg_enabled() && arm_is_psci_call(cpu, cs->exception_index)) { arm_handle_psci_call(cpu); qemu_log_mask(CPU_LOG_INT, "...handled as PSCI call\n"); return;