From patchwork Mon Jul 11 13:57:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 589377 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:bb16:0:0:0:0 with SMTP id jd22csp3307677mab; Mon, 11 Jul 2022 07:39:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1srpyDZRJsK954N7txzmwO6YmapwHu4ykXdI2v5lHsXxuGadeJ7mE0IMD/4IoJptWIm/0Up X-Received: by 2002:a05:622a:6185:b0:2f1:ebdd:58c with SMTP id hh5-20020a05622a618500b002f1ebdd058cmr14146136qtb.400.1657550377003; Mon, 11 Jul 2022 07:39:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657550377; cv=none; d=google.com; s=arc-20160816; b=k1MiUGBOk1QcylpZP07FMH7Y2J+do/9tgucz5itNKKV5mgIaF4/OgIKzg9b44TBVF5 RI5MELj5AM9xTxwb2lJ8aF4mduYsDjhnzadpnw201mecEjMSv8GOx2BuKcSCDPuW7ckx D043Y5FlFj23DeLd7JLMJ4RXF/zpiKrBMD8Wiydn/gbwD7SeJH58aQj16sbtUOFN3Cfp ICsfElMicwtPRv8QlcnGZdxXOlbM2Dij7w5AmIKV57CW30rDwyMLuHvZqKNwkhBCxflW BT7i23XxPD7IHuc3Q7PyyiXuJqmyffswvCF2nIWNwM6+HZP3smDpqyHtwK7VDfl9gfUy 5ZqA== 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=H39kaTMy9J7xwr8e9kYgt0j0csqMDxRmuwJQoBhCvKw=; b=IdnY2FDdrwC5pu/ZJxMphs8nT4Mqbiq7hZaiXSbWCZLfNTZ0iI5+Vhf8Bo1mmHE9ZL pYBy6LE5Gvz/jKkR6L2l4AjJ0FWFbZLvpAkFmNw8j78DdOaEb31Tn5RAe1FgvQEAVSbQ BWLBkJLi+3seflF3l8a6aO0YE+Nwra1jMlQgDkuzGTMNQC81NA7gZDQhqsEo0iOlUncF oKa8a5WDMbrcs7MPgANy9s2JtRSBETVG7hJ9Ysuoo51FgpN9LAO5UDB81DOSdAGPuKlP PxANqRebcMbe61dEmcl72QHR/07mZ7wPztxOYIf/hcAi9Dkwz/O7RFKEUNpNATRTIZzX YEiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d+Ji1fHz; 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 bn14-20020a05622a1dce00b003050c5041f3si4136421qtb.438.2022.07.11.07.39.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Jul 2022 07:39:36 -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=d+Ji1fHz; 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]:51314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAuZU-0005vc-HV for patch@linaro.org; Mon, 11 Jul 2022 10:39:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAtvu-00072H-4U for qemu-devel@nongnu.org; Mon, 11 Jul 2022 09:58:42 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:33723) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oAtvh-0002ng-UD for qemu-devel@nongnu.org; Mon, 11 Jul 2022 09:58:41 -0400 Received: by mail-wr1-x432.google.com with SMTP id h17so7183289wrx.0 for ; Mon, 11 Jul 2022 06:58:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=H39kaTMy9J7xwr8e9kYgt0j0csqMDxRmuwJQoBhCvKw=; b=d+Ji1fHzNjRMybbKZMKDlRaldwg6kI9RSlLnXAhq6yZqZVq0i7Ii+nyEhfm0Ruz9KN WhJs+clqJ41qYa1Et7NX8D/UOIa13x4SOtRubnDWf3wQQKY1jM+kExwFlcfF2hWgJGCB FXuVgsmJ/BOGwJ6q450MxJhps3jGY3XaIlaETDxVw33uIJ/0s/g6RXKiGzUh2u7/8I4m C41F8zz2JHDxZYlFXLPLIiqPyjvCHq65EtP8eYhpVNjmluh0OAJZsy1uEPy00qu1MDPi 3V7U3kW/EGLoZ6qFhmxzQuVDdvC1bQAlcydQZ3SVnuycBKIPpkUimFxsloPy824RC0CJ CmiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=H39kaTMy9J7xwr8e9kYgt0j0csqMDxRmuwJQoBhCvKw=; b=0KCSUSbkie0wmIY0Fgt7HSzBKPPYLJghO+ZeMOXlRQ0ESm0XOm2LKqJfiZx7VNAPuT XOP7vDxJO+EQ+t09DA2IwE2JEo3eqNyDXbzPtC0F2BZFLjHR1NFkL0gHx8maJiHL/UHl dEWTwt7XoiB5fmIVzprM5WT0mEqy2kLRqNhDD2mVnIvjnUVtYtTTVOvPaqCUL5X2yTuU 3lUtwHKS1g94gfb+z8EIMs5X7mVB0jKXNbRyOgquEatmEmBSoweXnL9RhQY4y2Q/Obdh 0zu4ekozT9K8aYbP2QYzmFIoByGh4+olOy1+BvGDKHcuJQ7QCymXxx3u2nQ3jUGlFjvE p6hg== X-Gm-Message-State: AJIora+zPVa8pZtEXg/pdkMyCaWn45YZXzprGDmS7ADY4oZht7igSW5o CsYx3ygoIypEPE66D8QOdto2HnGje3inKA== X-Received: by 2002:a5d:6149:0:b0:21d:6ba7:6095 with SMTP id y9-20020a5d6149000000b0021d6ba76095mr16722577wrt.680.1657547908737; Mon, 11 Jul 2022 06:58:28 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q123-20020a1c4381000000b00397402ae674sm7595596wma.11.2022.07.11.06.58.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 06:58:28 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 43/45] target/arm: Only set ZEN in reset if SVE present Date: Mon, 11 Jul 2022 14:57:48 +0100 Message-Id: <20220711135750.765803-44-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220711135750.765803-1-peter.maydell@linaro.org> References: <20220711135750.765803-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.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=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" From: Richard Henderson There's no reason to set CPACR_EL1.ZEN if SVE disabled. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20220708151540.18136-44-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- 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 9c58be8b146..9b544438432 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; } /*