From patchwork Mon Jan 20 08:58:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jiang X-Patchwork-Id: 1225739 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Tp6QlNkO; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 481Qb845jcz9sR4 for ; Mon, 20 Jan 2020 19:59:32 +1100 (AEDT) Received: from localhost ([::1]:60310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itSuA-00060G-63 for incoming@patchwork.ozlabs.org; Mon, 20 Jan 2020 03:59:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52458) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1itStX-0005vP-Dw for qemu-devel@nongnu.org; Mon, 20 Jan 2020 03:58:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1itStW-0005ry-Ft for qemu-devel@nongnu.org; Mon, 20 Jan 2020 03:58:51 -0500 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:44104) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1itStW-0005rU-An for qemu-devel@nongnu.org; Mon, 20 Jan 2020 03:58:50 -0500 Received: by mail-pg1-x541.google.com with SMTP id x7so15209882pgl.11 for ; Mon, 20 Jan 2020 00:58:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=MFJ2qpZ8zHnGiukRnHYrH2nGWXWt0vSnyJjz650iuoE=; b=Tp6QlNkOwxCw5FaK6mlQuf6/dDh5oeJ47hZJax7Xi7EVJf0yrmx8KCr65rvSMzEjJq Xr4uPV3lnP8VGAUzTLB81yf0ZwNTgCtyikgXJFeOJtlLAs/gIGO/l7lBbVmirHBAncv2 XPfZEeMi/5R3E+Or87daa6RXbKq95Adl4eCIB92RjpopOiGX6YwfU4gei5g7Ii1H+L9u IZLJzrXkyyfSOW4p3hSfkaAoKYnNIPDkHdK2Rs+5nPFn+WyJaUcj7lFPBPQC9MrDXt5j BO4IG//hk0kDGe7d9VzqG68KEEo9StfTSF2+YghQDmHHwRPmCmIdqdvkpLBQ7X6vuAXl FMLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MFJ2qpZ8zHnGiukRnHYrH2nGWXWt0vSnyJjz650iuoE=; b=kp5Oq2IzxqKPm981C+iaFftGLGrje7qaUAFU4kSN2SYkZEG9cJfPicbmnr3bils8Vy 3vI3mRHMncvgICx2TnylooblCfCQzml0qGhy9E66+TkTqDDFoUCDgOqQpqMJBpPm2WJZ nOVTI31N3bIDJLsJtotUcPjxrFvr+b7GsQ4LESBLhDFdTBNJGphU8f/GbepdngXesWks cuXrw3AAlzCAgUyY+saBF2dZanAph1bYEWI1fiH+F7FEApCd+2F7q7h93uQtb1p8j67L MAwFefWMxaTNzL/gYCp/FYNuJJjJCu+lSK0sXQK/dVKU5bwmgC4NgVCUddQ3tNjuXsfk u2BQ== X-Gm-Message-State: APjAAAWpBBRBDRTbHoNPrYlwuj9NtSt7F1xSi/z1te1YKOez8XjaUOxR hRY55TBzS8WMRt7u/PPLk8nfqD9Ezc1RG0cP X-Google-Smtp-Source: APXvYqxh0pu1DLXpjoUzCDu5aZhBWO2y0JPyvLKj+CPsFX/CVkGvFhhs/WfTrnQNl89wvZhWVBYCEQ== X-Received: by 2002:a62:cd81:: with SMTP id o123mr16781176pfg.110.1579510728974; Mon, 20 Jan 2020 00:58:48 -0800 (PST) Received: from localhost.localdomain ([111.196.189.80]) by smtp.googlemail.com with ESMTPSA id e1sm38637307pfl.98.2020.01.20.00.58.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2020 00:58:48 -0800 (PST) From: Ian Jiang To: qemu-devel@nongnu.org Subject: [PATCH] riscv: Fix defination of TW bits in mstatus CSR Date: Mon, 20 Jan 2020 16:58:17 +0800 Message-Id: <20200120085817.7000-1-ianjiang.ict@gmail.com> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::541 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: Alistair.Francis@wdc.com, palmer@dabbelt.com, Ian Jiang , sagark@eecs.berkeley.edu, kbastian@mail.uni-paderborn.de Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The origin defination of TW bits in mstatus is not correct. This patch fixes the problem. Signed-off-by: Ian Jiang Reviewed-by: Alistair Francis --- target/riscv/cpu_bits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h index e99834856c..fb2e0b340e 100644 --- a/target/riscv/cpu_bits.h +++ b/target/riscv/cpu_bits.h @@ -349,7 +349,7 @@ #define MSTATUS_MXR 0x00080000 #define MSTATUS_VM 0x1F000000 /* until: priv-1.9.1 */ #define MSTATUS_TVM 0x00100000 /* since: priv-1.10 */ -#define MSTATUS_TW 0x20000000 /* since: priv-1.10 */ +#define MSTATUS_TW 0x00200000 /* since: priv-1.10 */ #define MSTATUS_TSR 0x40000000 /* since: priv-1.10 */ #define MSTATUS_MTL 0x4000000000ULL #define MSTATUS_MPV 0x8000000000ULL