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 }, };