From patchwork Mon Sep 11 13:53:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 721463 Delivered-To: patch@linaro.org Received: by 2002:adf:f64d:0:b0:31d:da82:a3b4 with SMTP id x13csp1112411wrp; Mon, 11 Sep 2023 06:55:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG1aazPAWDAELC66sohkxpZXqepsNoQVX3TfA+avrABnwUBi5FEuXZiR7ZV1Khy5wfvkVeu X-Received: by 2002:a05:620a:4045:b0:767:197e:4417 with SMTP id i5-20020a05620a404500b00767197e4417mr13540677qko.3.1694440527256; 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=iTCSGL7GWPlXOjFgCYqo4p1ho/MGGQ1hDRDMGzGLTMlIif5FPe8cGNC6CBJ66+03wW vOLNouecCg5XERrrNE2kDEv91bp5qEV2NdshcDqVTuBXBnOkcrgPLtt1c6GZub2UkcXe qn+szxxIx0gDlyS0R70WyFrXqFDc8fObbFb9E9o5VgrGzm7XUx0J96vd2tGBmQkKi9aU Um/LZLw+ZuwYQRvEZL3IG3u8E2UFI6+ri3tzK2eeqtPQ7GzA+1lKuoGCnOOBs9t6Trb3 rcV0nxveKRXVSMYa2Y+D7JDF5sqW8bUj/LjOS5XR70Tt1Xt2glUjTmfgzL4M00yLw46/ Rg/g== 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=EhsANPr+s+DzOUAyiokLp6LNqlQRXOf6IY9mVxsXL14=; fh=H2AmuqulvQE+T5zu97MCEUC3z9wF9NssS7895NhR/+c=; b=mEmQlS4pqoNX/HILoka36y15dI9OPZxxwsHqk9+GW+svzWf9TIsLSzfp9htzucva98 25I4riqvjVglS2AgDeOsdaNHV34hcxp/A8he3dq9ELAB+rcmc/Ct2lli9DjGYNP45no6 /8c687CCis7DDNlecoX+OrGOiSLoqkyzafLg7qPHJMbRE0hzBdTaV37yNjPBdSAz4YbC D/n1FNEYbufAEwRAnWirpxBLbStQIAewDMz+/a1AdOAol8BDaaFU3edFkocj+DBQ8y8m oBLP1y3V0eTEG1PI/h2CyYiQWgTrDG9eEtJwfE4lIxEnivVoIIxjmts/CtY4Lw9FrZxy po5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zi40qD8b; 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 g18-20020ac87f52000000b00403a9dc72bbsi4757480qtk.609.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=zi40qD8b; 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 1qfhMR-0005iF-5w; Mon, 11 Sep 2023 09:53:55 -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 1qfhMP-0005gm-KL for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:53 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfhMI-00039s-ER for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:53 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-31c4d5bd69cso4615220f8f.3 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=1694440423; x=1695045223; 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=EhsANPr+s+DzOUAyiokLp6LNqlQRXOf6IY9mVxsXL14=; b=zi40qD8bBOdUYEg2SB2DsPlzO9HoWgOlDL9Z/qr6/8SBNPZ7aY10qa3r5iEyKA4cOk bSBMXbselHh7mxeVZrcg0A/62W3NIrKWHB7qS5rfB1L2YDR8eWPyhfQj+YEaiU2wcQX0 axuwLlIDHOqZ7mBVDIfZwi0n1jes3C1BKpEqNJfjnidzav216Lea96Ghq3eAhgHBI7zo PYOZztYDpdEl8XiMdBTbsxNP2GhsOItW0DEvkXB3600eAYkAoqZ2JORo16VfxNqSlDyj 7AVLJNeN2U/z+KwVwNWzJ1j5a9/3g7RXhZVslfFTUitG0LeurBKrp1J+NXiS/ueANP1z LSxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694440423; x=1695045223; 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=EhsANPr+s+DzOUAyiokLp6LNqlQRXOf6IY9mVxsXL14=; b=VOwVLfmA+2funkeNDfIHYTy4OAQ5NnCL7LJnYicBEgHeRrCxpF000yvUyQmnTZK/Me ad5gevCEukx872qzyXo/kU01PqorwhP1/YyYjNVVkk8vjcFdsMd+o2w4sbYT0wXmuj8U RjCdJjPSQngExFwB8JQ5fwz66T7lPNXg2JkdsoQ71gp4o/wsb9EreyzaZyg0MTfseoUj 1piwuVuA7cXt0L/tN4yFyQisbUfXCbY8oF/P13dcop9OgkZQ6rtVtb3NOOu0lTZl0d52 yHz11IMbqegFT/Zx7YoAqK/nyNDqzYuRSjV+ZizZZeX01brvUxy/Q04JPafJI9N91G29 2lGA== X-Gm-Message-State: AOJu0Yw2FnMGYec5wo3Hhrwn/u0CiW9KOVkLb1nVnKA1w1lXkN9foRIe 4ObIyY67w7Ze6tvaym1kASoitA== X-Received: by 2002:adf:d082:0:b0:31d:c3d2:4300 with SMTP id y2-20020adfd082000000b0031dc3d24300mr6535375wrh.71.1694440423429; 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 1/7] target/arm: Add ID_AA64ISAR2_EL1 Date: Mon, 11 Sep 2023 14:53:34 +0100 Message-Id: <20230911135340.1139553-2-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::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-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 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: Aaron Lindsay Signed-off-by: Aaron Lindsay [PMM: drop the HVF part of the patch and just comment that we need to do something when the register appears in that API] Signed-off-by: Peter Maydell --- target/arm/cpu.h | 1 + target/arm/helper.c | 4 ++-- target/arm/hvf/hvf.c | 1 + target/arm/kvm64.c | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index d50cd918580..e637796fd83 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1033,6 +1033,7 @@ struct ArchCPU { uint32_t dbgdevid1; uint64_t id_aa64isar0; uint64_t id_aa64isar1; + uint64_t id_aa64isar2; uint64_t id_aa64pfr0; uint64_t id_aa64pfr1; uint64_t id_aa64mmfr0; diff --git a/target/arm/helper.c b/target/arm/helper.c index e3f5a7d2bdc..f9f7c3c39e9 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -8435,11 +8435,11 @@ void register_cp_regs_for_features(ARMCPU *cpu) .access = PL1_R, .type = ARM_CP_CONST, .accessfn = access_aa64_tid3, .resetvalue = cpu->isar.id_aa64isar1 }, - { .name = "ID_AA64ISAR2_EL1_RESERVED", .state = ARM_CP_STATE_AA64, + { .name = "ID_AA64ISAR2_EL1", .state = ARM_CP_STATE_AA64, .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 2, .access = PL1_R, .type = ARM_CP_CONST, .accessfn = access_aa64_tid3, - .resetvalue = 0 }, + .resetvalue = cpu->isar.id_aa64isar2 }, { .name = "ID_AA64ISAR3_EL1_RESERVED", .state = ARM_CP_STATE_AA64, .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 3, .access = PL1_R, .type = ARM_CP_CONST, diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 486f90be1d2..546c0e817f4 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -847,6 +847,7 @@ static bool hvf_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) { HV_SYS_REG_ID_AA64DFR1_EL1, &host_isar.id_aa64dfr1 }, { HV_SYS_REG_ID_AA64ISAR0_EL1, &host_isar.id_aa64isar0 }, { HV_SYS_REG_ID_AA64ISAR1_EL1, &host_isar.id_aa64isar1 }, + /* Add ID_AA64ISAR2_EL1 here when HVF supports it */ { HV_SYS_REG_ID_AA64MMFR0_EL1, &host_isar.id_aa64mmfr0 }, { HV_SYS_REG_ID_AA64MMFR1_EL1, &host_isar.id_aa64mmfr1 }, { HV_SYS_REG_ID_AA64MMFR2_EL1, &host_isar.id_aa64mmfr2 }, diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c index 4d904a1d11b..ac440c33f9a 100644 --- a/target/arm/kvm64.c +++ b/target/arm/kvm64.c @@ -304,6 +304,8 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) ARM64_SYS_REG(3, 0, 0, 6, 0)); err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64isar1, ARM64_SYS_REG(3, 0, 0, 6, 1)); + err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64isar2, + ARM64_SYS_REG(3, 0, 0, 6, 2)); err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64mmfr0, ARM64_SYS_REG(3, 0, 0, 7, 0)); err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64mmfr1, 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; From patchwork Mon Sep 11 13:53:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 721464 Delivered-To: patch@linaro.org Received: by 2002:adf:f64d:0:b0:31d:da82:a3b4 with SMTP id x13csp1112412wrp; Mon, 11 Sep 2023 06:55:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFpj6ll1rEOoFtZISHlm99SVayHyULhbcmcmQEtDqkv2565jhmDOhk7EzUOXLcgxGwpqB4p X-Received: by 2002:a1f:db44:0:b0:495:bf44:6a15 with SMTP id s65-20020a1fdb44000000b00495bf446a15mr6659886vkg.8.1694440527275; 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=d2ajKkQL2r1cJh3iYVAYGLw5xiY/wssIxGJxqLx9+TmbSTH4KAkkRKXIkBiTznW/ib pyJj+eDI4jYCwnUG3Z2hJmepALEC2j81MD/85neAHBcpSe7RLTYsaZikHGbiX2vJ6Yg6 2V1uffvptb/B1Jr/rXnBOxMBEjiqwLR1CNg8XJjGJc5uYJShyh7pJkMVKVarV1bKUSvo qbL4Rvu+wbSfjQKAfrrmlqt9ITLNRjjKYTQaoVG7NeYFGrVGZAQzVRGvQLF+FfHOdsYb aR6bkcgkQZEhi6gA7wqFiTY1aK4O5BlZ5uXQkfiwXfltEausl7tWyH+hB1jlXRywzOch +I5A== 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=7uJJG0JUNNn26kxyjZ7e+2zZH+twak0UtrO5PhAiUUE=; fh=H2AmuqulvQE+T5zu97MCEUC3z9wF9NssS7895NhR/+c=; b=FkHjp/oTP6hnro4QtdZUZy1nm+f2RqvNUN/qIHjuv172v8tRJzFb8af8zN+HSmlh2J keZltnPV3n34q6RqWIrRs8PDvHoSIjsBin7d5DgABVR5AobP4Bv225ka6yXvhDLP0aAl laGHNPUGQzFQaVFRp5ARvFv5CmYQEHoNVgxAoEv5AFV9si3iWWlkJix1l7780yatFlQc FuwWyeeHgHT+2Rc7mQttLYtCsCT4W0VkTNnVaIiG6gD/+5wzoaKsm0rpP5NqMNtTLvUE AjE7cqnS2enWw6T5eLhdtrnLI2bv1FLx6CSxi8+GXs5rEHIoKEhL6vbdKGuhdALWvyBD xb5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qM/8VSGr"; 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 y11-20020a05622a004b00b003f9c53b7d70si4758887qtw.703.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="qM/8VSGr"; 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 1qfhMT-0005n5-85; Mon, 11 Sep 2023 09:53:57 -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-0005i1-UP for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:54 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfhMI-0003A4-TA for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:54 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-31aeef88a55so4127495f8f.2 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=7uJJG0JUNNn26kxyjZ7e+2zZH+twak0UtrO5PhAiUUE=; b=qM/8VSGr0NSTo9A6n0Z+m0Eb/TecFPWPvVMPHeTDKPz3IR330wSBrUqiu6GHqJWiC5 9WPLYAz5+yTfbGByTFDkQPjB5cgY9qEIinvTijE6LLYhaOnZ/7UpdWRTf0hnf4eDbBcO rqD3HvhMjMjlXfv0I6KGtfSY165RnhWl5GWNcF5WHJyDIYFMx0Ny8XnCKWj79WlKqNQH r6LrBMZ0xfNKz7k+hQV0ku7wncvcJxanKheJ5Z9ag630tHptThX8bCPN6ahsFgLTzTc4 6zuJ6qN9sy80ZGxdLepICXMBg8zUxTbigCm6/MBz1AAb1gHwMOvclx3zWiR3U/rVDxw2 ayqQ== 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=7uJJG0JUNNn26kxyjZ7e+2zZH+twak0UtrO5PhAiUUE=; b=wCxImc5r2S4DX4Q40coS3ENga6sywpnlk0zfzf20fR890v5AgAmThm7mmBc6bpx+FI HE71BZir4IUslC6lwJiExT07P8uoj2OUVv1wZnUna1y0AL86xX4OSLY5NShMN7fP9Sig UPPzglNcJikM/pOEPpKe26LSqdyfW6URfsegEx3QT8i7+pOO+/Mo+PXxMigmHepHgR3t NCVLNfQ3xRIjD1XZkhsVG1PX7ZL/V4wyfmpj6bS3LKhoSdm6SkqVRww4omqaYU9Hb95r ftWkb06QK6XqIyopjig6NsgujEjifv/5xs9W8UZR+ql9+r+J9HLW5ij7VHblCDlqCWw8 r/pw== X-Gm-Message-State: AOJu0YzKSDuTVllyEonKFvUsTyT8Z9xuJro0nBa4A1/hGnY2JxL9lLNN 16Lmf+/X/1Y3/ZZTMTcmhUcPAn9fvUGZWurzCYU= X-Received: by 2002:a5d:684a:0:b0:314:124f:12be with SMTP id o10-20020a5d684a000000b00314124f12bemr7493994wrw.3.1694440424323; 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.43 (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 3/7] linux-user/elfload.c: Add missing arm and arm64 hwcap values Date: Mon, 11 Sep 2023 14:53:36 +0100 Message-Id: <20230911135340.1139553-4-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::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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 Our lists of Arm 32 and 64 bit hwcap values have lagged behind the Linux kernel. Update them to include all the bits defined as of upstream Linux git commit a48fa7efaf1161c1 (in the middle of the kernel 6.6 dev cycle). For 64-bit, we don't yet implement any of the features reported via these hwcap bits. For 32-bit we do in fact already implement them all; we'll add the code to set them in a subsequent commit. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- linux-user/elfload.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 5ce009d7137..d51d077998a 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -402,6 +402,12 @@ enum ARM_HWCAP_ARM_VFPD32 = 1 << 19, ARM_HWCAP_ARM_LPAE = 1 << 20, ARM_HWCAP_ARM_EVTSTRM = 1 << 21, + ARM_HWCAP_ARM_FPHP = 1 << 22, + ARM_HWCAP_ARM_ASIMDHP = 1 << 23, + ARM_HWCAP_ARM_ASIMDDP = 1 << 24, + ARM_HWCAP_ARM_ASIMDFHM = 1 << 25, + ARM_HWCAP_ARM_ASIMDBF16 = 1 << 26, + ARM_HWCAP_ARM_I8MM = 1 << 27, }; enum { @@ -410,6 +416,8 @@ enum { ARM_HWCAP2_ARM_SHA1 = 1 << 2, ARM_HWCAP2_ARM_SHA2 = 1 << 3, ARM_HWCAP2_ARM_CRC32 = 1 << 4, + ARM_HWCAP2_ARM_SB = 1 << 5, + ARM_HWCAP2_ARM_SSBS = 1 << 6, }; /* The commpage only exists for 32 bit kernels */ @@ -540,6 +548,12 @@ const char *elf_hwcap_str(uint32_t bit) [__builtin_ctz(ARM_HWCAP_ARM_VFPD32 )] = "vfpd32", [__builtin_ctz(ARM_HWCAP_ARM_LPAE )] = "lpae", [__builtin_ctz(ARM_HWCAP_ARM_EVTSTRM )] = "evtstrm", + [__builtin_ctz(ARM_HWCAP_ARM_FPHP )] = "fphp", + [__builtin_ctz(ARM_HWCAP_ARM_ASIMDHP )] = "asimdhp", + [__builtin_ctz(ARM_HWCAP_ARM_ASIMDDP )] = "asimddp", + [__builtin_ctz(ARM_HWCAP_ARM_ASIMDFHM )] = "asimdfhm", + [__builtin_ctz(ARM_HWCAP_ARM_ASIMDBF16)] = "asimdbf16", + [__builtin_ctz(ARM_HWCAP_ARM_I8MM )] = "i8mm", }; return bit < ARRAY_SIZE(hwcap_str) ? hwcap_str[bit] : NULL; @@ -553,6 +567,8 @@ const char *elf_hwcap2_str(uint32_t bit) [__builtin_ctz(ARM_HWCAP2_ARM_SHA1 )] = "sha1", [__builtin_ctz(ARM_HWCAP2_ARM_SHA2 )] = "sha2", [__builtin_ctz(ARM_HWCAP2_ARM_CRC32)] = "crc32", + [__builtin_ctz(ARM_HWCAP2_ARM_SB )] = "sb", + [__builtin_ctz(ARM_HWCAP2_ARM_SSBS )] = "ssbs", }; return bit < ARRAY_SIZE(hwcap_str) ? hwcap_str[bit] : NULL; @@ -696,6 +712,20 @@ enum { ARM_HWCAP2_A64_SME_B16F32 = 1 << 28, ARM_HWCAP2_A64_SME_F32F32 = 1 << 29, ARM_HWCAP2_A64_SME_FA64 = 1 << 30, + ARM_HWCAP2_A64_WFXT = 1ULL << 31, + ARM_HWCAP2_A64_EBF16 = 1ULL << 32, + ARM_HWCAP2_A64_SVE_EBF16 = 1ULL << 33, + ARM_HWCAP2_A64_CSSC = 1ULL << 34, + ARM_HWCAP2_A64_RPRFM = 1ULL << 35, + ARM_HWCAP2_A64_SVE2P1 = 1ULL << 36, + ARM_HWCAP2_A64_SME2 = 1ULL << 37, + ARM_HWCAP2_A64_SME2P1 = 1ULL << 38, + ARM_HWCAP2_A64_SME_I16I32 = 1ULL << 39, + ARM_HWCAP2_A64_SME_BI32I32 = 1ULL << 40, + ARM_HWCAP2_A64_SME_B16B16 = 1ULL << 41, + ARM_HWCAP2_A64_SME_F16F16 = 1ULL << 42, + ARM_HWCAP2_A64_MOPS = 1ULL << 43, + ARM_HWCAP2_A64_HBC = 1ULL << 44, }; #define ELF_HWCAP get_elf_hwcap() @@ -851,6 +881,20 @@ const char *elf_hwcap2_str(uint32_t bit) [__builtin_ctz(ARM_HWCAP2_A64_SME_B16F32 )] = "smeb16f32", [__builtin_ctz(ARM_HWCAP2_A64_SME_F32F32 )] = "smef32f32", [__builtin_ctz(ARM_HWCAP2_A64_SME_FA64 )] = "smefa64", + [__builtin_ctz(ARM_HWCAP2_A64_WFXT )] = "wfxt", + [__builtin_ctzll(ARM_HWCAP2_A64_EBF16 )] = "ebf16", + [__builtin_ctzll(ARM_HWCAP2_A64_SVE_EBF16 )] = "sveebf16", + [__builtin_ctzll(ARM_HWCAP2_A64_CSSC )] = "cssc", + [__builtin_ctzll(ARM_HWCAP2_A64_RPRFM )] = "rprfm", + [__builtin_ctzll(ARM_HWCAP2_A64_SVE2P1 )] = "sve2p1", + [__builtin_ctzll(ARM_HWCAP2_A64_SME2 )] = "sme2", + [__builtin_ctzll(ARM_HWCAP2_A64_SME2P1 )] = "sme2p1", + [__builtin_ctzll(ARM_HWCAP2_A64_SME_I16I32 )] = "smei16i32", + [__builtin_ctzll(ARM_HWCAP2_A64_SME_BI32I32)] = "smebi32i32", + [__builtin_ctzll(ARM_HWCAP2_A64_SME_B16B16 )] = "smeb16b16", + [__builtin_ctzll(ARM_HWCAP2_A64_SME_F16F16 )] = "smef16f16", + [__builtin_ctzll(ARM_HWCAP2_A64_MOPS )] = "mops", + [__builtin_ctzll(ARM_HWCAP2_A64_HBC )] = "hbc", }; return bit < ARRAY_SIZE(hwcap_str) ? hwcap_str[bit] : NULL; 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; } From patchwork Mon Sep 11 13:53:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 721468 Delivered-To: patch@linaro.org Received: by 2002:adf:f64d:0:b0:31d:da82:a3b4 with SMTP id x13csp1112703wrp; Mon, 11 Sep 2023 06:56:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHg+PtJp5SaIcKLejbWZmGdWbtunMp7PGykcQnYWzRYJNjMJ1Ttk7WO/PiCUTXglVSszaGu X-Received: by 2002:a0c:8c43:0:b0:64f:8415:cb76 with SMTP id o3-20020a0c8c43000000b0064f8415cb76mr8514244qvb.14.1694440568726; Mon, 11 Sep 2023 06:56:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694440568; cv=none; d=google.com; s=arc-20160816; b=LTGg+SVF3EpPxQikvbRoMHMlLFmiFDpiG93sxzCaA63SUmaSTLqmR3dMCu5ZVTdsE/ iRu6RvttKoHkkPvwV0lknVi6TEEjEKKplnNjI7XHASIORoBsqW4wJy4AX0k2XSHrhX46 M8GDilCzbpEguIrS2ZTI/FhsN/rj7OqBEAZKfdVbM1K6Scsrlqd6JlmwfTB8eQWHtk2e hStR2EhmBlkYFLMzMpVnAG0J3WmY2Ntf+Ifbbw9WmUiYDgnr3Jx4610AO3k9evkmAvY0 IQmz3ZMh4x7WiOFBnj/6mGI/gtxxO+lXga+RMsUcUhwC/QyUtBHtim1dq76nnKom3iKh E2VQ== 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=u1Sxay0lp7tBIXUdn25IytxwGH8GR+kgQRzldh5/VB4=; fh=H2AmuqulvQE+T5zu97MCEUC3z9wF9NssS7895NhR/+c=; b=mQnICRtHDXioUd1T/L44R3ibOe2Guzvw3G4BD9JeLc33suIVGPINaL1kF6fdURTTti FuXIr56T7EQhnsqA5UFtD6n+25GKx/XPrU1glMsfVDkihKX9WeQw4z5zVdmUqV1R7T93 1wUFuhXujVDjs28kY5FrSf6t/m06czU2Id3BWCkrPo9BJjHn3QwnIZiw0WsNcJT6XiSQ nQDKzLN7lGZ/+RmdicAwpYlMqUtR10uAi4x9FAqise+BUTEPvdfjM3Tewff9Jd1JXiBZ 4qRcXu3faofhZKnPA9kfcqs/jURH1/MB9PjosJ/2cxhvwp+oUE+xIol4uyV6/gw3hq/G mWfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BCfb8zw9; 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 r18-20020a0ccc12000000b0064f6ab4d034si4843017qvk.512.2023.09.11.06.56.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Sep 2023 06:56:08 -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=BCfb8zw9; 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 1qfhMV-0005qA-9S; Mon, 11 Sep 2023 09:53:59 -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 1qfhMT-0005oR-Qb for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:57 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfhMJ-0003AU-Qw for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:57 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-31f7400cb74so3635730f8f.2 for ; Mon, 11 Sep 2023 06:53:47 -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=u1Sxay0lp7tBIXUdn25IytxwGH8GR+kgQRzldh5/VB4=; b=BCfb8zw9jAvGrNBelKWG1jLTGU/fgpV2Ufd/fsFX5xrNyWAyaySnqpRU5SU0bQqqMC xdoxdDDSqYHlIuKoSvxoupY+zJE0U7POME5QdHUb4edp0I0FoP0fB0Vo8uq+GanNE7+F liFAAreGR9t1okaBuKra5i08V4ldw/YwQMUG7RdnOfDJ88lEDJhpyVXdAtk20TnrnQWM DwZvzgH3pl0tMZfJc+gYDo2cS7kqSsY6eQqIPrgnVpOLhfBy1/sISoTJLD7QceyJUI1o olusJbX/wSBYM9ULWCMRn8CToyVAjjJU507/GdXNYYWHC2qDtNCRm8H3Zw9DztMK/HVo Jb3Q== 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=u1Sxay0lp7tBIXUdn25IytxwGH8GR+kgQRzldh5/VB4=; b=SrClPXnzolXnRpPdV+4aFTh10CROAZSiJrwbEuLoOvJpQBWwMndRb2PNyrA55dpFv+ GqsjPHwZfFtkqE13xtRpaKrIZ8Q4XdGIW2hjOP47CruCazAXtUtfqc62mtml6cnFyIRv cVxaDXgdTflwIneaqVLyIy4wfs+Z5aNjdmiHro7puVPmrYxD/CMzQqQbMMow2NHUhuHG fqC3qPES0UkdmXMUOU7L/4xzMSQxfhIOKPnfNvxd4b54qKn2GSTWcew3g8lHcbtJIipI pZzuB9b9w9I4wSvO04nQNeKFTOBYAR3sJHSFDmFLNlGe+BIqjfxJtqdUcqLD6GX2wnCi wQFw== X-Gm-Message-State: AOJu0YwPbni6dRa4Zcb72IOGpgzptmOoTYOzv7L21XwbjUeV2R8n8Ht0 ZKcs15RNPVObqZRm7qm4Rd8qvA== X-Received: by 2002:adf:fc12:0:b0:31c:e933:9593 with SMTP id i18-20020adffc12000000b0031ce9339593mr8238197wrr.6.1694440425287; Mon, 11 Sep 2023 06:53:45 -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:45 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 5/7] target/arm: Update AArch64 ID register field definitions Date: Mon, 11 Sep 2023 14:53:38 +0100 Message-Id: <20230911135340.1139553-6-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::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-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, UPPERCASE_50_75=0.008 autolearn=no 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 Update our AArch64 ID register field definitions from the 2023-06 system register XML release: https://developer.arm.com/documentation/ddi0601/2023-06/ Signed-off-by: Peter Maydell --- This is intended to allow updating the set of ID register fields we expose for user-only mode, so I have only updated the AArch64 ID registers, not AArch32. --- target/arm/cpu.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index e637796fd83..eddf2d3b72c 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -2165,6 +2165,7 @@ FIELD(ID_AA64ISAR0, SHA1, 8, 4) FIELD(ID_AA64ISAR0, SHA2, 12, 4) FIELD(ID_AA64ISAR0, CRC32, 16, 4) FIELD(ID_AA64ISAR0, ATOMIC, 20, 4) +FIELD(ID_AA64ISAR0, TME, 24, 4) FIELD(ID_AA64ISAR0, RDM, 28, 4) FIELD(ID_AA64ISAR0, SHA3, 32, 4) FIELD(ID_AA64ISAR0, SM3, 36, 4) @@ -2199,6 +2200,13 @@ FIELD(ID_AA64ISAR2, APA3, 12, 4) FIELD(ID_AA64ISAR2, MOPS, 16, 4) FIELD(ID_AA64ISAR2, BC, 20, 4) FIELD(ID_AA64ISAR2, PAC_FRAC, 24, 4) +FIELD(ID_AA64ISAR2, CLRBHB, 28, 4) +FIELD(ID_AA64ISAR2, SYSREG_128, 32, 4) +FIELD(ID_AA64ISAR2, SYSINSTR_128, 36, 4) +FIELD(ID_AA64ISAR2, PRFMSLC, 40, 4) +FIELD(ID_AA64ISAR2, RPRFM, 48, 4) +FIELD(ID_AA64ISAR2, CSSC, 52, 4) +FIELD(ID_AA64ISAR2, ATS1A, 60, 4) FIELD(ID_AA64PFR0, EL0, 0, 4) FIELD(ID_AA64PFR0, EL1, 4, 4) @@ -2226,6 +2234,12 @@ FIELD(ID_AA64PFR1, SME, 24, 4) FIELD(ID_AA64PFR1, RNDR_TRAP, 28, 4) FIELD(ID_AA64PFR1, CSV2_FRAC, 32, 4) FIELD(ID_AA64PFR1, NMI, 36, 4) +FIELD(ID_AA64PFR1, MTE_FRAC, 40, 4) +FIELD(ID_AA64PFR1, GCS, 44, 4) +FIELD(ID_AA64PFR1, THE, 48, 4) +FIELD(ID_AA64PFR1, MTEX, 52, 4) +FIELD(ID_AA64PFR1, DF2, 56, 4) +FIELD(ID_AA64PFR1, PFAR, 60, 4) FIELD(ID_AA64MMFR0, PARANGE, 0, 4) FIELD(ID_AA64MMFR0, ASIDBITS, 4, 4) @@ -2257,6 +2271,7 @@ FIELD(ID_AA64MMFR1, AFP, 44, 4) FIELD(ID_AA64MMFR1, NTLBPA, 48, 4) FIELD(ID_AA64MMFR1, TIDCP1, 52, 4) FIELD(ID_AA64MMFR1, CMOW, 56, 4) +FIELD(ID_AA64MMFR1, ECBHB, 60, 4) FIELD(ID_AA64MMFR2, CNP, 0, 4) FIELD(ID_AA64MMFR2, UAO, 4, 4) @@ -2278,7 +2293,9 @@ FIELD(ID_AA64DFR0, DEBUGVER, 0, 4) FIELD(ID_AA64DFR0, TRACEVER, 4, 4) FIELD(ID_AA64DFR0, PMUVER, 8, 4) FIELD(ID_AA64DFR0, BRPS, 12, 4) +FIELD(ID_AA64DFR0, PMSS, 16, 4) FIELD(ID_AA64DFR0, WRPS, 20, 4) +FIELD(ID_AA64DFR0, SEBEP, 24, 4) FIELD(ID_AA64DFR0, CTX_CMPS, 28, 4) FIELD(ID_AA64DFR0, PMSVER, 32, 4) FIELD(ID_AA64DFR0, DOUBLELOCK, 36, 4) @@ -2286,6 +2303,7 @@ FIELD(ID_AA64DFR0, TRACEFILT, 40, 4) FIELD(ID_AA64DFR0, TRACEBUFFER, 44, 4) FIELD(ID_AA64DFR0, MTPMU, 48, 4) FIELD(ID_AA64DFR0, BRBE, 52, 4) +FIELD(ID_AA64DFR0, EXTTRCBUFF, 56, 4) FIELD(ID_AA64DFR0, HPMN0, 60, 4) FIELD(ID_AA64ZFR0, SVEVER, 0, 4) @@ -2299,9 +2317,13 @@ FIELD(ID_AA64ZFR0, F32MM, 52, 4) FIELD(ID_AA64ZFR0, F64MM, 56, 4) FIELD(ID_AA64SMFR0, F32F32, 32, 1) +FIELD(ID_AA64SMFR0, BI32I32, 33, 1) FIELD(ID_AA64SMFR0, B16F32, 34, 1) FIELD(ID_AA64SMFR0, F16F32, 35, 1) FIELD(ID_AA64SMFR0, I8I32, 36, 4) +FIELD(ID_AA64SMFR0, F16F16, 42, 1) +FIELD(ID_AA64SMFR0, B16B16, 43, 1) +FIELD(ID_AA64SMFR0, I16I32, 44, 4) FIELD(ID_AA64SMFR0, F64F64, 48, 1) FIELD(ID_AA64SMFR0, I16I64, 52, 4) FIELD(ID_AA64SMFR0, SMEVER, 56, 4) From patchwork Mon Sep 11 13:53:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 721466 Delivered-To: patch@linaro.org Received: by 2002:adf:f64d:0:b0:31d:da82:a3b4 with SMTP id x13csp1112588wrp; Mon, 11 Sep 2023 06:55:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFv9TkFcSky7s12ghW408p4p46OTYhzAZxNgHyqfLDEqzxErIlm0q/R1kK6pUyKJ8uxvmSw X-Received: by 2002:a67:ef8c:0:b0:44d:590d:28a6 with SMTP id r12-20020a67ef8c000000b0044d590d28a6mr8801179vsp.27.1694440549469; Mon, 11 Sep 2023 06:55:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694440549; cv=none; d=google.com; s=arc-20160816; b=0uQsMrtlM0fIVeXEvYEd6+WasE6EwhCLSVX5DS/kad9Y0zbU60kXS51yXoT6qRGd1Y neNalT6YajL+dZBVxF9VOw8fxkJoZTM32bxw/CkwlGCypeYW5xpFlK14ZxYQzMCH4JBL S+ivP7W2RbfA5IfknOwhwoL1cigHfKImEUvTCZe2Ncj6j+Eg50NrUjlRHT7zuMPQkXB4 75gR/ue14hfWt3ATJ2VNS42/InKTcwX9pMYD9rJ4xwZEMrtVOEURU+MjF/wmPDJ7dJtG YMxDXdOLZgokbQhsRz1m0ZaWtuSRnHPMSTytlQuylD10TQwh2TutXXWcgeCbahXqd6gB yonA== 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=ELrRVF0tIk1TLgBNd5bg7VAVQK5daGM7tIeCJh5jEMU=; fh=H2AmuqulvQE+T5zu97MCEUC3z9wF9NssS7895NhR/+c=; b=R03W9QqryvrsoyQwQ5bxJ4rk6G62xPklxZCBMjvdrnQySVpX6NT/LJamKN9tpn/Vnj 4o/rc55ntAUut4avD/8kXIOlA1UUWSCbZptn4AlqHB14pEtTcsn6xDj4Lq6/JhpxWU5t C1X5KwIISVzifPeksXdIR/LvzPfVspZT5u+QddPwR3/rVAmcgH3+JYpJ3naDtyCcvGn/ AMRygPZaTFjYSKN8kPhAPABviZjwc5Nkh2WJJ7IaU4T/zyMbbWXfQCq8+uwcC2CgazIb OFBI71vrnqIOSLo13AWKfz+EKPq0J7ubAq6zsNIEZ2MT+HIYnoPEcw3o7P45roDOxcH2 ilOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LTLU7aUn; 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 v13-20020a05622a130d00b0040fd25c76e5si4660261qtk.586.2023.09.11.06.55.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Sep 2023 06:55:49 -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=LTLU7aUn; 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 1qfhMV-0005qp-TV; Mon, 11 Sep 2023 09:53:59 -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 1qfhMS-0005kC-CF for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:56 -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 1qfhMJ-0003Af-Em for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:56 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-31f7638be6eso3706259f8f.3 for ; Mon, 11 Sep 2023 06:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694440426; x=1695045226; 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=ELrRVF0tIk1TLgBNd5bg7VAVQK5daGM7tIeCJh5jEMU=; b=LTLU7aUnq2AuqEJe0QjTzCJwvXz80xLixsWleczvAvCgRxOFwR1hwezK7vjSxA8ump o+y5C3QHOZardEBVMciNtYDdyZFv3drFq6CGt0uXhQwjglAD+j+W+kusHtH7R/Sr1wu0 G0dRcT7FnifGewY6Oy99OSavUjZ0MnPEPchIQ3L2MjrTuFvKPUQ1NrREZPjhVh53WHQ7 +ysStX6mBbkMisUllcKCzWf1wi4Exb++5oAEjcttJdkhkmphAhp0rQd2PVKt5lQch2I1 6pVQdmWtnzvWNjKbiyaPoHUxavcUP3t508pv7Nm0gHWoxdDOiBDtm9sx50XcCm0uqtqo RS5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694440426; x=1695045226; 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=ELrRVF0tIk1TLgBNd5bg7VAVQK5daGM7tIeCJh5jEMU=; b=dR/wCrr7wbjvk7qd4omks3emapnXAQhQ1tcl6JsUBIEpjVeSvSLoFP49NNn78AML1/ cVV5IhD8vRq2zIocjkvSb4A6vNOY4V7nriTXIi4o9OO4HhJncgLnU+avauqiTKzcPshT DjxjDNDqLPkJSnPIkgxFVqYzbIKQcj+0KPFk5PAhiJjz+ZVUDqFBXUb5+WauWgLmDh+n J7uBb75Dlc3J9iZUmyZq74rCpa7o24yrclewkvtr3mnQcQdVGCU7aH1O2921oTOO4UCH mliTnmeYGv0Xj4HIy94iHg9uL689aPRem8HG6oN8C9ZtAn5yUxxb2rGVdgF/p58UGqeo /yYA== X-Gm-Message-State: AOJu0YzDhvu12ZVuUBPkgVsmFuN2mvm1gAK+A5tXOipGXSjb3pk//vnR P2GhhRFUWEonW1t0WTRZZWo1SlPpNIoUFKkl6Qs= X-Received: by 2002:adf:fdc2:0:b0:317:5d1c:9719 with SMTP id i2-20020adffdc2000000b003175d1c9719mr8571670wrs.9.1694440425944; Mon, 11 Sep 2023 06:53:45 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 06:53:45 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 6/7] target/arm: Update user-mode ID reg mask values Date: Mon, 11 Sep 2023 14:53:39 +0100 Message-Id: <20230911135340.1139553-7-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=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 For user-only mode we reveal a subset of the AArch64 ID registers to the guest, to emulate the kernel's trap-and-emulate-ID-regs handling. Update the feature bit masks to match upstream kernel commit a48fa7efaf1161c1c. None of these features are yet implemented by QEMU, so this doesn't yet have a behavioural change, but implementation of FEAT_MOPS and FEAT_HBC is imminent. Signed-off-by: Peter Maydell --- target/arm/helper.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index f9f7c3c39e9..ad84fcf041d 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -8621,11 +8621,16 @@ void register_cp_regs_for_features(ARMCPU *cpu) R_ID_AA64ZFR0_F64MM_MASK }, { .name = "ID_AA64SMFR0_EL1", .exported_bits = R_ID_AA64SMFR0_F32F32_MASK | + R_ID_AA64SMFR0_BI32I32_MASK | R_ID_AA64SMFR0_B16F32_MASK | R_ID_AA64SMFR0_F16F32_MASK | R_ID_AA64SMFR0_I8I32_MASK | + R_ID_AA64SMFR0_F16F16_MASK | + R_ID_AA64SMFR0_B16B16_MASK | + R_ID_AA64SMFR0_I16I32_MASK | R_ID_AA64SMFR0_F64F64_MASK | R_ID_AA64SMFR0_I16I64_MASK | + R_ID_AA64SMFR0_SMEVER_MASK | R_ID_AA64SMFR0_FA64_MASK }, { .name = "ID_AA64MMFR0_EL1", .exported_bits = R_ID_AA64MMFR0_ECV_MASK, @@ -8676,7 +8681,11 @@ void register_cp_regs_for_features(ARMCPU *cpu) .exported_bits = R_ID_AA64ISAR2_WFXT_MASK | R_ID_AA64ISAR2_RPRES_MASK | R_ID_AA64ISAR2_GPA3_MASK | - R_ID_AA64ISAR2_APA3_MASK }, + R_ID_AA64ISAR2_APA3_MASK | + R_ID_AA64ISAR2_MOPS_MASK | + R_ID_AA64ISAR2_BC_MASK | + R_ID_AA64ISAR2_RPRFM_MASK | + R_ID_AA64ISAR2_CSSC_MASK }, { .name = "ID_AA64ISAR*_EL1_RESERVED", .is_glob = true }, }; From patchwork Mon Sep 11 13:53:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 721467 Delivered-To: patch@linaro.org Received: by 2002:adf:f64d:0:b0:31d:da82:a3b4 with SMTP id x13csp1112598wrp; Mon, 11 Sep 2023 06:55:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF60OZawor41r5Tizj4TUQyQ33R7rNtcufIr5lFAqW5NZck3KPSZRtCmj6LL6xb2fFg4eEj X-Received: by 2002:a0c:dd93:0:b0:64f:802b:7e05 with SMTP id v19-20020a0cdd93000000b0064f802b7e05mr9431413qvk.34.1694440551184; Mon, 11 Sep 2023 06:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694440551; cv=none; d=google.com; s=arc-20160816; b=wPCVW/JLkoBbmYmNmV2dvRV05cpqfo5jMMREk5AecZcggJeoxAqn1tqpGirCedz2PQ N0jiO1qbY+jhRIJjrggz/ceuLb66VGedVOHqn76hBKm3/VBy0vJCYCnKt2S7z07aqITS FFJPq8GPt43wHExLgxyUkT4A8nrtiwkivKJCxNF7rAOFblYVWLqZ8DKplHJBkMQ6aVoQ ZMa/dcATJrWMxlr7xp8+4S+KdS5qQz3f8TN0U1oAnXTDAmIT3f/VVxSnDUELG9MeAhHe m4ktIiZQz29KKOLIY9vnEK63mddkK8uZ2AoHvEaKtBeLHIlyjAMvJ/9oQcXay/ft23Sl HXkQ== 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=1SPaLFJICW9q9gqa6qvPwlUkb8XaROQF8dYUvvHc24Q=; fh=H2AmuqulvQE+T5zu97MCEUC3z9wF9NssS7895NhR/+c=; b=eC3OAfbm2FKHn+AneaPt6BVfKxLI4vr6YVWYGYBTu8rMXsYKj9SuInQ1kVE8O2vJt6 nXnrEE3lAdSTHuqUTErpGmMRzhhHaE0p0KlJcxYLAwfED8foXJgWYc2BvhCr8kI7UATv Cddi6kDMwFksasPMFSMfZuCZoJttNcs6zW7UFRDdBc2ww9xBjY+dX4JPYTibrSMXmi0P PS+XKDLP1WyG8caKS0PdUUvCZ4wGz00Or0t5xBTlvAHdNYJmYDUo7lJ7BiwuQlTfwZWx AXWhGDQcRHuXVTBVh+DzhXHpJX6dBM73hmSQeHh1NOL4C1XDMw4WLaIcrczhzCTdq4ik tXag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XvgKZ50R; 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 q13-20020a0ce20d000000b0064711ddd2acsi4771308qvl.356.2023.09.11.06.55.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Sep 2023 06:55:51 -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=XvgKZ50R; 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 1qfhMV-0005qJ-B1; Mon, 11 Sep 2023 09:53:59 -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 1qfhMU-0005pU-GO for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:58 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfhMJ-0003Am-Ts for qemu-devel@nongnu.org; Mon, 11 Sep 2023 09:53:58 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-31fa666000dso1047326f8f.2 for ; Mon, 11 Sep 2023 06:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694440426; x=1695045226; 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=1SPaLFJICW9q9gqa6qvPwlUkb8XaROQF8dYUvvHc24Q=; b=XvgKZ50R8Dbc3FCeJtRahF+ujCToUeWldnj/USmBXiW4NOsH6Nwor2OO95xjHll+hi YrUaijJSzaIbIagjDVXj3MrJdfvGxxQeCuCjZb1VTYvxqgEBjxyn/9XKXi724OuI3mY2 pufSNFviwK01r+UWVT7DBq6Oq726gHb/hncvlFv25mTGJkFNVilXpLwYkPEgVScLjHju lrkxQVNYJCmk1Q4K8LDwqe1tWkuq3LP6+jG/Nf8wahLACRWvH0J9Kcby7jsW5Z+j84zj 1xe/95lGeEW3UftyI5Wkze5tqF9kEuaO+NUOzoOjlgSEXDFOWwW2bzdxq7NVHSpQSZd1 ndqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694440426; x=1695045226; 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=1SPaLFJICW9q9gqa6qvPwlUkb8XaROQF8dYUvvHc24Q=; b=PXGLPJmEfNKmROmbsMfkVOOB88uhjvNr/sepA1G5ExVYNww30OqdMyoI+/N+2V/BvG 0kUtIMUV4xUeBNCizCR0bc2FmDMIephgERY5cjbaIzl52x0AIY4iqWoFAL+Zv70+Sxh/ W5f5P6028JvkcQ0EPEqdiy7mXDZkMPK9drSy1aBrOH544VUHz6h7JGFDLYU+6eKprUjG c5nhCuGXWznzidHn4X+1yVGYOQSyDioG3SeIAndWfhQyc8zLhx8ahLLIDkGFIBpWDhm6 lc6Ffx+Lj5ErTcHMJkW/hxXZypXWJs0WHuwRwCz8CbSso/smgV0yhktfqGZo9l3r1D5o NvWQ== X-Gm-Message-State: AOJu0Yw1TfQWIU8eXPdskDP14RL5xSQuJoLDZL9WTmUxeRONSUoBlfNw 4ER9AYzzhhaF+FifoifbXsoO/MFfgC5fZyv+QAc= X-Received: by 2002:a5d:5744:0:b0:31a:e972:3601 with SMTP id q4-20020a5d5744000000b0031ae9723601mr8458561wrw.54.1694440426494; Mon, 11 Sep 2023 06:53:46 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 06:53:46 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 7/7] target/arm: Implement FEAT_HBC Date: Mon, 11 Sep 2023 14:53:40 +0100 Message-Id: <20230911135340.1139553-8-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::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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 FEAT_HBC (Hinted conditional branches) provides a new instruction BC.cond, which behaves exactly like the existing B.cond except that it provides a hint to the branch predictor about the likely behaviour of the branch. Since QEMU does not implement branch prediction, we can treat this identically to B.cond. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- docs/system/arm/emulation.rst | 1 + target/arm/cpu.h | 5 +++++ target/arm/tcg/a64.decode | 3 ++- linux-user/elfload.c | 1 + target/arm/tcg/cpu64.c | 4 ++++ target/arm/tcg/translate-a64.c | 4 ++++ 6 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index 2e6a7c8961e..34429054a3f 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -39,6 +39,7 @@ the following architecture extensions: - FEAT_FlagM2 (Enhancements to flag manipulation instructions) - FEAT_GTG (Guest translation granule size) - FEAT_HAFDBS (Hardware management of the access flag and dirty bit state) +- FEAT_HBC (Hinted conditional branches) - FEAT_HCX (Support for the HCRX_EL2 register) - FEAT_HPDS (Hierarchical permission disables) - FEAT_HPDS2 (Translation table page-based hardware attributes) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index eddf2d3b72c..fc45f1fb9e2 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -4050,6 +4050,11 @@ static inline bool isar_feature_aa64_i8mm(const ARMISARegisters *id) return FIELD_EX64(id->id_aa64isar1, ID_AA64ISAR1, I8MM) != 0; } +static inline bool isar_feature_aa64_hbc(const ARMISARegisters *id) +{ + return FIELD_EX64(id->id_aa64isar2, ID_AA64ISAR2, BC) != 0; +} + static inline bool isar_feature_aa64_tgran4_lpa2(const ARMISARegisters *id) { return FIELD_SEX64(id->id_aa64mmfr0, ID_AA64MMFR0, TGRAN4) >= 1; diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode index ef64a3f9cba..71113173020 100644 --- a/target/arm/tcg/a64.decode +++ b/target/arm/tcg/a64.decode @@ -126,7 +126,8 @@ CBZ sf:1 011010 nz:1 ................... rt:5 &cbz imm=%imm19 TBZ . 011011 nz:1 ..... .............. rt:5 &tbz imm=%imm14 bitpos=%imm31_19 -B_cond 0101010 0 ................... 0 cond:4 imm=%imm19 +# B.cond and BC.cond +B_cond 0101010 0 ................... c:1 cond:4 imm=%imm19 BR 1101011 0000 11111 000000 rn:5 00000 &r BLR 1101011 0001 11111 000000 rn:5 00000 &r diff --git a/linux-user/elfload.c b/linux-user/elfload.c index bbb4f08109c..203a2b790d5 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -815,6 +815,7 @@ uint32_t get_elf_hwcap2(void) GET_FEATURE_ID(aa64_sme_f64f64, ARM_HWCAP2_A64_SME_F64F64); GET_FEATURE_ID(aa64_sme_i16i64, ARM_HWCAP2_A64_SME_I16I64); GET_FEATURE_ID(aa64_sme_fa64, ARM_HWCAP2_A64_SME_FA64); + GET_FEATURE_ID(aa64_hbc, ARM_HWCAP2_A64_HBC); return hwcaps; } diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c index 0f8972950d6..90e033bbc3a 100644 --- a/target/arm/tcg/cpu64.c +++ b/target/arm/tcg/cpu64.c @@ -814,6 +814,10 @@ void aarch64_max_tcg_initfn(Object *obj) t = FIELD_DP64(t, ID_AA64ISAR1, I8MM, 1); /* FEAT_I8MM */ cpu->isar.id_aa64isar1 = t; + t = cpu->isar.id_aa64isar2; + t = FIELD_DP64(t, ID_AA64ISAR2, BC, 1); /* FEAT_HBC */ + cpu->isar.id_aa64isar2 = t; + t = cpu->isar.id_aa64pfr0; t = FIELD_DP64(t, ID_AA64PFR0, FP, 1); /* FEAT_FP16 */ t = FIELD_DP64(t, ID_AA64PFR0, ADVSIMD, 1); /* FEAT_FP16 */ diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 0b77c92437f..15eca55fc75 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -1453,6 +1453,10 @@ static bool trans_TBZ(DisasContext *s, arg_tbz *a) static bool trans_B_cond(DisasContext *s, arg_B_cond *a) { + /* BC.cond is only present with FEAT_HBC */ + if (a->c && !dc_isar_feature(aa64_hbc, s)) { + return false; + } reset_btype(s); if (a->cond < 0x0e) { /* genuinely conditional branches */