From nobody Tue Feb 10 12:43:06 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=1659483414; cv=none; d=zohomail.com; s=zohoarc; b=W8jS59h92Qtei7En4oe9XLXNqGuBrtVJGYHNEfxW/ktJRann0YQEVUTOkpfVAx21RWk5VBgnEQi4eaZdbr3yPeAPCT4IOkaW5FR6edh7SnpjEaolkk6aDGDtKPbboEy1MZVu+7HLHZicsa87Iuy2XGsWthgUD2kIiV4j37x63xA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1659483414; 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=IugXNRq9zAwf3g2+57C9ciPWpdIXzCHebpc0gHhtpPs=; b=UaBJIdCKmyOWTDGLIVewCdtPjR2hNkXvFQsE6EYwIWFwXo1D3IqzfLd6I7UljrpX5MvjoUFjMNPTOhAcKLUjmnXG/Vvtoa8d9tpAAcIOe8bz8xVlW5HH+8JILJ0qV+sp4ooWMgd1eelyUFT0MqS9+q3fwNyEopY7b60FomfDhrU= 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 1659483414175978.9724653602066; Tue, 2 Aug 2022 16:36:54 -0700 (PDT) Received: from localhost ([::1]:47578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJ1RU-00073z-5i for importer@patchew.org; Tue, 02 Aug 2022 19:36:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJ1O7-0003H6-0k for qemu-devel@nongnu.org; Tue, 02 Aug 2022 19:33:23 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]:46919) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJ1O5-0007mi-E4 for qemu-devel@nongnu.org; Tue, 02 Aug 2022 19:33:22 -0400 Received: by mail-pf1-x433.google.com with SMTP id 130so7135607pfv.13 for ; Tue, 02 Aug 2022 16:33:20 -0700 (PDT) Received: from atishp.ba.rivosinc.com ([66.220.2.162]) by smtp.gmail.com with ESMTPSA id s10-20020a170902a50a00b001636d95fe59sm250543plq.172.2022.08.02.16.33.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 16:33:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=IugXNRq9zAwf3g2+57C9ciPWpdIXzCHebpc0gHhtpPs=; b=XPLtLL3F5oy+UVJLmNlyqz2ry76iM3TFvgoqrEbIEZR0S+JAAz/P57olgRixQXLzEg ZmEtsHFg4H4usx1GLuSXwQTlN/jPlcTn6mB3FBZqAVBFm09vpJkkt6WftAZ7z5TeCTQD vvebt/7u+YImKLpsFMI8OiBYSJpQbYZ8SoqbAX1Z+pV8z1Al49khvH4rHZlBGCwRRXF2 B8+4FSGnB/fgABBuAw4YamoaXfr7T/IU4TtxDYiq1ggtVLHjdxQnTrTccBzT1+lUhBS1 D0vKIjHQcZW4tJS7V4D+d2MKBgZfqVZKu7n60PBkRlhboEPdHcg5JJAVrDIvlrMpgess TLKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=IugXNRq9zAwf3g2+57C9ciPWpdIXzCHebpc0gHhtpPs=; b=qVsYUEmrXQlK7hdqjQpGywvoqMg3ZdQxsCW4yXkZE7cniQjSfcHTzOQSjPS4iVR6w1 rYC29VatwV53U3soo3e3VJw1p0QMfPJQl48Dd5lqDbSK7EieWilZAHz+a6OMCvBT9vpL SOBOM2sjZ4ZTpZ2En/9E9Xjw9gVLvmOa+b+V1DytMO+/1pnrivpnPyISRKr9FzPZsDh2 aqa1uq/W0Az4+W1jAdsSVbZZM2ZyVQ2N0/PYeFclI9MYTE+6MqjsA2BBEL04zjrbo9Bc 2joiRGiXAyUl4+RsSUVIPjYFDVSCqvEYydh5RzFC5y+jGUninonpGiIYU4QVpqNShJFH wMBw== X-Gm-Message-State: AJIora8dfcVhAlw/TH81RS806AmyrOmAcEAB8fdo+3zzh/whQtoseEZL 8fbv3cQ0o0ZC3ISPabYXvuvah9aN22vUGw== X-Google-Smtp-Source: AGRyM1sC56QhUAk9qCFrdxZTG5MSQ5crsAznIQjoayhgdLUL23J7QnuM1P/ybDA1LOqb0yM6xlcXvA== X-Received: by 2002:a63:1324:0:b0:419:afb2:af7b with SMTP id i36-20020a631324000000b00419afb2af7bmr18652638pgl.367.1659483199984; Tue, 02 Aug 2022 16:33:19 -0700 (PDT) From: Atish Patra To: qemu-devel@nongnu.org Cc: Heiko Stuebner , Atish Patra , Alistair Francis , Bin Meng , Palmer Dabbelt , qemu-riscv@nongnu.org Subject: [PATCH v12 6/6] target/riscv: Remove additional priv version check for mcountinhibit Date: Tue, 2 Aug 2022 16:33:07 -0700 Message-Id: <20220802233307.2106839-7-atishp@rivosinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220802233307.2106839-1-atishp@rivosinc.com> References: <20220802233307.2106839-1-atishp@rivosinc.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::433; envelope-from=atishp@rivosinc.com; helo=mail-pf1-x433.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_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" X-ZohoMail-DKIM: pass (identity @rivosinc-com.20210112.gappssmtp.com) X-ZM-MESSAGEID: 1659483415487100001 Content-Type: text/plain; charset="utf-8" With .min_priv_version, additiona priv version check is uncessary for mcountinhibit read/write functions. Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Atish Patra Reviewed-by: Alistair Francis --- target/riscv/csr.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 8753280e95b2..67367e678f38 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -1489,10 +1489,6 @@ static RISCVException write_mtvec(CPURISCVState *env= , int csrno, static RISCVException read_mcountinhibit(CPURISCVState *env, int csrno, target_ulong *val) { - if (env->priv_ver < PRIV_VERSION_1_11_0) { - return RISCV_EXCP_ILLEGAL_INST; - } - *val =3D env->mcountinhibit; return RISCV_EXCP_NONE; } @@ -1503,10 +1499,6 @@ static RISCVException write_mcountinhibit(CPURISCVSt= ate *env, int csrno, int cidx; PMUCTRState *counter; =20 - if (env->priv_ver < PRIV_VERSION_1_11_0) { - return RISCV_EXCP_ILLEGAL_INST; - } - env->mcountinhibit =3D val; =20 /* Check if any other counter is also monitoring cycles/instructions */ --=20 2.25.1