From nobody Wed Nov 27 11:51:00 2024 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=1698645001; cv=none; d=zohomail.com; s=zohoarc; b=JFEwmUYhp9LQv/ocjddb5h+XMJRa0xeoiK32OpwJNTQsu3la2ZXXVasGW0v6qWSZqZyil0RqhTJDB1TNE3KrraTAG49gODFX42wlF8hF8rmbSfpSH+gSWYlLdufE9ktkh1kN1CVSY4Hr/xrXIQBjP8DcMCc1pjF2KXtD9gU39R0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698645001; 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:Message-Id:Reply-To:To; bh=S0hRCeRwfxj5e4fBp30kQZNEm7sQqD61LbWIJSIn+lc=; b=R3NkAorEMnAwTuj0PN8QCoC0my4XBA+rFEJWYRA3cnRdhHAWUndJWMEp0rihW7DyW0LMfJf/wLuS18PUx7INzBqJ2KJ39pnBSY/h6ogbbJ6/krkLagvBnU1XtF+GjLTGiRy63th9B4oikNRdEts49VggN9VO+W3jqprK7Cx73wg= 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 1698645001536684.5026792785536; Sun, 29 Oct 2023 22:50:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxL98-0002cj-Kf; Mon, 30 Oct 2023 01:49: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 1qxL8x-0002ag-Mp for qemu-devel@nongnu.org; Mon, 30 Oct 2023 01:48:56 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qxL8w-0006wE-8S for qemu-devel@nongnu.org; Mon, 30 Oct 2023 01:48:55 -0400 Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-280351c32afso1054219a91.1 for ; Sun, 29 Oct 2023 22:48:53 -0700 (PDT) Received: from localhost ([2400:4050:a840:1e00:78d2:b862:10a7:d486]) by smtp.gmail.com with UTF8SMTPSA id ga5-20020a17090b038500b002801f183787sm3498464pjb.27.2023.10.29.22.48.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Oct 2023 22:48:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1698644932; x=1699249732; 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=S0hRCeRwfxj5e4fBp30kQZNEm7sQqD61LbWIJSIn+lc=; b=hdNfGkjtQJ4t7McWaFwA646QENZfcqdzsTUy9zG3Bf/1l/PGSNcz+gAZoGqPpB9ngA JksYH9sYKfkja+4YEj5+BTWsjk4eIR17O7qhG4vP4n1FT8cYaH1Uo5a7+0ODxi6F5KuU iqO2OcZfUmaeHb73Jh15I+46naIQkblYq1eN9bPN+R7Qa7vxsk3nIqmImWoJInAplbFE oxFzvMA8079SvilXl0c67RL1k2KBYaSvTnOeQLe27l6WwY1bQA2yAbZkJj+wrkecDS5V t+fwZQy+BJgJBehZAlPtUSFsxpJsZKZXxhCtFRmsXP3gC7jP9GW0KqXB7AYM/9uJyMkO ivxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698644932; x=1699249732; 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=S0hRCeRwfxj5e4fBp30kQZNEm7sQqD61LbWIJSIn+lc=; b=uJO/pKdALhND7SwQiVE8Gg8h8+dI5QmgzWy+pq0Y+Q2s6sJwMvrCpoqCxroKobQ+ar NvHC8qysxDrLfQg9Hqvx+9llu8BuLWy7gEogJSr5XL0t1IyH33nVMsS1YizG5kwHimEm 6EGPF2QNsPSdL0CwQ2EajR4V9WGbmWv66qozGc7AY4t9yDgq5nO5evEpqZ1FYkf9WAnz SfjkZHQchY2QndGYCv28Ox+DZdJOe++PvTwVeblWUmsCBnfpLyCGjKps3of2vTxhrrkc jCHkc936Ie/UAD23+Khq05BFK5C39+0paSwzoGC4thsBuHYmqH/4MMTsbjQId1XadjT7 yqIA== X-Gm-Message-State: AOJu0Ywo5UusY+yZYZH+pzFrG/tj8qVMhT5xwhVQQsGnvP+fWVBOrEed MEX7b7/lw1VWDwYMjvJyu4EMYA== X-Google-Smtp-Source: AGHT+IHNrs0CtMoCLei9eFcb7mVQvlxHgupfzhSpRtshG1fuMg+GE2VCsUKOwsHgv0sgWDUfmGdYxQ== X-Received: by 2002:a17:90a:7786:b0:27d:7ebe:2e8 with SMTP id v6-20020a17090a778600b0027d7ebe02e8mr8119912pjk.9.1698644932690; Sun, 29 Oct 2023 22:48:52 -0700 (PDT) From: Akihiko Odaki To: Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Mikhail Tyutin , Aleksandr Anenkov , qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Fabiano Rosas , Akihiko Odaki , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , qemu-riscv@nongnu.org Subject: [PATCH v6 1/5] hw/riscv: Use misa_mxl instead of misa_mxl_max Date: Mon, 30 Oct 2023 14:46:35 +0900 Message-ID: <20231030054834.39145-2-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231030054834.39145-1-akihiko.odaki@daynix.com> References: <20231030054834.39145-1-akihiko.odaki@daynix.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: none client-ip=2607:f8b0:4864:20::1033; envelope-from=akihiko.odaki@daynix.com; helo=mail-pj1-x1033.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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 @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1698645004600100009 Content-Type: text/plain; charset="utf-8" The effective MXL value matters when booting. Signed-off-by: Akihiko Odaki --- hw/riscv/boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/boot.c b/hw/riscv/boot.c index 52bf8e67de..dad3f6e7b1 100644 --- a/hw/riscv/boot.c +++ b/hw/riscv/boot.c @@ -36,7 +36,7 @@ =20 bool riscv_is_32bit(RISCVHartArrayState *harts) { - return harts->harts[0].env.misa_mxl_max =3D=3D MXL_RV32; + return harts->harts[0].env.misa_mxl =3D=3D MXL_RV32; } =20 /* --=20 2.42.0 From nobody Wed Nov 27 11:51:00 2024 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=1698645014; cv=none; d=zohomail.com; s=zohoarc; b=c0V6V34sNgZ1dUPt8pHG+M0ZL7fV6lWyIIQzXFzkMCFT5CPhqxSYd0InSdcBGmIYfqaro0JrQICSh6awHdXLuSwnTUrKBPvD07vNNVOmE0I9JnaZFplvmwA0p1KlK6OB7+NFm8D4qCaCmHPF/QWdoy6206nT3/9Fg78uqWVeS04= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698645014; 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:Message-Id:Reply-To:To; bh=WVW58tyZ2tLjevyOdJr7NfNjanDDydhO/lJcVmLZzKs=; b=QbDDnr06KOUcBW1PeWWAtTyI+TLKsv9HJGCXH+5QDvrs9qcgqciJ+caJ/GX+M7wogOhO8c194ArJUQisyW6KnYRqq1znPIPmlfi5o721lztxU13jn42VV6piTGKrr6fynwBIPGwA7j0EhZj/SFk4IXVD0nTzF0v6M9Hq/xdXDdg= 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 1698645014382320.7996767188872; Sun, 29 Oct 2023 22:50:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxL9M-0002gE-QL; Mon, 30 Oct 2023 01:49:20 -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 1qxL93-0002cn-K5 for qemu-devel@nongnu.org; Mon, 30 Oct 2023 01:49:05 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0: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 1qxL90-0006wc-PG for qemu-devel@nongnu.org; Mon, 30 Oct 2023 01:49:00 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6b77ab73c6fso2825205b3a.1 for ; Sun, 29 Oct 2023 22:48:58 -0700 (PDT) Received: from localhost ([2400:4050:a840:1e00:78d2:b862:10a7:d486]) by smtp.gmail.com with UTF8SMTPSA id fh14-20020a056a00390e00b00689f5940061sm5260241pfb.17.2023.10.29.22.48.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Oct 2023 22:48:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1698644937; x=1699249737; 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=WVW58tyZ2tLjevyOdJr7NfNjanDDydhO/lJcVmLZzKs=; b=3dSRi8bd2RYVNfrNC42Ck8nt/w4g0AkNEtV9GYbVH3JKdYXGjhzPIGKP5AyDW510+L OPbYDaLVjhuH+GDLtcAd+ZtEfFfacO4LWNsqvZxVWKXaC53gegtmfgo7FFanJf5GYfxQ NBk1bIsHPdJaK+97Oy+2e2SFqcJPSN1Gf0ugnYRVSMNCSLCLXUks+CLvQUITAEQVIx60 Ct2maaas8p2Hhj958XrL1eDAR//kikIRSIHHHOh1QAmIEZpuRDUNy7a7P2pIAWkb0x4J mHQAtR7N2oME3FFcmdOaR1WZ9h3tuAOSRFEwqZCIi2rJujl6+3SPZGDl7nhJWwkl7zGd bzvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698644937; x=1699249737; 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=WVW58tyZ2tLjevyOdJr7NfNjanDDydhO/lJcVmLZzKs=; b=PTi37yb3zjkP+FQGnZOYgy4jXCIGQG3aVG9F022abYEl34sROmnn00rL3oZbrfIBmC IfNxd7UMn9io6kC9SJgMkog0J5ZclDSL8PZudPE3uS0D9Fn2chjKFnDcSLJGAJ84OD8n SBa9AO8/9vrb+RNxjdFUQe4HWFpDzXrpC/44n1esDzHX09PtUEOLfYVrxY8r5/tfDBZH Y096pcqTd3iqWWmGsEvErXFKqY/cUaYjuFR4miOM9LR8E03Rf48QRIU4/ekUa7yEOc9A n1NNvUJ7y6b5TihCc1Rz5JS8fv2Y6pavwTG9ykVjs7+SXPUhC5I6LZc3+UAbgW8NQppt Z+Vg== X-Gm-Message-State: AOJu0YzI8H/3yQF5O2Xr4uZk2nf5x92+3jKvONunHaAxtwItcBKHcfOv 0HVBs57IP8G8Pgn+EM/dTGJpxA== X-Google-Smtp-Source: AGHT+IF36QFnG1ViRJhTkwpt7pjXxr5aHdeVd3h7FdPjGheua9KlOYC9h6PfPvd/vGeU13shWMl7mg== X-Received: by 2002:a05:6a00:3244:b0:691:27b:15b4 with SMTP id bn4-20020a056a00324400b00691027b15b4mr13661138pfb.5.1698644937207; Sun, 29 Oct 2023 22:48:57 -0700 (PDT) From: Akihiko Odaki To: Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Mikhail Tyutin , Aleksandr Anenkov , qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Fabiano Rosas , Akihiko Odaki , LIU Zhiwei , Daniel Henrique Barboza , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , qemu-riscv@nongnu.org Subject: [PATCH v6 2/5] target/riscv: Remove misa_mxl validation Date: Mon, 30 Oct 2023 14:46:36 +0900 Message-ID: <20231030054834.39145-3-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231030054834.39145-1-akihiko.odaki@daynix.com> References: <20231030054834.39145-1-akihiko.odaki@daynix.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: none client-ip=2607:f8b0:4864:20::431; envelope-from=akihiko.odaki@daynix.com; helo=mail-pf1-x431.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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 @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1698645016847100002 Content-Type: text/plain; charset="utf-8" It is initialized with a simple assignment and there is little room for error. In fact, the validation is even more complex. Signed-off-by: Akihiko Odaki Acked-by: LIU Zhiwei Reviewed-by: Daniel Henrique Barboza Acked-by: Alistair Francis --- target/riscv/tcg/tcg-cpu.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index a28918ab30..7f45e42000 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -148,7 +148,7 @@ static void riscv_cpu_validate_misa_priv(CPURISCVState = *env, Error **errp) } } =20 -static void riscv_cpu_validate_misa_mxl(RISCVCPU *cpu, Error **errp) +static void riscv_cpu_validate_misa_mxl(RISCVCPU *cpu) { RISCVCPUClass *mcc =3D RISCV_CPU_GET_CLASS(cpu); CPUClass *cc =3D CPU_CLASS(mcc); @@ -168,11 +168,6 @@ static void riscv_cpu_validate_misa_mxl(RISCVCPU *cpu,= Error **errp) default: g_assert_not_reached(); } - - if (env->misa_mxl_max !=3D env->misa_mxl) { - error_setg(errp, "misa_mxl_max must be equal to misa_mxl"); - return; - } } =20 static void riscv_cpu_validate_priv_spec(RISCVCPU *cpu, Error **errp) @@ -573,11 +568,7 @@ static bool tcg_cpu_realize(CPUState *cs, Error **errp) return false; } =20 - riscv_cpu_validate_misa_mxl(cpu, &local_err); - if (local_err !=3D NULL) { - error_propagate(errp, local_err); - return false; - } + riscv_cpu_validate_misa_mxl(cpu); =20 riscv_cpu_validate_priv_spec(cpu, &local_err); if (local_err !=3D NULL) { --=20 2.42.0 From nobody Wed Nov 27 11:51:00 2024 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=1698645001; cv=none; d=zohomail.com; s=zohoarc; b=dJCgHfHXpvafTRIAcUSMkX4gNJpmry1TFkax6W62mRl02ZzYdwQUFt4D7qMFE+g5MpACcN739Rm5Bqon0VW5bzhjzPkA/FAsgnA3mz7dnAUCfeedJPRaQycLSqD6ZFPcKmfTNzZYQBvGosnhqmfStax2oDZpZ82QrA+yd95ycV0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698645001; 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:Message-Id:Reply-To:To; bh=UVvXnEb2ZdyLCXQfrvbED1XBhty0AcG3KbkyPQCvvCY=; b=HWW1qrf9MF2/kr9ACnb2V5J1LlLN7pVYFEkBQQjyX5zga9TeGirRWlLM1LCKRI1cu8xUQFN1RwoWhlO7FVXujRQ+VZXZXaJClA0PsWh8m+1XPSJa4eqLjv8c8BYFR5HXGYsLvhoyU8k0loCQvUOnFFkVQnphH859yi4KSkIyJlQ= 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 1698645001606275.5934292410723; Sun, 29 Oct 2023 22:50:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxL9K-0002fI-Ps; Mon, 30 Oct 2023 01:49:19 -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 1qxL98-0002cz-5D for qemu-devel@nongnu.org; Mon, 30 Oct 2023 01:49:06 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qxL95-0006yQ-Eh for qemu-devel@nongnu.org; Mon, 30 Oct 2023 01:49:05 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1cc34c3420bso4289135ad.3 for ; Sun, 29 Oct 2023 22:49:03 -0700 (PDT) Received: from localhost ([2400:4050:a840:1e00:78d2:b862:10a7:d486]) by smtp.gmail.com with UTF8SMTPSA id e17-20020a17090301d100b001c0a4146961sm5418523plh.19.2023.10.29.22.48.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Oct 2023 22:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1698644942; x=1699249742; 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=UVvXnEb2ZdyLCXQfrvbED1XBhty0AcG3KbkyPQCvvCY=; b=NFJIj7FuXdIifDm8pT26FPNv8vbKggs3LCFUAVpEnR966+ucpw9qgX+f/8RxdDu6yM 7J58vmxOLwt+ojKrcp5lyXQZHiMiK9nFi1Bb+jdxaU+tu3s/WQ7M1MGMtYOSHKI+6dMe u4FoM1w8tII7HO74rxMYI+I8qSuRQYpRdonsoHoopdr7pOwF0g5kqgdoM9ISDI6W6orl AvyTgq6eXwSnySNt5jwCcQ/7HGv8nmAZ2OnWSy1wUN3LCyJT8P1FBIYHyfDVScRGtXrx jeXp/gUl6FVM0jMaLP3uDZHR8vOXIvuuz6KjWW/2JCDL8uRniZ5GbbygSW91+W9hi5Vb lRbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698644942; x=1699249742; 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=UVvXnEb2ZdyLCXQfrvbED1XBhty0AcG3KbkyPQCvvCY=; b=bnU5M5Dr5CLGgV1d3iG5XdepeA7TlMp5BNX5R3Jq2IVLg/L2WqJpHe1JZfE3ZHp9D0 dlU+DfwueaUd+tuwnQbZ1/xdiqH/t6ah5tUpDJzrcJIqdxdHr0lbpreWMx6y1OnnTd7q hZBUP8Xo1rdhZ6mTu5Rb8N3pW6rv1pxuKas/RoMMZY/gOClSCojixO0zGw+f6BAHRopN q3Gl3Yg2U5EvASZZJ6AijQwFCsdU9HG2JyXJxOrjLQDmnRDuwJQlyutZhFZOHV1TM8Ix rQAO1v8WoS5HuCimol5o9vaOwBmafiR6+6+BfJZZPHH3EfQl5Vtk8d9P+tpDyae2aXmB 0asw== X-Gm-Message-State: AOJu0Yx4qgteto+kuSOjbsoFTEG+tk5nYcXtn9w+wjfSbMNlQmDAHh8h /VQ99Lab0Z4RxnrmsgSQz76uYxi32NIq4eeVqKN66A== X-Google-Smtp-Source: AGHT+IFVF4BFMIAQT9dzmpwDLRc27FGl5+fUt18rj18Q/rueUoIChVsCMyHCrRqbm6GvcSh4QOp3Bg== X-Received: by 2002:a17:902:d505:b0:1cc:4146:ce69 with SMTP id b5-20020a170902d50500b001cc4146ce69mr1794732plg.43.1698644941925; Sun, 29 Oct 2023 22:49:01 -0700 (PDT) From: Akihiko Odaki To: Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Mikhail Tyutin , Aleksandr Anenkov , qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Fabiano Rosas , Akihiko Odaki , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , qemu-riscv@nongnu.org Subject: [PATCH v6 3/5] target/riscv: Move misa_mxl_max to class Date: Mon, 30 Oct 2023 14:46:37 +0900 Message-ID: <20231030054834.39145-4-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231030054834.39145-1-akihiko.odaki@daynix.com> References: <20231030054834.39145-1-akihiko.odaki@daynix.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: none client-ip=2607:f8b0:4864:20::634; envelope-from=akihiko.odaki@daynix.com; helo=mail-pl1-x634.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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 @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1698645004619100011 Content-Type: text/plain; charset="utf-8" misa_mxl_max is common for all instances of a RISC-V CPU class so they are better put into class. Signed-off-by: Akihiko Odaki --- target/riscv/cpu-qom.h | 1 + target/riscv/cpu.h | 3 +- target/riscv/cpu.c | 118 +++++++++++++++++++------------------ target/riscv/gdbstub.c | 12 ++-- target/riscv/kvm/kvm-cpu.c | 10 ++-- target/riscv/machine.c | 7 +-- target/riscv/tcg/tcg-cpu.c | 12 ++-- target/riscv/translate.c | 3 +- 8 files changed, 87 insertions(+), 79 deletions(-) diff --git a/target/riscv/cpu-qom.h b/target/riscv/cpu-qom.h index f3fbe37a2c..33b6d52c90 100644 --- a/target/riscv/cpu-qom.h +++ b/target/riscv/cpu-qom.h @@ -68,5 +68,6 @@ struct RISCVCPUClass { /*< public >*/ DeviceRealize parent_realize; ResettablePhases parent_phases; + uint32_t misa_mxl_max; /* max mxl for this cpu */ }; #endif /* RISCV_CPU_QOM_H */ diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index f8ffa5ee38..ef10efd1e7 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -159,7 +159,6 @@ struct CPUArchState { =20 /* RISCVMXL, but uint32_t for vmstate migration */ uint32_t misa_mxl; /* current mxl */ - uint32_t misa_mxl_max; /* max mxl for this cpu */ uint32_t misa_ext; /* current extensions */ uint32_t misa_ext_mask; /* max ext for this cpu */ uint32_t xl; /* current xlen */ @@ -711,7 +710,7 @@ enum riscv_pmu_event_idx { /* used by tcg/tcg-cpu.c*/ void isa_ext_update_enabled(RISCVCPU *cpu, uint32_t ext_offset, bool en); bool isa_ext_is_enabled(RISCVCPU *cpu, uint32_t ext_offset); -void riscv_cpu_set_misa(CPURISCVState *env, RISCVMXL mxl, uint32_t ext); +void riscv_cpu_set_misa_ext(CPURISCVState *env, uint32_t ext); =20 typedef struct RISCVCPUMultiExtConfig { const char *name; diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index ac4a6c7eec..1fb5747f00 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -263,9 +263,8 @@ const char *riscv_cpu_get_trap_name(target_ulong cause,= bool async) } } =20 -void riscv_cpu_set_misa(CPURISCVState *env, RISCVMXL mxl, uint32_t ext) +void riscv_cpu_set_misa_ext(CPURISCVState *env, uint32_t ext) { - env->misa_mxl_max =3D env->misa_mxl =3D mxl; env->misa_ext_mask =3D env->misa_ext =3D ext; } =20 @@ -367,11 +366,7 @@ static void riscv_any_cpu_init(Object *obj) { RISCVCPU *cpu =3D RISCV_CPU(obj); CPURISCVState *env =3D &cpu->env; -#if defined(TARGET_RISCV32) - riscv_cpu_set_misa(env, MXL_RV32, RVI | RVM | RVA | RVF | RVD | RVC | = RVU); -#elif defined(TARGET_RISCV64) - riscv_cpu_set_misa(env, MXL_RV64, RVI | RVM | RVA | RVF | RVD | RVC | = RVU); -#endif + riscv_cpu_set_misa_ext(env, RVI | RVM | RVA | RVF | RVD | RVC | RVU); =20 #ifndef CONFIG_USER_ONLY set_satp_mode_max_supported(RISCV_CPU(obj), @@ -392,16 +387,14 @@ static void riscv_max_cpu_init(Object *obj) { RISCVCPU *cpu =3D RISCV_CPU(obj); CPURISCVState *env =3D &cpu->env; - RISCVMXL mlx =3D MXL_RV64; =20 -#ifdef TARGET_RISCV32 - mlx =3D MXL_RV32; -#endif - riscv_cpu_set_misa(env, mlx, 0); env->priv_ver =3D PRIV_VERSION_LATEST; #ifndef CONFIG_USER_ONLY - set_satp_mode_max_supported(RISCV_CPU(obj), mlx =3D=3D MXL_RV32 ? - VM_1_10_SV32 : VM_1_10_SV57); +#ifdef TARGET_RISCV32 + set_satp_mode_max_supported(cpu, VM_1_10_SV32); +#else + set_satp_mode_max_supported(cpu, VM_1_10_SV57); +#endif #endif } =20 @@ -409,8 +402,6 @@ static void riscv_max_cpu_init(Object *obj) static void rv64_base_cpu_init(Object *obj) { CPURISCVState *env =3D &RISCV_CPU(obj)->env; - /* We set this in the realise function */ - riscv_cpu_set_misa(env, MXL_RV64, 0); /* Set latest version of privileged specification */ env->priv_ver =3D PRIV_VERSION_LATEST; #ifndef CONFIG_USER_ONLY @@ -422,8 +413,7 @@ static void rv64_sifive_u_cpu_init(Object *obj) { RISCVCPU *cpu =3D RISCV_CPU(obj); CPURISCVState *env =3D &cpu->env; - riscv_cpu_set_misa(env, MXL_RV64, - RVI | RVM | RVA | RVF | RVD | RVC | RVS | RVU); + riscv_cpu_set_misa_ext(env, RVI | RVM | RVA | RVF | RVD | RVC | RVS | = RVU); env->priv_ver =3D PRIV_VERSION_1_10_0; #ifndef CONFIG_USER_ONLY set_satp_mode_max_supported(RISCV_CPU(obj), VM_1_10_SV39); @@ -441,7 +431,7 @@ static void rv64_sifive_e_cpu_init(Object *obj) CPURISCVState *env =3D &RISCV_CPU(obj)->env; RISCVCPU *cpu =3D RISCV_CPU(obj); =20 - riscv_cpu_set_misa(env, MXL_RV64, RVI | RVM | RVA | RVC | RVU); + riscv_cpu_set_misa_ext(env, RVI | RVM | RVA | RVC | RVU); env->priv_ver =3D PRIV_VERSION_1_10_0; #ifndef CONFIG_USER_ONLY set_satp_mode_max_supported(cpu, VM_1_10_MBARE); @@ -458,7 +448,7 @@ static void rv64_thead_c906_cpu_init(Object *obj) CPURISCVState *env =3D &RISCV_CPU(obj)->env; RISCVCPU *cpu =3D RISCV_CPU(obj); =20 - riscv_cpu_set_misa(env, MXL_RV64, RVG | RVC | RVS | RVU); + riscv_cpu_set_misa_ext(env, RVG | RVC | RVS | RVU); env->priv_ver =3D PRIV_VERSION_1_11_0; =20 cpu->cfg.ext_zfa =3D true; @@ -489,7 +479,7 @@ static void rv64_veyron_v1_cpu_init(Object *obj) CPURISCVState *env =3D &RISCV_CPU(obj)->env; RISCVCPU *cpu =3D RISCV_CPU(obj); =20 - riscv_cpu_set_misa(env, MXL_RV64, RVG | RVC | RVS | RVU | RVH); + riscv_cpu_set_misa_ext(env, RVG | RVC | RVS | RVU | RVH); env->priv_ver =3D PRIV_VERSION_1_12_0; =20 /* Enable ISA extensions */ @@ -533,8 +523,6 @@ static void rv128_base_cpu_init(Object *obj) exit(EXIT_FAILURE); } CPURISCVState *env =3D &RISCV_CPU(obj)->env; - /* We set this in the realise function */ - riscv_cpu_set_misa(env, MXL_RV128, 0); /* Set latest version of privileged specification */ env->priv_ver =3D PRIV_VERSION_LATEST; #ifndef CONFIG_USER_ONLY @@ -545,8 +533,6 @@ static void rv128_base_cpu_init(Object *obj) static void rv32_base_cpu_init(Object *obj) { CPURISCVState *env =3D &RISCV_CPU(obj)->env; - /* We set this in the realise function */ - riscv_cpu_set_misa(env, MXL_RV32, 0); /* Set latest version of privileged specification */ env->priv_ver =3D PRIV_VERSION_LATEST; #ifndef CONFIG_USER_ONLY @@ -558,8 +544,7 @@ static void rv32_sifive_u_cpu_init(Object *obj) { RISCVCPU *cpu =3D RISCV_CPU(obj); CPURISCVState *env =3D &cpu->env; - riscv_cpu_set_misa(env, MXL_RV32, - RVI | RVM | RVA | RVF | RVD | RVC | RVS | RVU); + riscv_cpu_set_misa_ext(env, RVI | RVM | RVA | RVF | RVD | RVC | RVS | = RVU); env->priv_ver =3D PRIV_VERSION_1_10_0; #ifndef CONFIG_USER_ONLY set_satp_mode_max_supported(RISCV_CPU(obj), VM_1_10_SV32); @@ -577,7 +562,7 @@ static void rv32_sifive_e_cpu_init(Object *obj) CPURISCVState *env =3D &RISCV_CPU(obj)->env; RISCVCPU *cpu =3D RISCV_CPU(obj); =20 - riscv_cpu_set_misa(env, MXL_RV32, RVI | RVM | RVA | RVC | RVU); + riscv_cpu_set_misa_ext(env, RVI | RVM | RVA | RVC | RVU); env->priv_ver =3D PRIV_VERSION_1_10_0; #ifndef CONFIG_USER_ONLY set_satp_mode_max_supported(cpu, VM_1_10_MBARE); @@ -594,7 +579,7 @@ static void rv32_ibex_cpu_init(Object *obj) CPURISCVState *env =3D &RISCV_CPU(obj)->env; RISCVCPU *cpu =3D RISCV_CPU(obj); =20 - riscv_cpu_set_misa(env, MXL_RV32, RVI | RVM | RVC | RVU); + riscv_cpu_set_misa_ext(env, RVI | RVM | RVC | RVU); env->priv_ver =3D PRIV_VERSION_1_11_0; #ifndef CONFIG_USER_ONLY set_satp_mode_max_supported(cpu, VM_1_10_MBARE); @@ -612,7 +597,7 @@ static void rv32_imafcu_nommu_cpu_init(Object *obj) CPURISCVState *env =3D &RISCV_CPU(obj)->env; RISCVCPU *cpu =3D RISCV_CPU(obj); =20 - riscv_cpu_set_misa(env, MXL_RV32, RVI | RVM | RVA | RVF | RVC | RVU); + riscv_cpu_set_misa_ext(env, RVI | RVM | RVA | RVF | RVC | RVU); env->priv_ver =3D PRIV_VERSION_1_10_0; #ifndef CONFIG_USER_ONLY set_satp_mode_max_supported(cpu, VM_1_10_MBARE); @@ -834,7 +819,7 @@ static void riscv_cpu_reset_hold(Object *obj) mcc->parent_phases.hold(obj); } #ifndef CONFIG_USER_ONLY - env->misa_mxl =3D env->misa_mxl_max; + env->misa_mxl =3D mcc->misa_mxl_max; env->priv =3D PRV_M; env->mstatus &=3D ~(MSTATUS_MIE | MSTATUS_MPRV); if (env->misa_mxl > MXL_RV32) { @@ -1169,6 +1154,12 @@ static void riscv_cpu_post_init(Object *obj) =20 static void riscv_cpu_init(Object *obj) { + RISCVCPUClass *mcc =3D RISCV_CPU_GET_CLASS(obj); + RISCVCPU *cpu =3D RISCV_CPU(obj); + CPURISCVState *env =3D &cpu->env; + + env->misa_mxl =3D mcc->misa_mxl_max; + #ifndef CONFIG_USER_ONLY qdev_init_gpio_in(DEVICE(obj), riscv_cpu_set_irq, IRQ_LOCAL_MAX + IRQ_LOCAL_GUEST_MAX); @@ -1555,7 +1546,7 @@ static void cpu_get_marchid(Object *obj, Visitor *v, = const char *name, visit_type_bool(v, name, &value, errp); } =20 -static void riscv_cpu_class_init(ObjectClass *c, void *data) +static void riscv_cpu_common_class_init(ObjectClass *c, void *data) { RISCVCPUClass *mcc =3D RISCV_CPU_CLASS(c); CPUClass *cc =3D CPU_CLASS(c); @@ -1597,6 +1588,13 @@ static void riscv_cpu_class_init(ObjectClass *c, voi= d *data) device_class_set_props(dc, riscv_cpu_properties); } =20 +static void riscv_cpu_class_init(ObjectClass *c, void *data) +{ + RISCVCPUClass *mcc =3D RISCV_CPU_CLASS(c); + + mcc->misa_mxl_max =3D (uint32_t)(uintptr_t)data; +} + static void riscv_isa_string_ext(RISCVCPU *cpu, char **isa_str, int max_str_len) { @@ -1662,18 +1660,22 @@ void riscv_cpu_list(void) g_slist_free(list); } =20 -#define DEFINE_CPU(type_name, initfn) \ - { \ - .name =3D type_name, \ - .parent =3D TYPE_RISCV_CPU, \ - .instance_init =3D initfn \ +#define DEFINE_CPU(type_name, misa_mxl_max, initfn) \ + { \ + .name =3D (type_name), \ + .parent =3D TYPE_RISCV_CPU, \ + .instance_init =3D (initfn), \ + .class_init =3D riscv_cpu_class_init, \ + .class_data =3D (void *)(misa_mxl_max) \ } =20 -#define DEFINE_DYNAMIC_CPU(type_name, initfn) \ - { \ - .name =3D type_name, \ - .parent =3D TYPE_RISCV_DYNAMIC_CPU, \ - .instance_init =3D initfn \ +#define DEFINE_DYNAMIC_CPU(type_name, misa_mxl_max, initfn) \ + { \ + .name =3D (type_name), \ + .parent =3D TYPE_RISCV_DYNAMIC_CPU, \ + .instance_init =3D (initfn), \ + .class_init =3D riscv_cpu_class_init, \ + .class_data =3D (void *)(misa_mxl_max) \ } =20 static const TypeInfo riscv_cpu_type_infos[] =3D { @@ -1686,29 +1688,31 @@ static const TypeInfo riscv_cpu_type_infos[] =3D { .instance_post_init =3D riscv_cpu_post_init, .abstract =3D true, .class_size =3D sizeof(RISCVCPUClass), - .class_init =3D riscv_cpu_class_init, + .class_init =3D riscv_cpu_common_class_init, }, { .name =3D TYPE_RISCV_DYNAMIC_CPU, .parent =3D TYPE_RISCV_CPU, .abstract =3D true, }, - DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_ANY, riscv_any_cpu_init), - DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_MAX, riscv_max_cpu_init), #if defined(TARGET_RISCV32) - DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_BASE32, rv32_base_cpu_init), - DEFINE_CPU(TYPE_RISCV_CPU_IBEX, rv32_ibex_cpu_init), - DEFINE_CPU(TYPE_RISCV_CPU_SIFIVE_E31, rv32_sifive_e_cpu_init), - DEFINE_CPU(TYPE_RISCV_CPU_SIFIVE_E34, rv32_imafcu_nommu_cpu_init= ), - DEFINE_CPU(TYPE_RISCV_CPU_SIFIVE_U34, rv32_sifive_u_cpu_init), + DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_ANY, MXL_RV32, riscv_any_cpu_in= it), + DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_MAX, MXL_RV32, riscv_max_cpu_in= it), + DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_BASE32, MXL_RV32, rv32_base_cpu_in= it), + DEFINE_CPU(TYPE_RISCV_CPU_IBEX, MXL_RV32, rv32_ibex_cpu_in= it), + DEFINE_CPU(TYPE_RISCV_CPU_SIFIVE_E31, MXL_RV32, rv32_sifive_e_cp= u_init), + DEFINE_CPU(TYPE_RISCV_CPU_SIFIVE_E34, MXL_RV32, rv32_imafcu_nomm= u_cpu_init), + DEFINE_CPU(TYPE_RISCV_CPU_SIFIVE_U34, MXL_RV32, rv32_sifive_u_cp= u_init), #elif defined(TARGET_RISCV64) - DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_BASE64, rv64_base_cpu_init), - DEFINE_CPU(TYPE_RISCV_CPU_SIFIVE_E51, rv64_sifive_e_cpu_init), - DEFINE_CPU(TYPE_RISCV_CPU_SIFIVE_U54, rv64_sifive_u_cpu_init), - DEFINE_CPU(TYPE_RISCV_CPU_SHAKTI_C, rv64_sifive_u_cpu_init), - DEFINE_CPU(TYPE_RISCV_CPU_THEAD_C906, rv64_thead_c906_cpu_init), - DEFINE_CPU(TYPE_RISCV_CPU_VEYRON_V1, rv64_veyron_v1_cpu_init), - DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_BASE128, rv128_base_cpu_init), + DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_ANY, MXL_RV64, riscv_any_cpu_in= it), + DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_MAX, MXL_RV64, riscv_max_cpu_in= it), + DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_BASE64, MXL_RV64, rv64_base_cpu_in= it), + DEFINE_CPU(TYPE_RISCV_CPU_SIFIVE_E51, MXL_RV64, rv64_sifive_e_cp= u_init), + DEFINE_CPU(TYPE_RISCV_CPU_SIFIVE_U54, MXL_RV64, rv64_sifive_u_cp= u_init), + DEFINE_CPU(TYPE_RISCV_CPU_SHAKTI_C, MXL_RV64, rv64_sifive_u_cp= u_init), + DEFINE_CPU(TYPE_RISCV_CPU_THEAD_C906, MXL_RV64, rv64_thead_c906_= cpu_init), + DEFINE_CPU(TYPE_RISCV_CPU_VEYRON_V1, MXL_RV64, rv64_veyron_v1_c= pu_init), + DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_BASE128, MXL_RV128, rv128_base_cpu_i= nit), #endif }; =20 diff --git a/target/riscv/gdbstub.c b/target/riscv/gdbstub.c index 524bede865..b9528cef5b 100644 --- a/target/riscv/gdbstub.c +++ b/target/riscv/gdbstub.c @@ -49,6 +49,7 @@ static const struct TypeSize vec_lanes[] =3D { =20 int riscv_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) { + RISCVCPUClass *mcc =3D RISCV_CPU_GET_CLASS(cs); RISCVCPU *cpu =3D RISCV_CPU(cs); CPURISCVState *env =3D &cpu->env; target_ulong tmp; @@ -61,7 +62,7 @@ int riscv_cpu_gdb_read_register(CPUState *cs, GByteArray = *mem_buf, int n) return 0; } =20 - switch (env->misa_mxl_max) { + switch (mcc->misa_mxl_max) { case MXL_RV32: return gdb_get_reg32(mem_buf, tmp); case MXL_RV64: @@ -75,12 +76,13 @@ int riscv_cpu_gdb_read_register(CPUState *cs, GByteArra= y *mem_buf, int n) =20 int riscv_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) { + RISCVCPUClass *mcc =3D RISCV_CPU_GET_CLASS(cs); RISCVCPU *cpu =3D RISCV_CPU(cs); CPURISCVState *env =3D &cpu->env; int length =3D 0; target_ulong tmp; =20 - switch (env->misa_mxl_max) { + switch (mcc->misa_mxl_max) { case MXL_RV32: tmp =3D (int32_t)ldl_p(mem_buf); length =3D 4; @@ -214,11 +216,12 @@ static int riscv_gdb_set_virtual(CPURISCVState *cs, u= int8_t *mem_buf, int n) =20 static int riscv_gen_dynamic_csr_xml(CPUState *cs, int base_reg) { + RISCVCPUClass *mcc =3D RISCV_CPU_GET_CLASS(cs); RISCVCPU *cpu =3D RISCV_CPU(cs); CPURISCVState *env =3D &cpu->env; GString *s =3D g_string_new(NULL); riscv_csr_predicate_fn predicate; - int bitsize =3D 16 << env->misa_mxl_max; + int bitsize =3D 16 << mcc->misa_mxl_max; int i; =20 #if !defined(CONFIG_USER_ONLY) @@ -310,6 +313,7 @@ static int ricsv_gen_dynamic_vector_xml(CPUState *cs, i= nt base_reg) =20 void riscv_cpu_register_gdb_regs_for_features(CPUState *cs) { + RISCVCPUClass *mcc =3D RISCV_CPU_GET_CLASS(cs); RISCVCPU *cpu =3D RISCV_CPU(cs); CPURISCVState *env =3D &cpu->env; if (env->misa_ext & RVD) { @@ -326,7 +330,7 @@ void riscv_cpu_register_gdb_regs_for_features(CPUState = *cs) ricsv_gen_dynamic_vector_xml(cs, base_reg= ), "riscv-vector.xml", 0); } - switch (env->misa_mxl_max) { + switch (mcc->misa_mxl_max) { case MXL_RV32: gdb_register_coprocessor(cs, riscv_gdb_get_virtual, riscv_gdb_set_virtual, diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c index 26e68c7ab4..5180ccd2d4 100644 --- a/target/riscv/kvm/kvm-cpu.c +++ b/target/riscv/kvm/kvm-cpu.c @@ -1461,14 +1461,14 @@ static void kvm_cpu_accel_register_types(void) } type_init(kvm_cpu_accel_register_types); =20 -static void riscv_host_cpu_init(Object *obj) +static void riscv_host_cpu_class_init(ObjectClass *c, void *data) { - CPURISCVState *env =3D &RISCV_CPU(obj)->env; + RISCVCPUClass *mcc =3D RISCV_CPU_CLASS(c); =20 #if defined(TARGET_RISCV32) - env->misa_mxl_max =3D env->misa_mxl =3D MXL_RV32; + mcc->misa_mxl_max =3D MXL_RV32; #elif defined(TARGET_RISCV64) - env->misa_mxl_max =3D env->misa_mxl =3D MXL_RV64; + mcc->misa_mxl_max =3D MXL_RV64; #endif } =20 @@ -1476,7 +1476,7 @@ static const TypeInfo riscv_kvm_cpu_type_infos[] =3D { { .name =3D TYPE_RISCV_CPU_HOST, .parent =3D TYPE_RISCV_CPU, - .instance_init =3D riscv_host_cpu_init, + .class_init =3D riscv_host_cpu_class_init, } }; =20 diff --git a/target/riscv/machine.c b/target/riscv/machine.c index c7c862cdd3..c7124a068c 100644 --- a/target/riscv/machine.c +++ b/target/riscv/machine.c @@ -175,10 +175,9 @@ static const VMStateDescription vmstate_pointermasking= =3D { =20 static bool rv128_needed(void *opaque) { - RISCVCPU *cpu =3D opaque; - CPURISCVState *env =3D &cpu->env; + RISCVCPUClass *mcc =3D RISCV_CPU_GET_CLASS(opaque); =20 - return env->misa_mxl_max =3D=3D MXL_RV128; + return mcc->misa_mxl_max =3D=3D MXL_RV128; } =20 static const VMStateDescription vmstate_rv128 =3D { @@ -369,7 +368,7 @@ const VMStateDescription vmstate_riscv_cpu =3D { VMSTATE_UINTTL(env.vext_ver, RISCVCPU), VMSTATE_UINT32(env.misa_mxl, RISCVCPU), VMSTATE_UINT32(env.misa_ext, RISCVCPU), - VMSTATE_UINT32(env.misa_mxl_max, RISCVCPU), + VMSTATE_UNUSED(4), VMSTATE_UINT32(env.misa_ext_mask, RISCVCPU), VMSTATE_UINTTL(env.priv, RISCVCPU), VMSTATE_BOOL(env.virt_enabled, RISCVCPU), diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 7f45e42000..5bf9d31f7c 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -152,10 +152,9 @@ static void riscv_cpu_validate_misa_mxl(RISCVCPU *cpu) { RISCVCPUClass *mcc =3D RISCV_CPU_GET_CLASS(cpu); CPUClass *cc =3D CPU_CLASS(mcc); - CPURISCVState *env =3D &cpu->env; =20 /* Validate that MISA_MXL is set properly. */ - switch (env->misa_mxl_max) { + switch (mcc->misa_mxl_max) { #ifdef TARGET_RISCV64 case MXL_RV64: case MXL_RV128: @@ -265,6 +264,7 @@ static void riscv_cpu_disable_priv_spec_isa_exts(RISCVC= PU *cpu) */ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, Error **errp) { + RISCVCPUClass *mcc =3D RISCV_CPU_GET_CLASS(cpu); CPURISCVState *env =3D &cpu->env; Error *local_err =3D NULL; =20 @@ -445,7 +445,7 @@ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, E= rror **errp) cpu_cfg_ext_auto_update(cpu, CPU_CFG_OFFSET(ext_zcb), true); cpu_cfg_ext_auto_update(cpu, CPU_CFG_OFFSET(ext_zcmp), true); cpu_cfg_ext_auto_update(cpu, CPU_CFG_OFFSET(ext_zcmt), true); - if (riscv_has_ext(env, RVF) && env->misa_mxl_max =3D=3D MXL_RV32) { + if (riscv_has_ext(env, RVF) && mcc->misa_mxl_max =3D=3D MXL_RV32) { cpu_cfg_ext_auto_update(cpu, CPU_CFG_OFFSET(ext_zcf), true); } } @@ -453,7 +453,7 @@ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, E= rror **errp) /* zca, zcd and zcf has a PRIV 1.12.0 restriction */ if (riscv_has_ext(env, RVC) && env->priv_ver >=3D PRIV_VERSION_1_12_0)= { cpu_cfg_ext_auto_update(cpu, CPU_CFG_OFFSET(ext_zca), true); - if (riscv_has_ext(env, RVF) && env->misa_mxl_max =3D=3D MXL_RV32) { + if (riscv_has_ext(env, RVF) && mcc->misa_mxl_max =3D=3D MXL_RV32) { cpu_cfg_ext_auto_update(cpu, CPU_CFG_OFFSET(ext_zcf), true); } if (riscv_has_ext(env, RVD)) { @@ -461,7 +461,7 @@ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, E= rror **errp) } } =20 - if (env->misa_mxl_max !=3D MXL_RV32 && cpu->cfg.ext_zcf) { + if (mcc->misa_mxl_max !=3D MXL_RV32 && cpu->cfg.ext_zcf) { error_setg(errp, "Zcf extension is only relevant to RV32"); return; } @@ -861,7 +861,7 @@ static void riscv_init_max_cpu_extensions(Object *obj) const RISCVCPUMultiExtConfig *prop; =20 /* Enable RVG, RVJ and RVV that are disabled by default */ - riscv_cpu_set_misa(env, env->misa_mxl, env->misa_ext | RVG | RVJ | RVV= ); + riscv_cpu_set_misa_ext(env, env->misa_ext | RVG | RVJ | RVV); =20 for (prop =3D riscv_cpu_extensions; prop && prop->name; prop++) { isa_ext_update_enabled(cpu, prop->offset, true); diff --git a/target/riscv/translate.c b/target/riscv/translate.c index f0be79bb16..7e383c5eeb 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -1167,6 +1167,7 @@ static void riscv_tr_init_disas_context(DisasContextB= ase *dcbase, CPUState *cs) { DisasContext *ctx =3D container_of(dcbase, DisasContext, base); CPURISCVState *env =3D cpu_env(cs); + RISCVCPUClass *mcc =3D RISCV_CPU_GET_CLASS(cs); RISCVCPU *cpu =3D RISCV_CPU(cs); uint32_t tb_flags =3D ctx->base.tb->flags; =20 @@ -1188,7 +1189,7 @@ static void riscv_tr_init_disas_context(DisasContextB= ase *dcbase, CPUState *cs) ctx->cfg_vta_all_1s =3D cpu->cfg.rvv_ta_all_1s; ctx->vstart_eq_zero =3D FIELD_EX32(tb_flags, TB_FLAGS, VSTART_EQ_ZERO); ctx->vl_eq_vlmax =3D FIELD_EX32(tb_flags, TB_FLAGS, VL_EQ_VLMAX); - ctx->misa_mxl_max =3D env->misa_mxl_max; + ctx->misa_mxl_max =3D mcc->misa_mxl_max; ctx->xl =3D FIELD_EX32(tb_flags, TB_FLAGS, XL); ctx->address_xl =3D FIELD_EX32(tb_flags, TB_FLAGS, AXL); ctx->cs =3D cs; --=20 2.42.0 From nobody Wed Nov 27 11:51:00 2024 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=1698645001; cv=none; d=zohomail.com; s=zohoarc; b=UDLbjN0KqvSpZdwFB7nQnJFLUDjw5qjB7qtRj4feWN306RGEteuLON9HB58vnJT82CJCblwhFkzFr7UjAWiXBH28mr0QxcGuAeLNqflAI1dzMRw5LheYHOzwAUu9w0SRIfYwvW4eiqMx24y7GxpYV9AO4AHlYyLkR9pe5tTqj9U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698645001; 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:Message-Id:Reply-To:To; bh=1vPLdUWkEk40yEOF5gq0S///XvdLUlYQ5AFFo+4KYK0=; b=XZEo7x6CcJU5k28Y/Gq+Xcw9VpNpaoAud+jn71cs1wLNtOi0408mTD8xrlA54S2fM+h8mS8vjYISSWnKeyyXPWUTDbn061E1eXfPfUNDYx2qgMRIJHgtgVMvYYIZAmlgRt4Fn6YjL84lBKl7wCwAwYYAGGV1eHWEPMd4650lAkY= 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 16986450017281001.1121560139246; Sun, 29 Oct 2023 22:50:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxL9I-0002f1-F4; Mon, 30 Oct 2023 01:49:16 -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 1qxL9C-0002e3-7r for qemu-devel@nongnu.org; Mon, 30 Oct 2023 01:49:11 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0: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 1qxL9A-0006yn-NS for qemu-devel@nongnu.org; Mon, 30 Oct 2023 01:49:10 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6be0277c05bso3448512b3a.0 for ; Sun, 29 Oct 2023 22:49:08 -0700 (PDT) Received: from localhost ([2400:4050:a840:1e00:78d2:b862:10a7:d486]) by smtp.gmail.com with UTF8SMTPSA id v1-20020aa78501000000b006c031c6c200sm5086779pfn.88.2023.10.29.22.49.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Oct 2023 22:49:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1698644946; x=1699249746; 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=1vPLdUWkEk40yEOF5gq0S///XvdLUlYQ5AFFo+4KYK0=; b=qebRkuUnNCNRdHMiEnOt6oQruCbUUR4x3OW1f4ck1G5rW3hhI8by5lkQG0UEPw/1k8 LwjtBuBS2qRKDr8h6U+5v1LZw9ext87kWnviHLYnGJ4FPIpgRUQKyiu44kKcvmVy5O9S bZOEJbVNdMCiLOhZWPdPJ+amTBxwBV6woa/gQDtFeW7PufSmt33dKx4XaOmRmRIrIETM 4jJtjBsNX/k6+/4thNqEE7kiMb5dv+pr1wqjwmKRgO1sByuYp0b5zfJDewJQYIbgaLyB mArX5JFzz4q4LmBqKStgCoL0DYsGdJcc7Ehln8Bq53hZtwWlapEa8/vkQgY6CZ36VEZ9 LCqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698644946; x=1699249746; 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=1vPLdUWkEk40yEOF5gq0S///XvdLUlYQ5AFFo+4KYK0=; b=A6XHWrrk+PCHPYIRziYUzuUzchFmVKlUC0dgq/sLkQc6wXLFdiZpOCC5EDMWXY42+g qtYNAmzTck4rt+nBNzBRzNU5RWOlGs18+lowNIQgxkijw+vD0m18cCw1wB/TnXiqcimA 0PA6yBh1cy61aUCskYVDmsIhwJzR0DVB8a4pZhvKU1LoMB8KryM12xtGbzaFhdgofqek 7pp/1sGTUYF5Q9wAttUf48SvM8nutkp56TVv6q3B5UGmmBXrqYBif0X4LjoI8cY0sikI F0yTT/A0xW8upcHxjZLe9ILExDmJy+DIuXcZr0C6K07dQRiDi63gwtZ3GI1urwEvbCUw Wgjg== X-Gm-Message-State: AOJu0YzbPvWCfJi7Iy8dfBjMjcexCOCvwoD3fpUqzQffiagA54U2+Fae 0T0dt13ar5Bw2E99V5Gi/j8sSw== X-Google-Smtp-Source: AGHT+IFIk4uSVvqhxppPs58+JEtRE+s/LsUKN9ORnnvTR/mPbbdaNCHSAuFRxu/10+ZZFChVfmueQA== X-Received: by 2002:a05:6a00:1803:b0:693:42d2:cde0 with SMTP id y3-20020a056a00180300b0069342d2cde0mr7097089pfa.22.1698644946495; Sun, 29 Oct 2023 22:49:06 -0700 (PDT) From: Akihiko Odaki To: Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Mikhail Tyutin , Aleksandr Anenkov , qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Fabiano Rosas , Akihiko Odaki , Palmer Dabbelt , Alistair Francis , Bin Meng , Weiwei Li , Daniel Henrique Barboza , Liu Zhiwei , qemu-riscv@nongnu.org Subject: [PATCH v6 4/5] target/riscv: Validate misa_mxl_max only once Date: Mon, 30 Oct 2023 14:46:38 +0900 Message-ID: <20231030054834.39145-5-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231030054834.39145-1-akihiko.odaki@daynix.com> References: <20231030054834.39145-1-akihiko.odaki@daynix.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: none client-ip=2607:f8b0:4864:20::434; envelope-from=akihiko.odaki@daynix.com; helo=mail-pf1-x434.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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 @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1698645004639100013 Content-Type: text/plain; charset="utf-8" misa_mxl_max is now a class member and initialized only once for each class. This also moves the initialization of gdb_core_xml_file which will be referenced before realization in the future. Signed-off-by: Akihiko Odaki --- target/riscv/cpu.c | 21 +++++++++++++++++++++ target/riscv/tcg/tcg-cpu.c | 23 ----------------------- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 1fb5747f00..72124e57fd 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1193,6 +1193,26 @@ static const MISAExtInfo misa_ext_info_arr[] =3D { MISA_EXT_INFO(RVG, "g", "General purpose (IMAFD_Zicsr_Zifencei)"), }; =20 +static void riscv_cpu_validate_misa_mxl(RISCVCPUClass *mcc) +{ + CPUClass *cc =3D CPU_CLASS(mcc); + + /* Validate that MISA_MXL is set properly. */ + switch (mcc->misa_mxl_max) { +#ifdef TARGET_RISCV64 + case MXL_RV64: + case MXL_RV128: + cc->gdb_core_xml_file =3D "riscv-64bit-cpu.xml"; + break; +#endif + case MXL_RV32: + cc->gdb_core_xml_file =3D "riscv-32bit-cpu.xml"; + break; + default: + g_assert_not_reached(); + } +} + static int riscv_validate_misa_info_idx(uint32_t bit) { int idx; @@ -1593,6 +1613,7 @@ static void riscv_cpu_class_init(ObjectClass *c, void= *data) RISCVCPUClass *mcc =3D RISCV_CPU_CLASS(c); =20 mcc->misa_mxl_max =3D (uint32_t)(uintptr_t)data; + riscv_cpu_validate_misa_mxl(mcc); } =20 static void riscv_isa_string_ext(RISCVCPU *cpu, char **isa_str, diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 5bf9d31f7c..a82c49ef67 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -148,27 +148,6 @@ static void riscv_cpu_validate_misa_priv(CPURISCVState= *env, Error **errp) } } =20 -static void riscv_cpu_validate_misa_mxl(RISCVCPU *cpu) -{ - RISCVCPUClass *mcc =3D RISCV_CPU_GET_CLASS(cpu); - CPUClass *cc =3D CPU_CLASS(mcc); - - /* Validate that MISA_MXL is set properly. */ - switch (mcc->misa_mxl_max) { -#ifdef TARGET_RISCV64 - case MXL_RV64: - case MXL_RV128: - cc->gdb_core_xml_file =3D "riscv-64bit-cpu.xml"; - break; -#endif - case MXL_RV32: - cc->gdb_core_xml_file =3D "riscv-32bit-cpu.xml"; - break; - default: - g_assert_not_reached(); - } -} - static void riscv_cpu_validate_priv_spec(RISCVCPU *cpu, Error **errp) { CPURISCVState *env =3D &cpu->env; @@ -568,8 +547,6 @@ static bool tcg_cpu_realize(CPUState *cs, Error **errp) return false; } =20 - riscv_cpu_validate_misa_mxl(cpu); - riscv_cpu_validate_priv_spec(cpu, &local_err); if (local_err !=3D NULL) { error_propagate(errp, local_err); --=20 2.42.0 From nobody Wed Nov 27 11:51:00 2024 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=1698645033; cv=none; d=zohomail.com; s=zohoarc; b=U/j93of+ZTHs91j9wsOalFiLL7tzEsHrzejYmmw4Gn7zxe/WyPMPjzMVP/XjZfodnzlowRgtYY4H6Onn3v4Dnv7QLCu5uxLoKin2OqqErPzNxOMzT8gceanTLzubAXV4ofgxMbObiO6HkTZghVxdY5j4hQjYKU/eOySniAT21Ig= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698645033; 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:Message-Id:Reply-To:To; bh=k/NWG403wJIbU9ivTT7Mi0lMuYA38XHvHBvWDVRsrhE=; b=iitlWVRL647Hdx4av+kgvYLWo9impSdrNi6cxgtXpJPyCVh4SFBKZ09ORaDU+qirrNMuxpICtYdAQfwD42/ZT4AcORkFfG85AfjT9pVivLIbocLeokY8XZ4UXQKgZdX0dvkrXDT8xuBRrMK66YyOGMoHWBI1i9vD2GkrF8wcn6k= 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 1698645033952763.7944800268571; Sun, 29 Oct 2023 22:50:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxL9O-0002hT-4P; Mon, 30 Oct 2023 01:49:22 -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 1qxL9F-0002eV-6m for qemu-devel@nongnu.org; Mon, 30 Oct 2023 01:49:14 -0400 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qxL9D-0006z7-4v for qemu-devel@nongnu.org; Mon, 30 Oct 2023 01:49:12 -0400 Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-6c0b8f42409so2893144a34.0 for ; Sun, 29 Oct 2023 22:49:10 -0700 (PDT) Received: from localhost ([2400:4050:a840:1e00:78d2:b862:10a7:d486]) by smtp.gmail.com with UTF8SMTPSA id it8-20020a056a00458800b00672ea40b8a9sm5282473pfb.170.2023.10.29.22.49.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Oct 2023 22:49:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1698644950; x=1699249750; 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=k/NWG403wJIbU9ivTT7Mi0lMuYA38XHvHBvWDVRsrhE=; b=fPsH7iaecIU6faG1QIsPeSWVT+N68BtxI3HEllIqZUR7cS2IWLgyT1FidIgRYM9XJt 8ai+H+kWIHWzPbFBk7ntndJ5v7OpD54uJUQhQ8S1KFd6dyV4kj+3KdqAwmBgvkWxJUOA mqhhbYRSnZGIPgkQjK3qagUSBbxXX1ObZZgx+zwbhcmATsGO9WA0J3zlPqCgG7knt2aX xucZJZUYyiVwlsN6cb1/7vFNdPG3q6b8YqYwkpFjY1aFOfctRWY8BpJxMRfYzojUF6KE ZsriNIE1UJaJiGO/9lAW87DVH5cjI6hMLXl2Q57c7yDTFYe7zEroxYp7eSjC2cjK1Jtx 3Btw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698644950; x=1699249750; 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=k/NWG403wJIbU9ivTT7Mi0lMuYA38XHvHBvWDVRsrhE=; b=R/viH2Z1DxVXiT5bAqJcKW0D4QwNUGWX10T9NHutaurfpH7ihs6uJJeNlIG4Dqyvih K4iidj+ww9ThMlCUcQUg/4j9Khbt5HcJe8WFww6eIRScQttbJDpDvLT9wMj91OsLqkU/ uO1hcXOBTvZozmo3m56smXhkapktip141gTBwYcKSLYLuCEBfG+pFmO7zVdNIQR5eNn7 dWFtiIxYKwo2yHlFIK6yDPIlck8w2V563YL/K+cDRNj5NNEiVyx3v6eWtC5zSTjldNt7 s5ctMNGcidt+jxq5rtue2tlhWWLH+kQvloQy8zHc0G2pAzFCvo5GQP11rlHdr08zoQ2u jIjw== X-Gm-Message-State: AOJu0YxegL1oJM5T3CfUIA/J0jNvFNuLj0/A27isRhvadUn4SasFw/QS RUFJZH0qJT268GQBuK4qD9Y5Ig== X-Google-Smtp-Source: AGHT+IG0ZDO20nUxrhQVm28/8m3uYMn1Ryibp0Um91unWKx/vdyHAcklq8vK5Mk7bbs453Hcpyg3Uw== X-Received: by 2002:a9d:7499:0:b0:6cd:942:25c5 with SMTP id t25-20020a9d7499000000b006cd094225c5mr10613783otk.22.1698644950123; Sun, 29 Oct 2023 22:49:10 -0700 (PDT) From: Akihiko Odaki To: Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Mikhail Tyutin , Aleksandr Anenkov , qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Fabiano Rosas , Akihiko Odaki , Laurent Vivier Subject: [PATCH v6 5/5] default-configs: Add TARGET_XML_FILES definition Date: Mon, 30 Oct 2023 14:46:39 +0900 Message-ID: <20231030054834.39145-6-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231030054834.39145-1-akihiko.odaki@daynix.com> References: <20231030054834.39145-1-akihiko.odaki@daynix.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: none client-ip=2607:f8b0:4864:20::32b; envelope-from=akihiko.odaki@daynix.com; helo=mail-ot1-x32b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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 @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1698645036193100001 Content-Type: text/plain; charset="utf-8" loongarch64-linux-user has references to XML files so include them. Fixes: d32688ecdb ("default-configs: Add loongarch linux-user support") Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- configs/targets/loongarch64-linux-user.mak | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/targets/loongarch64-linux-user.mak b/configs/targets/l= oongarch64-linux-user.mak index 7d1b964020..43b8a2160f 100644 --- a/configs/targets/loongarch64-linux-user.mak +++ b/configs/targets/loongarch64-linux-user.mak @@ -1,3 +1,4 @@ # Default configuration for loongarch64-linux-user TARGET_ARCH=3Dloongarch64 TARGET_BASE_ARCH=3Dloongarch +TARGET_XML_FILES=3Dgdb-xml/loongarch-base32.xml gdb-xml/loongarch-base64.x= ml gdb-xml/loongarch-fpu.xml --=20 2.42.0