From patchwork Thu Feb 16 17:11:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 654056 Delivered-To: patch@linaro.org Received: by 2002:adf:9bcd:0:0:0:0:0 with SMTP id e13csp85875wrc; Thu, 16 Feb 2023 09:14:19 -0800 (PST) X-Google-Smtp-Source: AK7set+ZZzL8VQONWsU+pJ9YYlS3BzEqPnnutPcQiwcRlmE74GNUAliafSernzI4olCD/Cqza8a2 X-Received: by 2002:a05:622a:412:b0:3b8:525f:f0a7 with SMTP id n18-20020a05622a041200b003b8525ff0a7mr10286583qtx.56.1676567658942; Thu, 16 Feb 2023 09:14:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676567658; cv=none; d=google.com; s=arc-20160816; b=GaVVxYrx2ZMHOO40FPUyTHD1rLvWSwFrbXQRbkTL5FgLrck1BJXRuPlC3cLsZFF1K0 O6Ti7ARY8KSz7/agq891OSykHB4dK8XB6RL8hztOarSnRp4w7x+zzyBVN7GI0nG4vQXb mH0i/ycVPAZatO2mD5SCqSmAauVZICNvrGc4cb4EhtIO8nIj8sw4wP/tCyIWe6aejd68 n63NMZwLhneMwnS41qr2hErs5zrKjjA3cUGNCa/10vcm+yRPIqvEL8gOMwb+Bn1qw/n5 qBf3ePXlg+tQ8mX7GloXAept3i7fLZeaK9M/b//P/oDhdVZfqTkveeRjCLVBaopmIflE ndWA== 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=X3rMKJZAHSn2N53RNjbN11WgeDbh222tQ0PpdvQC108=; b=gHgsu4U8S2fN55aEtQItK2T26Zr9R0ocEbk9imGJh2eboHNnOEiUAFuL+4oTbBEboN aVOBzYll3ZKjGGsjiCKydSbCXexpYuf32l4bLgWjklzQYr+/B3F087TUTwvBqE8ba+mS IL/WAxhO7lmp4gKSRh6nKjTNrUaEi0p8ikzVhypsUn8jwktBDETQZdbsdtH1oTRUj+lZ XjsV1tO/iAG9Kk86dzNgPNNy3vRKnuUgTIvyi9DGH/dL8JJV7NOwMbBKCFDxv93ceXaX 2/iky0jk6GukWW1aLrqEMWNeQUBiWFB4vmm5iyOKiWdgW2x7yCIqoxGnWkblKKMUoxaa Vptg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RPl6tlOE; 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 v7-20020a05620a440700b00718de0ca2ffsi1924997qkp.220.2023.02.16.09.14.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 16 Feb 2023 09:14:18 -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=RPl6tlOE; 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 1pShnS-0000Po-L8; Thu, 16 Feb 2023 12:11:50 -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 1pShnP-000098-Tq for qemu-devel@nongnu.org; Thu, 16 Feb 2023 12:11:48 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pShnO-0007yG-7r for qemu-devel@nongnu.org; Thu, 16 Feb 2023 12:11:47 -0500 Received: by mail-wm1-x32c.google.com with SMTP id m16-20020a05600c3b1000b003dc4050c94aso2222032wms.4 for ; Thu, 16 Feb 2023 09:11:45 -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=X3rMKJZAHSn2N53RNjbN11WgeDbh222tQ0PpdvQC108=; b=RPl6tlOExMAOxcuVnbKf2igH3qJ9l1ZRYvhZuJxh9Eeyn/FmF3dYGv7tCANbJa0/bj gjw6HRAeucUwfzOxG2Hqm0996ok7c0hbMd5wnNXx1Inv9lLLbmBr/z4u2bu8AeyANWSI S2QWWz0bxdnU5RZrI7xEG93tQ4CefGd0emF/1GxRlOewmkOabR5hbrKT3HHoBuvEZfSd 5ZevAoGCQVHCVg/84YAQnhTpRZOI3WHB6Nknn0+/rysRo7/VLwNpYX1tF7OQemFqS3gl fpm5eHkvx2A6+zVYLvLCXjdyw6t2EAWep1FG2CaXKZhg0ZEItoDwQv57nA5YDYE7XBP9 vDCw== 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=X3rMKJZAHSn2N53RNjbN11WgeDbh222tQ0PpdvQC108=; b=6j0Elt5hx/qCPcrm3lcKrMyd0HdnB5j05/jMYVnNRwizUytZVnvtAj/FNPG/ScqdZU GiLoNkAOOMPYyY77CDwqPqoTelBf91jfsYb1ISqDFNtXxmFldbo1KK6/BYX0qCdB0QNk iLcx9ufCjUTZRsHMFYhQhaFtE52EC2yVfvTlG6OM+ExhN5oAHzIa6mpJ+h4MdTjsVREt IcQtZf+zM8Oi7QxTfG8k2IaBUiJ3zVDXD7z4Yb62BgnLhyJpciN/B1OwAQWhwtA2wjq6 I3IeKVhy+TQHFj6wO3gCC9IRVApBrrGOjErjZGU/UJZoh33Sft/Fqa6P+6upG9xMpCFJ A27w== X-Gm-Message-State: AO0yUKVywtF6sKT5ZaoauwEDktZh5dE4LJ/G9nZVNueZUq2c2Ph8Gika Hw66YcDxsbCbuwtcar/C3PSnV6ErNHIAh//9 X-Received: by 2002:a05:600c:188a:b0:3e2:918:ecd4 with SMTP id x10-20020a05600c188a00b003e20918ecd4mr3354962wmp.37.1676567504983; 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.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 09:11:44 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 23/30] target/arm: wrap call to aarch64_sve_change_el in tcg_enabled() Date: Thu, 16 Feb 2023 17:11:16 +0000 Message-Id: <20230216171123.2518285-24-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::32c; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32c.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 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 | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 2d38c3ed7aa..07d41003654 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -10827,11 +10827,13 @@ static void arm_cpu_do_interrupt_aarch64(CPUState *cs) unsigned int cur_el = arm_current_el(env); int rt; - /* - * Note that new_el can never be 0. If cur_el is 0, then - * el0_a64 is is_a64(), else el0_a64 is ignored. - */ - aarch64_sve_change_el(env, cur_el, new_el, is_a64(env)); + if (tcg_enabled()) { + /* + * Note that new_el can never be 0. If cur_el is 0, then + * el0_a64 is is_a64(), else el0_a64 is ignored. + */ + aarch64_sve_change_el(env, cur_el, new_el, is_a64(env)); + } if (cur_el < new_el) { /*