From patchwork Fri Jul 8 15:15:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 588557 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:bb16:0:0:0:0 with SMTP id jd22csp789145mab; Fri, 8 Jul 2022 09:01:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uea7I9fAedJ4YqhcoMhF+2xvSFpKvN/kZmCP/qEhpViEdg0Jvk4XkCWl9azW7TOxxzpuSf X-Received: by 2002:a1f:294c:0:b0:374:834f:366b with SMTP id p73-20020a1f294c000000b00374834f366bmr430281vkp.21.1657296098317; Fri, 08 Jul 2022 09:01:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657296098; cv=none; d=google.com; s=arc-20160816; b=IXKrCmFHwYEZS1pzvc2tuXoMQ3UGjOR/EtHxSTGUdsCOAyfo7nRPJ2gRafe/4Z3H2c Tall+qq4D2ywdCjvr7zM76mHuEZWTbDnIAOcRdZvzvTyDx7YXsMmGMvBFQbDfJVwm4pe ZyVxxBh8iLuimksg7iqmiDLu2uCX0ixx73YwytYHGKX/CS5WOCv1B+L9Jr6G71KBxhEI hrBLJLVUzkZammdeaudsYras9yfhcHDTtJxGV9VMKzJ0QXVpwsfhUAal9AQMlximTwMi +nhZRPG05dmQT3SxDs8gser9zUr7rakgHHdosa4MZf7VnHjL6PYkM92ZLmMinboyxYdF GIow== 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:cc:to :from:dkim-signature; bh=H9uf8O4CUiqyVcmvjic8DcvLpWT2fCMJa8CUUeRGTi0=; b=ePPtb2dy6jJzbWjGiG8yUtnLMOrDbvdIrPBB4uqJYJQo7pUQGEjJPCbEJnrHFZSLF8 AuAHT7K83bup7IiOLKhJFLTlBFNo3WVBuJLzPP3O9tnArEDyPAwuBIFK6rOXu2srVIzd abGDe9JqZTR7pR6GGNg9384YvLGp0Ip6VxxwmB2LEzFg0c0veM/fW78Cuj/zqKIPpl0D QGcRMGhKUN20ToMMgJfG6eY5z6fbLYTGw4ZBSQFAvtbHEf7nGl0qCg26sH8/6jKlG8Ts dZ6r0b0yY872Ghb9vVngnpLHCjcWHO464g6dyDIYECADt4Cnt47wFUfOwvhYD+tBVhy5 IYpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GB4PC84G; 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 s32-20020a056130022000b00382dbf58675si3427612uac.111.2022.07.08.09.01.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jul 2022 09:01:38 -0700 (PDT) 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=GB4PC84G; 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]:53286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9qQD-0003CD-PQ for patch@linaro.org; Fri, 08 Jul 2022 12:01:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9pmw-0003XA-O6 for qemu-devel@nongnu.org; Fri, 08 Jul 2022 11:21:02 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:44623) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9pmv-0003Gv-Bs for qemu-devel@nongnu.org; Fri, 08 Jul 2022 11:21:02 -0400 Received: by mail-pf1-x431.google.com with SMTP id e16so11018081pfm.11 for ; Fri, 08 Jul 2022 08:21:00 -0700 (PDT) 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=H9uf8O4CUiqyVcmvjic8DcvLpWT2fCMJa8CUUeRGTi0=; b=GB4PC84GnlTLbLfDNQpejeBxBDIV/D4gw5BDGWnulLVKnzZcoEN5D0EVV9gkkitUHY 6aDhlEy2X15c4lIzekAYmvNvMRP4zCgnL5ZVYUlexDYs/L47roGhfKragbHc0flB4CGh pk9rpZpOtYNyI/2gSGHkwIAGTAkHLOD34DQ8XkvIW2YVBTe/Wq5mokrhKWZKHYc3aIbY eXwI5avX04ClhSHyrTUchojkMTKgw+H3BjBpiPVvrkbeoGD9wHFJsgHmRNEQUsRU6T/c Jwq2WyXIooX4WErFOmukNn1NPDlasQC9TG5snI9TqgFiQLwc/q740uHVgsv2kcTf9uXU dsCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H9uf8O4CUiqyVcmvjic8DcvLpWT2fCMJa8CUUeRGTi0=; b=a6Haxo55X9EHfmbg1z4MUVD7C0XtQjBzhtuz3+aC/ovYDFrlst4AAlbRxqm40qdhtC s1CmGok+qE8hjNJYPn2dV7P4JCAmFCBmL3KIj6rIaQVQqe6FcX5RwR1GOgSOtClqvFl/ UpbjRzCTaPJH6gz8jnt7wKs89HW/LI31/IwNVSWE7aoBaDCT76g8JIbNhX+q2hDwZj08 5XMsVjwznjt1rmiUIMm044LWLmY8CvrxaS/owDqVIZmXMMVwQS0XUx6nf0Xab3NWeRmi zutvcYWw0P6BBnvyxxUrqFqx0wDr5+Bgv35c/7PnERF2fq9HA56Ul/Eqo+Sorgkwd5FE KzQQ== X-Gm-Message-State: AJIora8786Hj8b1e5lJQUqL2pwzvL/u+7so0ttVvRYb1x/dSUVYcqFuj c5R+PiTYCX7cRIa/3nUR/NpiRSuPFEwgc9c4 X-Received: by 2002:a05:6a00:218c:b0:525:5236:74c with SMTP id h12-20020a056a00218c00b005255236074cmr4396978pfi.44.1657293659628; Fri, 08 Jul 2022 08:20:59 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id cp2-20020a170902e78200b0015e8d4eb1d7sm30067741plb.33.2022.07.08.08.20.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 08:20:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v6 43/45] target/arm: Only set ZEN in reset if SVE present Date: Fri, 8 Jul 2022 20:45:38 +0530 Message-Id: <20220708151540.18136-44-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220708151540.18136-1-richard.henderson@linaro.org> References: <20220708151540.18136-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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" There's no reason to set CPACR_EL1.ZEN if SVE disabled. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 9c58be8b14..9b54443843 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -204,11 +204,10 @@ static void arm_cpu_reset(DeviceState *dev) /* and to the FP/Neon instructions */ env->cp15.cpacr_el1 = FIELD_DP64(env->cp15.cpacr_el1, CPACR_EL1, FPEN, 3); - /* and to the SVE instructions */ - env->cp15.cpacr_el1 = FIELD_DP64(env->cp15.cpacr_el1, - CPACR_EL1, ZEN, 3); - /* with reasonable vector length */ + /* and to the SVE instructions, with default vector length */ if (cpu_isar_feature(aa64_sve, cpu)) { + env->cp15.cpacr_el1 = FIELD_DP64(env->cp15.cpacr_el1, + CPACR_EL1, ZEN, 3); env->vfp.zcr_el[1] = cpu->sve_default_vq - 1; } /*