From nobody Tue Nov 11 03:22:40 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail header.i=@wdc.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=wdc.com ARC-Seal: i=1; a=rsa-sha256; t=1560821852; cv=none; d=zoho.com; s=zohoarc; b=LKfR2fSwm7VJ6GnPYX9+QzBHL/nEMbkuEO6RHDhRpAd3CjUUv2ztQ6MaswK30H6iCMu1Aiv2Ff7Nobzlc6CcAQQBq8fR39UoHA1F/znd5eOh7cH/JCBZj7buaXevgDmezNb21vUqn4o7AfbZ+6dyyaKOqHP+1FiB/y3UWZNL62I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560821852; 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:ARC-Authentication-Results; bh=sX5dpEKJIDbhW6siUKKgHx8dSRZXa4jGfMf0nM5Y0uw=; b=Qjqk3zIDoQ+vi4jo2VHqfTOUBCWfyyKOo+JuBV673U4xgcMU5Ye86fHsVK3zGJloJ3qwONL1VwU536AtkJEXxD9AppWKx2WWMBarKgzj82qb+rUcc3FIi34RAJMNCjdBSlVzRrrIj2ObMv53QQ7PxXl+wPFl+RtxyvHFzLNAqeY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail header.i=@wdc.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560821852049288.6144209123379; Mon, 17 Jun 2019 18:37:32 -0700 (PDT) Received: from localhost ([::1]:52938 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hd33t-0000Df-BT for importer@patchew.org; Mon, 17 Jun 2019 21:37:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40870) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hd307-0006cD-A0 for qemu-devel@nongnu.org; Mon, 17 Jun 2019 21:33:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hd306-0008Rg-9E for qemu-devel@nongnu.org; Mon, 17 Jun 2019 21:33:31 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:60676) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hd305-0008My-Sb; Mon, 17 Jun 2019 21:33:30 -0400 Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 18 Jun 2019 09:33:26 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 17 Jun 2019 18:32:58 -0700 Received: from risc6-mainframe.sdcorp.global.sandisk.com (HELO risc6-mainframe.int.fusionio.com) ([10.196.157.140]) by uls-op-cesaip02.wdc.com with ESMTP; 17 Jun 2019 18:33:26 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1560821610; x=1592357610; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cHdxWgwAn1Fa2k9YWEL6bbjXx/m3IzGg1kbVMyDLUYg=; b=pkkFp++bhIibAEiA/Phg7xVnPl6LW1U0ARF4O1VPeISdVaVciOBi6scm 30uiJ3P02yvACzbs5tZKkvsDdP6gtlCYkFyuZKgJUN8K2nNDV0fdWHNJ9 77SV1goaibVyQck/PEGMP9ifOjvMlgFOxVOJzSZyDJ0xBm1l2vl14YioB RRaU97kgTuLvvUU6z0xLrRvBKnX3XYHGRAT/yJ6UkchufsQCYN0+fCrnM oryjGJsIloknVLdj+rrxnCynWejrTAEBKq2vctIKUp3FJOyBLiWZFnaZu /X9iTzgT7O1jCt4ere0FakiMOXrzgUyKgpDQUiA4SWiaSJuFu75udJD32 w==; X-IronPort-AV: E=Sophos;i="5.63,386,1557158400"; d="scan'208";a="115717014" IronPort-SDR: Q1vZTfuib2nLOuovSSZ6BOaoUqU0aO1BqkO7aRa05lnpDFSvAgPPyzYzabEM1eZq5hCeKekngY IXEYbgARaEcveCr0BZ3NpKtlF9a7DuwyeU4RGMfIQOQOGljQYp5cjtnQyU91e/MFS6uj9MCvC5 Fg0zrcWPmgJAfGOXS7O1M/qiYhvo9HPscRURrbMvjlvxaYitQRqPBIxh/JxfywcokZAQSe8cXs 2RPfyUsnOClU7miVZMqZxTh7/DT4ZRXFKAuufzixL9/tut71WywwZvXgK7wBKSPrriJM4CP8j5 ohVowmGgfYVOpJAbcJsuK+Jn IronPort-SDR: LfiNOx31Jhh63yW/q+w6WpP7ijeCH9ZZgJWlMoX7n8z0ndOn/wjssnBF2I+55OhCMOu38Bzc7E g0ExqrDSvEuSikkOXVFChDG4sPUncjhZLM7Nl0J9LymJCVNNVKZTzIoPk0V4TLN/rqwdr/DYt+ x1T5JhPtXiIUkf1AS89EmyNqAGX1dWsEhjrG7Zgo1tEFAfT/3M2nDfaPFFQgc75LArzocv8iQk xwTOiE0ZIfjl2yrI5sXiKrU30HnO8p1MNJFSeNfRMd4hlBnrkMJVuIYidT8g0Jw+//m7JNjkR6 qM8= From: Alistair Francis To: qemu-devel@nongnu.org, qemu-riscv@nongnu.org Date: Mon, 17 Jun 2019 18:31:05 -0700 Message-Id: <88a6ea191c4ddc385f7ee1cdde58a27fcdc15855.1560821342.git.alistair.francis@wdc.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 216.71.153.141 Subject: [Qemu-devel] [PATCH v1 2/9] target/riscv: Add the privledge spec version 1.11.0 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alistair23@gmail.com, palmer@sifive.com, alistair.francis@wdc.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add support for the ratified RISC-V privledge spec. Signed-off-by: Alistair Francis --- target/riscv/cpu.h | 1 + target/riscv/insn_trans/trans_privileged.inc.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 1668d12018..4e58c3b856 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -81,6 +81,7 @@ enum { #define USER_VERSION_2_02_0 0x00020200 #define PRIV_VERSION_1_09_1 0x00010901 #define PRIV_VERSION_1_10_0 0x00011000 +#define PRIV_VERSION_1_11_0 0x00011100 =20 #define TRANSLATE_FAIL 1 #define TRANSLATE_SUCCESS 0 diff --git a/target/riscv/insn_trans/trans_privileged.inc.c b/target/riscv/= insn_trans/trans_privileged.inc.c index 664d6ba3f2..c5e4b3e49a 100644 --- a/target/riscv/insn_trans/trans_privileged.inc.c +++ b/target/riscv/insn_trans/trans_privileged.inc.c @@ -90,7 +90,7 @@ static bool trans_wfi(DisasContext *ctx, arg_wfi *a) static bool trans_sfence_vma(DisasContext *ctx, arg_sfence_vma *a) { #ifndef CONFIG_USER_ONLY - if (ctx->priv_ver =3D=3D PRIV_VERSION_1_10_0) { + if (ctx->priv_ver >=3D PRIV_VERSION_1_10_0) { gen_helper_tlb_flush(cpu_env); return true; } --=20 2.22.0