From nobody Sat May 2 03:23:54 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1751627859; cv=none; d=zohomail.com; s=zohoarc; b=Sw84o3Mtn9DKrNd5jlbaIjmy/jHdE8A9SNakA0/pA2SRPTlidCuK0rcmfNss2+TXX/4f8Ezg1MajssL21m+ViG5ISkxUsshoYa2LOpK4I9DDVVTz/mbFtpAu0HkHgcRsb/FstFRJ2q7xSh0kvftnxSSKx7MLGjr+9Wnx6dH+snY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1751627859; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QqWQWEbZK5lXCGuAyvlGEuyQ0XlOT+jS4umfC5xFEl8=; b=N7MwbUxkX3cRKk3ggq+MNAcfb9uE25aesCN0ZMFlCCF2blRP/Raqn4p3wOPpeZ8DxbPve9xFEK+zck92PiCgxKaOrQon+8Jn9orxMw18meajBuAq+9Njko7PetIcAXB9cUXnIvEHqk5WIvFTL9M2rpANzLuU12JjM+JZZXS1zKY= 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 1751627859965384.3744159684966; Fri, 4 Jul 2025 04:17:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uXeMo-0003m0-BH; Fri, 04 Jul 2025 07:14:06 -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 1uXeLx-0002Gw-9Y for qemu-devel@nongnu.org; Fri, 04 Jul 2025 07:13:13 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uXeLv-0003Dk-Iw for qemu-devel@nongnu.org; Fri, 04 Jul 2025 07:13:13 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-235ea292956so8658915ad.1 for ; Fri, 04 Jul 2025 04:13:11 -0700 (PDT) Received: from toolbx.alistair23.me (2403-580b-97e8-0-82ce-f179-8a79-69f4.ip6.aussiebb.net. [2403:580b:97e8:0:82ce:f179:8a79:69f4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-23c8431a206sm18002655ad.28.2025.07.04.04.13.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jul 2025 04:13:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1751627590; x=1752232390; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QqWQWEbZK5lXCGuAyvlGEuyQ0XlOT+jS4umfC5xFEl8=; b=VzDlO64O/PVlVkqFVH1w2rOejZqc7vjhn33RyNBgmKqX8msXocTowqJ9BOd3fdIRPH LT7KRg1WClRKsz68sfclWFYSsyVw2nHCVnBfp6Z2jIs7zj5cNIJN7kU+GdULNl/rQzTL v3JpDaGS/rDMVizoK95oIuu7iIsyPHjWI3GFOJzJw111iQWDT+qjrp4K+lqSdJvA6Gdr iLCmHMvB0vZBVxM0/i14g+9A5Jik7CzJwrrc0TEhcybatHLa/N+1+4OH64X2N2p5blnc 8W56XKFhb3cvmO5raHxFSXNagY5TZsICD5CYorDn6LgPlsdkWjZaE80sinKaexE1/GTL 5VXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751627590; x=1752232390; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QqWQWEbZK5lXCGuAyvlGEuyQ0XlOT+jS4umfC5xFEl8=; b=iHUVOd+n7AILe7CmUBPLrbpD0dQ+s9rukWVUgaKlXXvYrM4qn5gW/fXXuocuyTLCzG +lprIC6cuV0vRvNlrZVYFArnSb144Q9MYsz2C7cTf8i/W55l+Da2vUxDR6a/22RYDlJl Azw7a3k+fcgb0WKi/5qizRFZ8P8cbg+INb0UaqjDflZSBSLBo/ZbAW5CgkzyymmabzFA b6G+jLHungTJK2A80kdYSILna0DCEkwv0jBzjfDGQMf6ZYLpJiNRvMty6Vm3sZMqQfZ1 aw9D2uwyHgOeHGDJHl1TnT57Y4aaYeNGTAwD6FuvWRc4KOfNDNDF84UdeqifWqTKpElQ cMkQ== X-Gm-Message-State: AOJu0Ywr5eanG7NNAoBk9ywLR2Wr7dBRLBBDMQ8v2gFueljQwy+fX3HK IdX8c088e/AHwhLQfDCUmsK1AFiots1ITi7xu3ug3TSnQ4Y1/NDgGTLTjFnfNA== X-Gm-Gg: ASbGncuVrw6l1FO59daKaLeZ1Sy9r6pSuFJF1QMSS4jFiaHNvwQZX5rpMQIwwwz0srP DevMa3/2TY4gNTiq3sdKf1GUR3oXqxaLR0UQ9q2bNd2ZfFTDuBehqTN6RExVNvTZnOS1P/hlVOe /VqvC4601O1hd34xPcA4LrRRi4xbPvSzE7n/15X+a63v9vhi3qwkgciL384MJH4dilyk+QtCD6S /KpaC1MfEmQwcDG9/lZhV4yJvKY02eJlR1geAQ4AohZeTRbLJb7MT+dlpc3H+2iMoHak3MsAGxd 4KxyoERmoB6moIo8EPIuoV28p0L7O33IyMJAzQ9tWTFoOHb0KSaNoCq9DcgIy1rPUS7oymyuUMC aZPmxrkh6g560Cftr/p1peK9vjxhWqlmZmEhlkyJcl5Wwx/lEVK2Z/f+sNZqavwVnHoo= X-Google-Smtp-Source: AGHT+IGowoUlWTjDdaszaB4+AC6dZ3HqXK+72eiQjT4Jhg3ult4abxcQNo/ey4IjCgpTpLt7AXGXsg== X-Received: by 2002:a17:902:ce89:b0:234:d7b2:2ab9 with SMTP id d9443c01a7336-23c87472898mr28785735ad.12.1751627589663; Fri, 04 Jul 2025 04:13:09 -0700 (PDT) From: alistair23@gmail.com X-Google-Original-From: alistair.francis@wdc.com To: qemu-devel@nongnu.org Cc: alistair23@gmail.com, Daniel Henrique Barboza , Alistair Francis Subject: [PULL 13/40] target/riscv/cpu.c: do better with 'named features' doc Date: Fri, 4 Jul 2025 21:11:40 +1000 Message-ID: <20250704111207.591994-14-alistair.francis@wdc.com> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250704111207.591994-1-alistair.francis@wdc.com> References: <20250704111207.591994-1-alistair.francis@wdc.com> 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::635; envelope-from=alistair23@gmail.com; helo=mail-pl1-x635.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1751627861158116600 Content-Type: text/plain; charset="utf-8" From: Daniel Henrique Barboza Most of the named features are added directly in isa_edata_arr[], some of them are also added in riscv_cpu_named_features(). There is a reason for that, and the existing docs can do better explaining it. Signed-off-by: Daniel Henrique Barboza Message-ID: <20250529202315.1684198-4-dbarboza@ventanamicro.com> Acked-by: Alistair Francis Message-ID: <20250604174329.1147549-4-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis --- target/riscv/cpu.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 626b0b8b26..bf14256a61 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1377,13 +1377,23 @@ const RISCVCPUMultiExtConfig riscv_cpu_experimental= _exts[] =3D { * 'Named features' is the name we give to extensions that we * don't want to expose to users. They are either immutable * (always enabled/disable) or they'll vary depending on - * the resulting CPU state. They have riscv,isa strings - * and priv_ver like regular extensions. + * the resulting CPU state. + * + * Some of them are always enabled depending on priv version + * of the CPU and are declared directly in isa_edata_arr[]. + * The ones listed here have special checks during finalize() + * time and require their own flags like regular extensions. + * See riscv_cpu_update_named_features() for more info. */ const RISCVCPUMultiExtConfig riscv_cpu_named_features[] =3D { MULTI_EXT_CFG_BOOL("zic64b", ext_zic64b, true), MULTI_EXT_CFG_BOOL("ssstateen", ext_ssstateen, true), MULTI_EXT_CFG_BOOL("sha", ext_sha, true), + + /* + * 'ziccrse' has its own flag because the KVM driver + * wants to enable/disable it on its own accord. + */ MULTI_EXT_CFG_BOOL("ziccrse", ext_ziccrse, true), =20 { }, --=20 2.50.0