From nobody Tue Feb 10 04:24:38 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=1653555665; cv=none; d=zohomail.com; s=zohoarc; b=CntPcCgvr461A9PoBmFvajdCiwtEN8+A7QP94M9jbaSXQSInbEkhhhg768oDaObr+zDp9iYPq4SMY/HnZAAbJRWgOD7VPQDg26hgLjFHKr3hqe0cUw8S9owE+c9OMKaBiw/GmxtTynouc8ETUQxKwLgoSQtm3OydaopnuKgl5v8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653555665; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject; bh=aqb2foDc0AvRksUUJIvWGE1Dqmpji7BNUauUynhu7Y0=; b=Tcf+f+ch4DP0taOPOFSrF5DcOy97lKPQEz1mp+PJNmsuOCFD23dYCvLl6PnytLManf8ed/zSwkHsynIsoRR3AzH14Z4+jo241OH/r0oL+r7GUB+19oHMBN1NbCyIwcgBE0tU+OgI1oV0SvN27WxKdQzEFlpboeKMu7TzxzjNZ7s= 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 1653555665644550.5763961111516; Thu, 26 May 2022 02:01:05 -0700 (PDT) Received: from localhost ([::1]:60602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nu9Me-0008TH-G7 for importer@patchew.org; Thu, 26 May 2022 05:01:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu96p-0004Ay-6R; Thu, 26 May 2022 04:44:47 -0400 Received: from forward108p.mail.yandex.net ([77.88.28.116]:51538) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu96k-0004Ci-34; Thu, 26 May 2022 04:44:40 -0400 Received: from myt6-469628f636f5.qloud-c.yandex.net (myt6-469628f636f5.qloud-c.yandex.net [IPv6:2a02:6b8:c12:2324:0:640:4696:28f6]) by forward108p.mail.yandex.net (Yandex) with ESMTP id 24155267B2EE; Thu, 26 May 2022 11:42:44 +0300 (MSK) Received: from myt6-265321db07ea.qloud-c.yandex.net (myt6-265321db07ea.qloud-c.yandex.net [2a02:6b8:c12:2626:0:640:2653:21db]) by myt6-469628f636f5.qloud-c.yandex.net (mxback/Yandex) with ESMTP id JDroL4ykdh-ggf036IF; Thu, 26 May 2022 11:42:44 +0300 Received: by myt6-265321db07ea.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id vHae99NrIF-ggjSeULn; Thu, 26 May 2022 11:42:42 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) X-Yandex-Fwd: 2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1653554564; bh=aqb2foDc0AvRksUUJIvWGE1Dqmpji7BNUauUynhu7Y0=; h=Date:Subject:Cc:To:From:Message-Id; b=M3HB2jKZDGyYdhPIzukx2R4b8B/Ja0A7o7UZNGaL7Wq1p62UHDOudCbKtoEwn1VAJ +sfqpz8DxgddYUhPyFwcC10ROHjguHn1ZktgYWqMF82hPSiOr78MP/g/jT6BeUGhHK AzIvu4AEpFTxceBJuUxCGFFgmSMaunCOPw+Hhgb8= Authentication-Results: myt6-469628f636f5.qloud-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin To: Cc: atishp@rivosinc.com, linux@yadro.com, Nikita Shubin , Palmer Dabbelt , Alistair Francis , Bin Meng , qemu-riscv@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH] target/riscv: fix priv enum Date: Thu, 26 May 2022 11:42:40 +0300 Message-Id: <20220526084240.31298-1-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.35.1 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=77.88.28.116; envelope-from=nikita.shubin@maquefel.me; helo=forward108p.mail.yandex.net 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, 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 @maquefel.me) X-ZM-MESSAGEID: 1653555666714100001 Content-Type: text/plain; charset="utf-8" From: Nikita Shubin Add PRIV_VERSION_UNKNOWN to enum, otherwise PRIV_VERSION_1_10_0 will be overwritten to PRIV_VERSION_1_12_0 in riscv_cpu_realize. Fixes: a46d410c5c ("target/riscv: Define simpler privileged spec version nu= mbering") Signed-off-by: Nikita Shubin --- target/riscv/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index f08c3e8813..1f1d6589a7 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -91,7 +91,8 @@ enum { =20 /* Privileged specification version */ enum { - PRIV_VERSION_1_10_0 =3D 0, + PRIV_VERSION_UNKNOWN =3D 0, + PRIV_VERSION_1_10_0, PRIV_VERSION_1_11_0, PRIV_VERSION_1_12_0, }; --=20 2.35.1