From nobody Tue Feb 10 06:43:48 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1655751898; cv=none; d=zohomail.com; s=zohoarc; b=A11s9L4pdplP5EnBAWyI6mK5iu+lwmcRsVamn21/j9k8Aqm1h4hgDgiaZ+ss3NKvmEUG4Q9+ly4KryyAz60rH7O6XqdAmi2gM2eU4m/FF0qNpv0st9yeWPgZ5BhfGmvy6Iaf/YAuAs6tKFWnHwu+8DUDjfL6kSB/LCIViPDL3WU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1655751898; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3nuS/o5N0jY1sctqPNAwUS/VxwGp/HFm2vpuT3BHgTM=; b=WjBygkzCTrG+PWaZnEFaDPaBxYurXBgfYHqNV8ISNR83RF8UaUJEz0emD7QvsN2nDKcVkP9LIlTAxw1s2l08VhD6ckZt00cFNlq3e6kQ+dTMKiLJa9fkOpc4tK4thP5U2LTDBpUEcp426o3x8MxAgPIgF9XbOImmSuGFo7ksdyw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1655751898847554.2443768810265; Mon, 20 Jun 2022 12:04:58 -0700 (PDT) Received: from localhost ([::1]:59646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3Mhl-0002vg-MG for importer@patchew.org; Mon, 20 Jun 2022 15:04:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3LaO-0006OX-C0 for qemu-devel@nongnu.org; Mon, 20 Jun 2022 13:53:18 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]:42726) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3LaI-0001Ws-0f for qemu-devel@nongnu.org; Mon, 20 Jun 2022 13:53:13 -0400 Received: by mail-pf1-x434.google.com with SMTP id d17so1903664pfq.9 for ; Mon, 20 Jun 2022 10:53:09 -0700 (PDT) Received: from stoup.. ([2602:47:d49e:3c01:a3e0:8a80:7b85:aea6]) by smtp.gmail.com with ESMTPSA id j14-20020aa7928e000000b00525133f98adsm5138138pfa.146.2022.06.20.10.53.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 10:53:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3nuS/o5N0jY1sctqPNAwUS/VxwGp/HFm2vpuT3BHgTM=; b=gACsrSkEIbXBFWUJ0MTV1dinp9/Zho40qd5qjo8gEHGdmZitXiMl8l0LvRS0bU9a6R cJJFlA15xZ9esKRj++CcyoyVAuXpkKrZF0BoJD/6qzZM+kMNeLMZT0OdOKjP459UA4dn aJyl7CytzCEhlCjkNzlW4ToXqKkrtJhqJJ3NBTChm5DWpFBGyxuHf9bpBsPala9Q5Cgf F6Wqy17oW7JJ+CETvVbFDoro5ToWI8ZQ+ml9I783aaOcu00cq42ppZBEUp2zC4Y7tvW0 pLoGwHg6pqqf76kMGPC9T9ab0S17Fv6okV4pbzqhI79sliOPy6G54bNV6cW/q5z7iqVy IYHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3nuS/o5N0jY1sctqPNAwUS/VxwGp/HFm2vpuT3BHgTM=; b=XoGrjXrmCEQtXzZnB4DLz58lqiRPkwD4TwJEnQyhClgfcjS2d13qWMtXIf90IDAfoQ lxqJ99ladb4jVDmglUSCpJBRggicuH5EELsOPKtrvd0Z6GE8AZsarz8xFBAZpYBdTzoN wI5ldPxRXLfpSOVmFtHY8pnEisdvezXwtnxfOH855GB3AMc149h++kil+Z48OGk3JnRz Sxndh3Jtifmeq81qBqIj+DJf/LpT+u19cJMi1Em30VdAprHuORgjWhqqobBSSUtKjTAV m8h2wb26FKDnAH9I4Tp8PjBk+AY79/urAC614l6yOwAa8aTO33gAx2bufUIKDxfeunV/ kuow== X-Gm-Message-State: AJIora/FTTZrdOJinM6ASAtRNorgtIumOcCoA870ZM0QmvBC405jT1Xm /RizIFilOsP4SiHiGh735WuHfWdgDAWMjg== X-Google-Smtp-Source: AGRyM1vXemZctG1JjKUhjC34FIh/jwDFkzWti8PCsN4zcHaynOkwccvTUjPd36m0p5oNWZLqqYhptA== X-Received: by 2002:a05:6a00:21c8:b0:4c4:4bd:dc17 with SMTP id t8-20020a056a0021c800b004c404bddc17mr25931294pfj.57.1655747589237; Mon, 20 Jun 2022 10:53:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH v3 38/51] target/arm: Enable SME for -cpu max Date: Mon, 20 Jun 2022 10:52:22 -0700 Message-Id: <20220620175235.60881-39-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220620175235.60881-1-richard.henderson@linaro.org> References: <20220620175235.60881-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1655751900759100001 Content-Type: text/plain; charset="utf-8" Note that SME remains effectively disabled for user-only, because we do not yet set CPACR_EL1.SMEN. This needs to wait until the kernel ABI is implemented. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- docs/system/arm/emulation.rst | 4 ++++ target/arm/cpu64.c | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/docs/system/arm/emulation.rst b/docs/system/arm/emulation.rst index 83b4410065..8e494c8bea 100644 --- a/docs/system/arm/emulation.rst +++ b/docs/system/arm/emulation.rst @@ -65,6 +65,10 @@ the following architecture extensions: - FEAT_SHA512 (Advanced SIMD SHA512 instructions) - FEAT_SM3 (Advanced SIMD SM3 instructions) - FEAT_SM4 (Advanced SIMD SM4 instructions) +- FEAT_SME (Scalable Matrix Extension) +- FEAT_SME_FA64 (Full A64 instruction set in Streaming SVE mode) +- FEAT_SME_F64F64 (Double-precision floating-point outer product instructi= ons) +- FEAT_SME_I16I64 (16-bit to 64-bit integer widening outer product instruc= tions) - FEAT_SPECRES (Speculation restriction instructions) - FEAT_SSBS (Speculative Store Bypass Safe) - FEAT_TLBIOS (TLB invalidate instructions in Outer Shareable domain) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 19188d6cc2..40a0f043d0 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -1018,6 +1018,7 @@ static void aarch64_max_initfn(Object *obj) */ t =3D FIELD_DP64(t, ID_AA64PFR1, MTE, 3); /* FEAT_MTE3 */ t =3D FIELD_DP64(t, ID_AA64PFR1, RAS_FRAC, 0); /* FEAT_RASv1p1 + FEAT= _DoubleFault */ + t =3D FIELD_DP64(t, ID_AA64PFR1, SME, 1); /* FEAT_SME */ t =3D FIELD_DP64(t, ID_AA64PFR1, CSV2_FRAC, 0); /* FEAT_CSV2_2 */ cpu->isar.id_aa64pfr1 =3D t; =20 @@ -1068,6 +1069,16 @@ static void aarch64_max_initfn(Object *obj) t =3D FIELD_DP64(t, ID_AA64DFR0, PMUVER, 5); /* FEAT_PMUv3p4 */ cpu->isar.id_aa64dfr0 =3D t; =20 + t =3D cpu->isar.id_aa64smfr0; + t =3D FIELD_DP64(t, ID_AA64SMFR0, F32F32, 1); /* FEAT_SME */ + t =3D FIELD_DP64(t, ID_AA64SMFR0, B16F32, 1); /* FEAT_SME */ + t =3D FIELD_DP64(t, ID_AA64SMFR0, F16F32, 1); /* FEAT_SME */ + t =3D FIELD_DP64(t, ID_AA64SMFR0, I8I32, 0xf); /* FEAT_SME */ + t =3D FIELD_DP64(t, ID_AA64SMFR0, F64F64, 1); /* FEAT_SME_F64F64 */ + t =3D FIELD_DP64(t, ID_AA64SMFR0, I16I64, 0xf); /* FEAT_SME_I16I64 */ + t =3D FIELD_DP64(t, ID_AA64SMFR0, FA64, 1); /* FEAT_SME_FA64 */ + cpu->isar.id_aa64smfr0 =3D t; + /* Replicate the same data to the 32-bit id registers. */ aa32_max_features(cpu); =20 --=20 2.34.1