From nobody Tue Feb 10 12:58:05 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 ARC-Seal: i=1; a=rsa-sha256; t=1689356686; cv=none; d=zohomail.com; s=zohoarc; b=e5FHeveZJObuNaXzzNqfzeqwRM90PEjYNzELI+NSdoqe3/r9xhvsyLoe6D5nWtuGPh9KIg59mD6Fg3WlfeVR9n6QHGnWZeEHO4NslE1Cdm73vxpQ0EN44acD7FrzlSDFtK/jJId3NRS6bODSjAyDH1QDRAlsy5U9xUkblLePqvM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689356686; 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=yAIKa1Vmq8ZWsUjjAwQ4Dg7FHx52PhZAcNoffWW8ZKA=; b=k2zHgBEH3h0ujamMK0plJX7xFahfFS6/60OzopWbqwvrNfcP40B15l7vqnnwq5t+PXweghVR0YrMx+hTipTP6VjkxSqF4+qEwXHBs5Y/k1T44REQu8wZI/h4nvzMWbz4pAHjsacwn/g/Ov0itoM7xL2+dxX8nbslMoN5Pj26s9o= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1689356686917749.9571864769971; Fri, 14 Jul 2023 10:44:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKMpJ-0004WF-QG; Fri, 14 Jul 2023 13:43:34 -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 1qKMpF-0004U2-GV for qemu-devel@nongnu.org; Fri, 14 Jul 2023 13:43:29 -0400 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qKMpE-0003dy-0C for qemu-devel@nongnu.org; Fri, 14 Jul 2023 13:43:29 -0400 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-1ba2e911c24so949644fac.0 for ; Fri, 14 Jul 2023 10:43:27 -0700 (PDT) Received: from grind.. (201-69-66-19.dial-up.telesp.net.br. [201.69.66.19]) by smtp.gmail.com with ESMTPSA id dw18-20020a056870771200b001b05c4b3b3dsm4240968oab.31.2023.07.14.10.43.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 10:43:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1689356606; x=1691948606; 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=yAIKa1Vmq8ZWsUjjAwQ4Dg7FHx52PhZAcNoffWW8ZKA=; b=prWub8Ro+Ptx0fYUSiL36H8EOa2CDEHZYXq27s3bTZXsXxxcFJ+HKk8Ra7G99EwVWT opI6S3yjxubhyhE/gbkKkyUglByL47I95OyCEz1jlT6uIl+tsejwKo2uCUr1M6bcB8Dv nYvebk1hYc9C6ir5jKV0X2NXIj0aLg3H11AfN+rHt9NMWye09IsUNlcMd02CLoCS+Bzo 9Y0wqTgiq0CBAjRh72ShRWPSdeB0T1xB1onLZul0CSohJGKoJHVJwrbfcbUS73jnENgw gghreMFz264BTZB5G3wWMhsCJLF2f8iREtNCH2oqlLSyZQDABCQFl5O1P3PcCJyWOGfC OltQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689356606; x=1691948606; 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=yAIKa1Vmq8ZWsUjjAwQ4Dg7FHx52PhZAcNoffWW8ZKA=; b=efkLdjUZs1K7nlQe79Q1MEzFKCIcEqgbiI6hU0kFi1jf2SSo+ZjXbzxeBgj+uUGjCG katA1hYhtW3HUP39gG9r0Ks3kcdEzkAh/2VWbJBPj7Z1nN9oUXtNv1hROthPJ0xzt0bR qKwi9h33rxUTAuZVVDQdVNPAvnU8iiOMtRC4DTZucxbRgaT1xUX1Bu0yZp4dCJh3HUI+ GJ4LlXKuovFeCF2RDgbbfNuwimG6WLJecEHZ2iovlc+MmhI8BuEBsAepc9/b48uOaXHi eUM1ku0lCHOTWO9p0oIyTQZJBf6uFfxPzQUmkd6d8Yid2BBtHC5XtMStbSWxs5at+xD1 M3dg== X-Gm-Message-State: ABy/qLbsMEtSWDvEPy2T9RVro0Q9EJ0suWn3udJ6DbFkdidDo5fgHSP9 waF2wIy3TRf4ynd7SFCS5bn5akBTZnNkj/FM7YQ= X-Google-Smtp-Source: APBJJlFpXTOz65gdZNIYyG/BAEBh4/tAtFKuPsqpS4IRZtYMhVS/29P2NS0GIWc9avesGOQwdADvNQ== X-Received: by 2002:a05:6870:15c2:b0:1b7:4523:2af0 with SMTP id k2-20020a05687015c200b001b745232af0mr2533616oad.2.1689356606589; Fri, 14 Jul 2023 10:43:26 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liweiwei@iscas.ac.cn, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, richard.henderson@linaro.org, Daniel Henrique Barboza Subject: [PATCH for-8.2 v3 3/8] target/riscv/cpu.c: split vendor exts from riscv_cpu_extensions[] Date: Fri, 14 Jul 2023 14:43:06 -0300 Message-ID: <20230714174311.672359-4-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230714174311.672359-1-dbarboza@ventanamicro.com> References: <20230714174311.672359-1-dbarboza@ventanamicro.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=2001:4860:4864:20::33; envelope-from=dbarboza@ventanamicro.com; helo=mail-oa1-x33.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ventanamicro.com) X-ZM-MESSAGEID: 1689356689075100007 Content-Type: text/plain; charset="utf-8" Our goal is to make riscv_cpu_extensions[] hold only ratified, non-vendor extensions. Create a new riscv_cpu_vendor_exts[] array for them, changing riscv_cpu_add_user_properties() accordingly. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index b165ecfcba..d9c097f602 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1808,20 +1808,6 @@ static Property riscv_cpu_extensions[] =3D { DEFINE_PROP_BOOL("zcmp", RISCVCPU, cfg.ext_zcmp, false), DEFINE_PROP_BOOL("zcmt", RISCVCPU, cfg.ext_zcmt, false), =20 - /* Vendor-specific custom extensions */ - DEFINE_PROP_BOOL("xtheadba", RISCVCPU, cfg.ext_xtheadba, false), - DEFINE_PROP_BOOL("xtheadbb", RISCVCPU, cfg.ext_xtheadbb, false), - DEFINE_PROP_BOOL("xtheadbs", RISCVCPU, cfg.ext_xtheadbs, false), - DEFINE_PROP_BOOL("xtheadcmo", RISCVCPU, cfg.ext_xtheadcmo, false), - DEFINE_PROP_BOOL("xtheadcondmov", RISCVCPU, cfg.ext_xtheadcondmov, fal= se), - DEFINE_PROP_BOOL("xtheadfmemidx", RISCVCPU, cfg.ext_xtheadfmemidx, fal= se), - DEFINE_PROP_BOOL("xtheadfmv", RISCVCPU, cfg.ext_xtheadfmv, false), - DEFINE_PROP_BOOL("xtheadmac", RISCVCPU, cfg.ext_xtheadmac, false), - DEFINE_PROP_BOOL("xtheadmemidx", RISCVCPU, cfg.ext_xtheadmemidx, false= ), - DEFINE_PROP_BOOL("xtheadmempair", RISCVCPU, cfg.ext_xtheadmempair, fal= se), - DEFINE_PROP_BOOL("xtheadsync", RISCVCPU, cfg.ext_xtheadsync, false), - DEFINE_PROP_BOOL("xventanacondops", RISCVCPU, cfg.ext_XVentanaCondOps,= false), - /* These are experimental so mark with 'x-' */ DEFINE_PROP_BOOL("x-zicond", RISCVCPU, cfg.ext_zicond, false), =20 @@ -1840,6 +1826,21 @@ static Property riscv_cpu_extensions[] =3D { DEFINE_PROP_END_OF_LIST(), }; =20 +static Property riscv_cpu_vendor_exts[] =3D { + DEFINE_PROP_BOOL("xtheadba", RISCVCPU, cfg.ext_xtheadba, false), + DEFINE_PROP_BOOL("xtheadbb", RISCVCPU, cfg.ext_xtheadbb, false), + DEFINE_PROP_BOOL("xtheadbs", RISCVCPU, cfg.ext_xtheadbs, false), + DEFINE_PROP_BOOL("xtheadcmo", RISCVCPU, cfg.ext_xtheadcmo, false), + DEFINE_PROP_BOOL("xtheadcondmov", RISCVCPU, cfg.ext_xtheadcondmov, fal= se), + DEFINE_PROP_BOOL("xtheadfmemidx", RISCVCPU, cfg.ext_xtheadfmemidx, fal= se), + DEFINE_PROP_BOOL("xtheadfmv", RISCVCPU, cfg.ext_xtheadfmv, false), + DEFINE_PROP_BOOL("xtheadmac", RISCVCPU, cfg.ext_xtheadmac, false), + DEFINE_PROP_BOOL("xtheadmemidx", RISCVCPU, cfg.ext_xtheadmemidx, false= ), + DEFINE_PROP_BOOL("xtheadmempair", RISCVCPU, cfg.ext_xtheadmempair, fal= se), + DEFINE_PROP_BOOL("xtheadsync", RISCVCPU, cfg.ext_xtheadsync, false), + DEFINE_PROP_BOOL("xventanacondops", RISCVCPU, cfg.ext_XVentanaCondOps,= false), +}; + static Property riscv_cpu_options[] =3D { DEFINE_PROP_UINT8("pmu-num", RISCVCPU, cfg.pmu_num, 16), =20 @@ -1918,6 +1919,10 @@ static void riscv_cpu_add_user_properties(Object *ob= j) for (int i =3D 0; i < ARRAY_SIZE(riscv_cpu_options); i++) { qdev_property_add_static(dev, &riscv_cpu_options[i]); } + + for (int i =3D 0; i < ARRAY_SIZE(riscv_cpu_vendor_exts); i++) { + qdev_property_add_static(dev, &riscv_cpu_vendor_exts[i]); + } } =20 static Property riscv_cpu_properties[] =3D { --=20 2.41.0