From nobody Tue Feb 10 03:38:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1622826416; cv=none; d=zohomail.com; s=zohoarc; b=MiXpXPfHLrPiPy0rl0zPFNa1EXRaQBR/RLPqCAHMgJP+okYFMFt6aCKypvooYQ8FWfLx+YbwM/mVbP8nZh2o3XfGUSFLCIOcleoLzvbLrx5/GAYC4KiyhqUkelEQanmH2TH4Oas318DBTh4Kg1Kq7oBBw6SQxZrAWefZsYjjCQc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622826416; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wznjsiz23B2i+j4Jb69yS0BiQR4HsYX/WkLwF6wNHTg=; b=T9Oqx5Pi0jJCpHRQifGlJOACWC5/kjP/2/eSaJY6DfgMykW3QAZ10eIzQybvQB0EZdEZ5lHt9BGdgUnF3m4KDvNCZHdiSqaBJVZD3MKMD9YI6ZsHUvsoqviGPqv66Qsho9GGx5Ymsn/r6rmQ38F/Z1Yo8ueBeXmk0aO+HYLryg4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1622826416839892.4943250126278; Fri, 4 Jun 2021 10:06:56 -0700 (PDT) Received: from localhost ([::1]:59018 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpDHb-0000rJ-9X for importer@patchew.org; Fri, 04 Jun 2021 13:06:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpCkU-0007tH-Aj for qemu-devel@nongnu.org; Fri, 04 Jun 2021 12:32:42 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:39910) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpCkS-00025T-DP for qemu-devel@nongnu.org; Fri, 04 Jun 2021 12:32:42 -0400 Received: by mail-wr1-x433.google.com with SMTP id l2so9930108wrw.6 for ; Fri, 04 Jun 2021 09:32:39 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a77sm7630225wmd.14.2021.06.04.09.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 09:32:37 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4A9B41FFCC; Fri, 4 Jun 2021 16:53:19 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wznjsiz23B2i+j4Jb69yS0BiQR4HsYX/WkLwF6wNHTg=; b=X/drSWWOPGk5OgiTbAmO0AX/ImlgJgeiLiTuEI3GrTYxtsWCa/KhrhFcfqHuaGiULC FnJonLSWN+vIAfDYQV1TO71GTAvpagvy2GVS2n+KSw8xqZ/JmCFsvvsm9K4NqRImxeGq ZVKtjfMiYVSXdplnNicjULyqQHKCEjPrAmbpV6IfYEtvb8783qy/MUUO/WAjlm1TxXw9 UbYL9zrI/fBeQs/VFQwuRrma9csH6q+tlCxl6d1jqHrwHpgDEIYJkI+PodB7xkPEl/6L upnvd1cJl64bdrqS+LEQ4ZS35SzlQs8ox7sI8BI/eldQOgXS2Kj0OKE+sVNfBdmwLx8t 5cUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wznjsiz23B2i+j4Jb69yS0BiQR4HsYX/WkLwF6wNHTg=; b=KinOLTZwtxBEojrEzHSsACTSYRfTx1nK2B4APWfUXkB/ApcWl0sX+OFhqnm3/IhFCZ GmfDbq5cA3mtyecDWBLBYNVuoJjMfLAkvbMiAbpnrttVr+9L9Jtv0fzFT86DVUy09i08 Ef+IRXmHrjrI69r4Ep2PY9CWGo3+yp3M1ugRdrD74TPNhclMWYkenhTeWnLhUUZkBCxp fGGXTrs60ZZ2hzwZ/FPWytxriIfSpLmDUKs8Uqwc2enAE3zcnnlpsmPvMjmBEBUVfwA1 Mq4hxuhTkfEslV6ZsDfzQgzt/IAKUyh227NxKyNctUJC28qRvMiqMmlRqmzs/e0Ovn/c jyUQ== X-Gm-Message-State: AOAM533jja/QIXnM2lfPgUj9RqY7i3vyDRBE92D4/R54WDsaFQA3cgI9 qGviOayNMhlioYrdW/4y13cLsQ== X-Google-Smtp-Source: ABdhPJyf4YrHSwNuI6nmyErgckfo7XyTL62AryAaML8Yp0U9dt439tUai+DM77ySCNBksXzkBMy7EA== X-Received: by 2002:adf:df86:: with SMTP id z6mr4798136wrl.255.1622824359086; Fri, 04 Jun 2021 09:32:39 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v16 53/99] target/arm: replace CONFIG_TCG with tcg_enabled Date: Fri, 4 Jun 2021 16:52:26 +0100 Message-Id: <20210604155312.15902-54-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210604155312.15902-1-alex.bennee@linaro.org> References: <20210604155312.15902-1-alex.bennee@linaro.org> 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::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-arm@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Claudio Fontana Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Claudio Fontana for "all" builds (tcg + kvm), we want to avoid doing the psci and semihosting checks if tcg is built-in, but not enabled. Signed-off-by: Claudio Fontana Signed-off-by: Alex Benn=C3=A9e --- target/arm/cpu-sysemu.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/target/arm/cpu-sysemu.c b/target/arm/cpu-sysemu.c index 7569241339..e83d55b9f7 100644 --- a/target/arm/cpu-sysemu.c +++ b/target/arm/cpu-sysemu.c @@ -1141,22 +1141,22 @@ void arm_cpu_do_interrupt(CPUState *cs) env->exception.syndrome); } =20 -#ifdef CONFIG_TCG - if (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; - } - /* - * Semihosting semantics depend on the register width of the code - * that caused the exception, not the target exception level, so - * must be handled here. - */ - if (cs->exception_index =3D=3D EXCP_SEMIHOST) { - tcg_handle_semihosting(cs); - return; + if (tcg_enabled()) { + if (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; + } + /* + * Semihosting semantics depend on the register width of the code + * that caused the exception, not the target exception level, so + * must be handled here. + */ + if (cs->exception_index =3D=3D EXCP_SEMIHOST) { + tcg_handle_semihosting(cs); + return; + } } -#endif /* CONFIG_TCG */ /* * Hooks may change global state so BQL should be held, also the * BQL needs to be held for any modification of --=20 2.20.1