From patchwork Mon Sep 11 13:53:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 721461 Delivered-To: patch@linaro.org Received: by 2002:adf:f64d:0:b0:31d:da82:a3b4 with SMTP id x13csp1112409wrp; Mon, 11 Sep 2023 06:55:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/BFKZpQYjVteSkA4Hx0vwYNuewcsr9AZWIbFt5dscNhSvPlMEzucEYbZpiDtJlC65Jiac X-Received: by 2002:a0c:e1d4:0:b0:651:8efe:2a61 with SMTP id v20-20020a0ce1d4000000b006518efe2a61mr10331634qvl.18.1694440527071; Mon, 11 Sep 2023 06:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694440527; cv=none; d=google.com; s=arc-20160816; b=RikEVjVHPbS3N1jHeW/hCQGvqwlVe3zwEYby55XiJ4v5xYYsrfypYS5hSGrq7a4BA6 P8L+rU9KRzJnQ6pMQ9OSWXolannAp9aOiJBaAL6JJ3Yp6NzwA3G/55niP9NKyAZ7v12K 6HgqMW9u2KYd9wRVh+Ga1JiZI1fLrjfV/j2bCEkjNwITtmzLfGJ0xzJl0e+sb4tLTe71 H7jm0jL4ZH5lvsYdWFM+Kd9oyQwfF1Da1wQqFPfl07Wc9yjGYZ+T5TVQyirhPXwf9sgR diSmCZMK9nnQ6eI5Vd6db6NhGT0fgLpfqPOCovSPz7NBf4DkuiCDk6oZVQreISOVT55H v+Sw== 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=BQa+831csKF+bLc07F+cF6xTN80jpivchM4xDwQv7Wg=; fh=H2AmuqulvQE+T5zu97MCEUC3z9wF9NssS7895NhR/+c=; b=LH2y7KQncYyHh1JbnoHIwRlX1whU6z11bQpFVvHy82s7rz+ttLW2MXt8e06HPk+T6A noVahmQAs0SodnlE0v++17wNWBrH4HuXUdHQhOQmFxskimhcUa/6tQBQ+97OA9MZ4nw2 35ivNO4/d/RmIQ5saLkURJbRTOzsPFTzM8kWQ0ZnX8/LNupwE4WfzV38cZtAHKT9g9wT U3lzbLjTmmr7XeoNg7ECzLIvH4uQXZyyG10tSGXGk7PoZzmKUwU5Vr3hAJ0U8gQbhSt5 bvuOp+wuz2iQ4Kr28lCMW27HB0oMk9MkjZley3IGDpfi+IFaJuww1UCpz8sHAD/FU8pc 5/qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i7jN4E+x; 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 w16-20020a0ce110000000b0062529d9a496si4642966qvk.608.2023.09.11.06.55.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Sep 2023 06:55:27 -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=i7jN4E+x; 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 1qfhMS-0005kF-Eg; Mon, 11 Sep 2023 09:53:56 -0400 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 1qfhMQ-0005hd-CB for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:54 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfhMH-00039v-Kj for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:54 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-31768ce2e81so4479569f8f.1 for ; Mon, 11 Sep 2023 06:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694440424; x=1695045224; darn=nongnu.org; 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=BQa+831csKF+bLc07F+cF6xTN80jpivchM4xDwQv7Wg=; b=i7jN4E+xn3ChVmvTKzK7XyPrWahNIfoD4Wtu2UQCTtR4Oa4x2N6UfCYkoGAp5BArQD bVjcAfAeDxnSIGGUJ8jA6LPjdBaKdU5aLjs4r9QY24Ayxi7VRTKFtg5SP6AJs83aU8we 86pU5I0urg49xgijpiVl9firM3XZ4Hk35ySjuhH7HEfQdzn5By6zbTT93ai4+UKAWSgx J4BX/B71hU+tyyC36RBmCIS0veVl53ZQ/HiLUeC7DYykd5GAWAsfNHKo1PBVvkIpj9xQ TketVJnYfjo1HxWUOH8PrvhRK0nn+/d2DNDgb0iS8fDT46yAJwyaRjvt2ZABHjLwZNtk pq4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694440424; x=1695045224; 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=BQa+831csKF+bLc07F+cF6xTN80jpivchM4xDwQv7Wg=; b=cUAvYUdzEIP4Jxj5/eGkMCkhKMNyNATpUFNKZZb9IUmxMMxd0/xgFdiwb+12KDJ/Lz 2lUPc+3SpWizawNvXV5aJyaR4WNDbbe9IBdoLL0/nbgk+m1qii98ifCeQ0QtIcksKvOw kHAIUHRGHTBJ+7FrgLqhnKWBVvNbh7E1e0ZBxkA+87uMB3nck+1+7aGtav/gKx+ByuIG u5bcTKtXv/jlZJe5oAkgeCm29Hgln1m0eWE6koopKupSvYh7zu4SKkdYiwpgzIzGNQHu wAGow/KkKMv3/RARV6glUojKsOQxcFaz7GedmGwFYdBH8py9Hh8QDMCA6UiCBxclvfip yeMw== X-Gm-Message-State: AOJu0YwPi991b8L6++REKTAIvZq1RC9hf4ocJTe+2QODGUpGIMCEZzVe zeuh32zeJNwl4rPHY1MOHgYJEg== X-Received: by 2002:adf:e10c:0:b0:319:85e2:6972 with SMTP id t12-20020adfe10c000000b0031985e26972mr7262992wrz.42.1694440423833; Mon, 11 Sep 2023 06:53:43 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id r3-20020a5d4983000000b00317ab75748bsm10079758wrq.49.2023.09.11.06.53.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 06:53:43 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 2/7] linux-user/elfload.c: Correct SME feature names reported in cpuinfo Date: Mon, 11 Sep 2023 14:53:35 +0100 Message-Id: <20230911135340.1139553-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230911135340.1139553-1-peter.maydell@linaro.org> References: <20230911135340.1139553-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 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-bounces+patch=linaro.org@nongnu.org Some of the names we use for CPU features in linux-user's dummy /proc/cpuinfo don't match the strings in the real kernel in arch/arm64/kernel/cpuinfo.c. Specifically, the SME related features have an underscore in the HWCAP_FOO define name, but (like the SVE ones) they do not have an underscore in the string in cpuinfo. Correct the errors. Fixes: a55b9e7226708 ("linux-user: Emulate /proc/cpuinfo on aarch64 and arm") Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- linux-user/elfload.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index a5b28fa3e7a..5ce009d7137 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -844,13 +844,13 @@ const char *elf_hwcap2_str(uint32_t bit) [__builtin_ctz(ARM_HWCAP2_A64_RPRES )] = "rpres", [__builtin_ctz(ARM_HWCAP2_A64_MTE3 )] = "mte3", [__builtin_ctz(ARM_HWCAP2_A64_SME )] = "sme", - [__builtin_ctz(ARM_HWCAP2_A64_SME_I16I64 )] = "sme_i16i64", - [__builtin_ctz(ARM_HWCAP2_A64_SME_F64F64 )] = "sme_f64f64", - [__builtin_ctz(ARM_HWCAP2_A64_SME_I8I32 )] = "sme_i8i32", - [__builtin_ctz(ARM_HWCAP2_A64_SME_F16F32 )] = "sme_f16f32", - [__builtin_ctz(ARM_HWCAP2_A64_SME_B16F32 )] = "sme_b16f32", - [__builtin_ctz(ARM_HWCAP2_A64_SME_F32F32 )] = "sme_f32f32", - [__builtin_ctz(ARM_HWCAP2_A64_SME_FA64 )] = "sme_fa64", + [__builtin_ctz(ARM_HWCAP2_A64_SME_I16I64 )] = "smei16i64", + [__builtin_ctz(ARM_HWCAP2_A64_SME_F64F64 )] = "smef64f64", + [__builtin_ctz(ARM_HWCAP2_A64_SME_I8I32 )] = "smei8i32", + [__builtin_ctz(ARM_HWCAP2_A64_SME_F16F32 )] = "smef16f32", + [__builtin_ctz(ARM_HWCAP2_A64_SME_B16F32 )] = "smeb16f32", + [__builtin_ctz(ARM_HWCAP2_A64_SME_F32F32 )] = "smef32f32", + [__builtin_ctz(ARM_HWCAP2_A64_SME_FA64 )] = "smefa64", }; return bit < ARRAY_SIZE(hwcap_str) ? hwcap_str[bit] : NULL;