From patchwork Mon Sep 11 13:53:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 721465 Delivered-To: patch@linaro.org Received: by 2002:adf:f64d:0:b0:31d:da82:a3b4 with SMTP id x13csp1112413wrp; Mon, 11 Sep 2023 06:55:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHs8icl0yRY4PQI/ug2Q+rlaUKKzaUI4baiyeB60gsuhyH254GxV1lR36cm1Hx9oE4+2LiN X-Received: by 2002:a0c:e310:0:b0:655:dc9d:efdc with SMTP id s16-20020a0ce310000000b00655dc9defdcmr5643487qvl.3.1694440527325; 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=gXCjoGsEVpx/dVuc5zmdH7FCpQUGs5wSm45vVuU/l9vQGOkSl59UreZMpPR7LsrhGa 0bxTqv0s4i33RK2uXprobXr8ERGj4QEnzRxDvovmsX1gd2Cf8bRkHYyGsBmBzonqB2sz 77TVTmVPyPPDYncx85Co0rLuksZxxrvn8qspN/3sthkKVmEZJ8snNVormnCWGQQUx6kv a2ZAYCKNN7R1YOWanddsmf+i/VBQ3DrtywUKEnDsPSY2ZX+M+h+JHHmCIuQxbDaFEMUX ztg+TutWRJKQ43WTm8z1WvVIr0emeUsGGd74JLUiJQY4I6s/EdhCkWQW0UKNDhyS2c/7 tZPA== 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=7xwR18hbzVHxpKvFfeyl3S2ZQU85H+wD13Io+R8gRBg=; fh=H2AmuqulvQE+T5zu97MCEUC3z9wF9NssS7895NhR/+c=; b=EDlqRHD/G5dKtyNyBN6hFuiWPffdAwztnCks0WsQu20VvDsP4TzDH1pGRb+iBeLV85 IP6rPn6NAQyJSwWaRnU8oc0AkcAevJIUQQp25Sf0b2m73j6S9IHumEPCiQKyr6jA+JVc gRKLcTaNyg2Y0WumBsk6zIBplXe8/Wf/SfaEM8P3k094HN6/lKCoIlD35hButasEkA43 4nWwpK73Zif5JqtuTgorO9+f+LyP82WkWIiWG5yP9urEkHIpYtdtPIf2S3cf1rgp7vTR h1IzOyWiuJLdFNZG+GoO66kk8yCcwJ/du4ZNhqp6QGxHiu7jHuksnpyLwB3Pay2ru9Dd fUjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wtplurwc; 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 h1-20020a0cf401000000b0064f76ca5db3si4634332qvl.456.2023.09.11.06.55.27 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=Wtplurwc; 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 1qfhMQ-0005ho-HQ; Mon, 11 Sep 2023 09:53:54 -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 1qfhMO-0005gV-SK for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:52 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfhMI-0003AF-Dt for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:52 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-31fa666000dso1047293f8f.2 for ; Mon, 11 Sep 2023 06:53:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694440425; x=1695045225; 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=7xwR18hbzVHxpKvFfeyl3S2ZQU85H+wD13Io+R8gRBg=; b=WtplurwcAyq6S4cZXC9uJh0segdLG5IAeNe9OHmj4GRrCML3HKCb+ltNB/yy2lVixK tMZGzRLfFDvCODB8QvPRL6KqaEk0qYCbWkrjjhLSSck/miCJ67VE6uP7SA/mZOXIWjo+ XLiyYujYxVXWxXWVyOQjDff1QgizkBzsmvDTJu0uQOBqhoJ4jLgBYk+mxgIZEJlqBvqY ydscKvCrgIc/rntur/VID4TJQRGu0TzMK2GVWRbQFnaH0tB8+z7rLKq6JGIzR/UyIWGS WjemK9oBPx/z61B3WU/O0SAKX4iycLU/mk5jP25xIgecmSlop2OdasUQN1IjNuhUc7fB QjBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694440425; x=1695045225; 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=7xwR18hbzVHxpKvFfeyl3S2ZQU85H+wD13Io+R8gRBg=; b=YqXjUrqyJE02FFNKJnZoth5NyrqMHjGsA9pysjm4MfWvkS9AyFGM+QgIuaCROhlj7S +pP/NT74H1gS4AoT/szOCqwPZHHKphkxDMrs3yqvRa9Vnz9+UmXHmVzY6jErRA54zLKC Jphgcmwld8nAWFIVOUmbnbax/yd2OIWyGDzbndpJCbu38Zol5tXyEBjVSbazp59HTeri /N8ZY7OaUhaTUeFUJ3lsG8jJedmbLHSOdrObtwCiPR04sZjElh1r7c5qwjdXEgokAny4 sLPzT7zcz1muTkeCaobVPsLUoVcl11dMQNHuJDhk5hp8waNtgnHl5jdTXjhHHHEJDaEx bItw== X-Gm-Message-State: AOJu0YyvgB0TuTneVs6ROcYTMjz/1nPsn3HuaFftuZbMxx8PniMcd9sG gUJnYXk1ueFHHdOl3nTWl4wHQw== X-Received: by 2002:a5d:4702:0:b0:31a:d9bc:47a2 with SMTP id y2-20020a5d4702000000b0031ad9bc47a2mr6719854wrq.53.1694440424799; Mon, 11 Sep 2023 06:53:44 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 06:53:44 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 4/7] linux-user/elfload.c: Report previously missing arm32 hwcaps Date: Mon, 11 Sep 2023 14:53:37 +0100 Message-Id: <20230911135340.1139553-5-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::435; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x435.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 Add the code to report the arm32 hwcaps we were previously missing: ss, ssbs, fphp, asimdhp, asimddp, asimdfhm, asimdbf16, i8mm Signed-off-by: Peter Maydell --- linux-user/elfload.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index d51d077998a..bbb4f08109c 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -506,6 +506,16 @@ uint32_t get_elf_hwcap(void) } } GET_FEATURE_ID(aa32_simdfmac, ARM_HWCAP_ARM_VFPv4); + /* + * MVFR1.FPHP and .SIMDHP must be in sync, and QEMU uses the same + * isar_feature function for both. The kernel reports them as two hwcaps. + */ + GET_FEATURE_ID(aa32_fp16_arith, ARM_HWCAP_ARM_FPHP); + GET_FEATURE_ID(aa32_fp16_arith, ARM_HWCAP_ARM_ASIMDHP); + GET_FEATURE_ID(aa32_dp, ARM_HWCAP_ARM_ASIMDDP); + GET_FEATURE_ID(aa32_fhm, ARM_HWCAP_ARM_ASIMDFHM); + GET_FEATURE_ID(aa32_bf16, ARM_HWCAP_ARM_ASIMDBF16); + GET_FEATURE_ID(aa32_i8mm, ARM_HWCAP_ARM_I8MM); return hwcaps; } @@ -520,6 +530,8 @@ uint32_t get_elf_hwcap2(void) GET_FEATURE_ID(aa32_sha1, ARM_HWCAP2_ARM_SHA1); GET_FEATURE_ID(aa32_sha2, ARM_HWCAP2_ARM_SHA2); GET_FEATURE_ID(aa32_crc32, ARM_HWCAP2_ARM_CRC32); + GET_FEATURE_ID(aa32_sb, ARM_HWCAP2_ARM_SB); + GET_FEATURE_ID(aa32_ssbs, ARM_HWCAP2_ARM_SSBS); return hwcaps; }