From patchwork Sat Apr 20 02:27:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 10909907 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C059C13B5 for ; Sat, 20 Apr 2019 02:33:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A75711FF62 for ; Sat, 20 Apr 2019 02:33:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AF40212BE; Sat, 20 Apr 2019 02:33:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 35D701FF62 for ; Sat, 20 Apr 2019 02:33:39 +0000 (UTC) Received: from localhost ([127.0.0.1]:35900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHfow-0003Hz-Dh for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Apr 2019 22:33:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHfiy-0006Pf-9u for qemu-devel@nongnu.org; Fri, 19 Apr 2019 22:27:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHfiw-0003r3-DB for qemu-devel@nongnu.org; Fri, 19 Apr 2019 22:27:28 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:28911) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hHfiu-0003bL-0q; Fri, 19 Apr 2019 22:27:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1555727244; x=1587263244; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=KYgkWVv3K+7b5++g31S6N/taT737miEvtdeuDvG/xNM=; b=em3H+YNI/Bi8GUOcF0e5MiCD1G6SZUbgJn3jcnUtdpd3e/o4h5u99eQt mt5D80Jgo/o9PXXJhPGOCKC+ScufZDRCXXZnw158MuWqFmGLbFbMD1lK6 qTHQ5WJmLnDArqpvhy1bfqbnQO2s9MURTUCoDLm7qr00eqJm9i5/uGzfh L40r5TAk5sUS0uI7/aRrZF/IgSV4E4ApNXWUaYUtRPI6ug7vIr7hx5fXh YB40wfUCvI8dtmYjpx3QzMxSjFHNaCc6zkly2Kr4YBtI58tuz2QyTE3SC yLM98/pOsa8ymwWCy0D4x3TA1+GIrKH7Q++lecbEnFtgjdEFGme7fk2yr w==; X-IronPort-AV: E=Sophos;i="5.60,372,1549900800"; d="scan'208";a="107617965" Received: from mail-bn3nam01lp2058.outbound.protection.outlook.com (HELO NAM01-BN3-obe.outbound.protection.outlook.com) ([104.47.33.58]) by ob1.hgst.iphmx.com with ESMTP; 20 Apr 2019 10:27:12 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KYgkWVv3K+7b5++g31S6N/taT737miEvtdeuDvG/xNM=; b=UCFhqVlZhZC61ENLqf0D7fRwwfTDTt9/cMKu06z8hit8TkygdA0Rcc2QNTLocpWwS+vtOWnRlZQEOJqcGySIBs5Xz0HOXJr9/KTmcDIK+ZnHrxeKNu0FCpchoS1km2GL2bGE/RNqERRQpvwyxKFGynkNAwsaQ9rZS+ncodydDuY= Received: from BYAPR04MB4901.namprd04.prod.outlook.com (52.135.232.206) by BYAPR04MB5319.namprd04.prod.outlook.com (20.178.49.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.14; Sat, 20 Apr 2019 02:27:10 +0000 Received: from BYAPR04MB4901.namprd04.prod.outlook.com ([fe80::44e8:bd21:17b:348c]) by BYAPR04MB4901.namprd04.prod.outlook.com ([fe80::44e8:bd21:17b:348c%4]) with mapi id 15.20.1813.011; Sat, 20 Apr 2019 02:27:10 +0000 From: Alistair Francis To: "qemu-devel@nongnu.org" , "qemu-riscv@nongnu.org" Thread-Topic: [PATCH v1 4/8] target/riscv: Add the MPV and MTL mstatus bits Thread-Index: AQHU9yCO0d8tvYuUxkiKpuzvdvchWA== Date: Sat, 20 Apr 2019 02:27:10 +0000 Message-ID: <0ce46ddcaf8009df9a4f53aa7516455c1dda016d.1555727081.git.alistair.francis@wdc.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.21.0 x-clientproxiedby: BYAPR02CA0003.namprd02.prod.outlook.com (2603:10b6:a02:ee::16) To BYAPR04MB4901.namprd04.prod.outlook.com (2603:10b6:a03:4f::14) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alistair.Francis@wdc.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [199.255.44.172] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d9bfff9c-6630-4837-b91c-08d6c537b113 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:BYAPR04MB5319; x-ms-traffictypediagnostic: BYAPR04MB5319: wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-forefront-prvs: 0013079544 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(366004)(136003)(396003)(346002)(39860400002)(199004)(189003)(50226002)(52116002)(6486002)(14454004)(446003)(6436002)(76176011)(476003)(486006)(3846002)(6116002)(97736004)(2616005)(7736002)(81156014)(8676002)(478600001)(8936002)(72206003)(386003)(6506007)(81166006)(102836004)(26005)(186003)(36756003)(316002)(6512007)(44832011)(53936002)(68736007)(66066001)(118296001)(25786009)(4326008)(305945005)(99286004)(54906003)(2906002)(11346002)(110136005)(2501003)(256004)(64756008)(66446008)(66556008)(73956011)(66946007)(66476007)(71200400001)(5660300002)(71190400001)(86362001); DIR:OUT; SFP:1102; SCL:1; SRVR:BYAPR04MB5319; H:BYAPR04MB4901.namprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: DZIcR47O1FjJ9zwGrMXxWAVDczTJj1ysR+KNgnhqw8OOEbKT/zElUswCNdGSqvpzv5qL4fikD5bOw3R5/ECwpmWvmlxXWkZWuCVsjSRkX4suZ/4z2i4s3Q+uV+aU0VP0fnnesYZYuvIXWjAma/kPJntQ/w0XnMkfv5bQi0rEygr4G8yHxhveWMJkXuhUVWGWov5Rq2hFvW/uOl51Fzr+Ac2TiLT4+T9fw0QT33Ebx5rj/592o8WdxTUx+MhMVeTzy0Qpz3hmdNVMUQs1SpRzVAh4enawAN14yGkok7DVihcK/I0qnOIT//hqcv6shPHzTQADbCEZU5BzagvcSieSyVF+8Ps2VBLHsBWzQjEz2oWFgj7/kVFqrSJM0XG6VQ7yk38zwDFP+eqh35yAHN+aSfwIjEJwuu8lBypnDzpiYc4= MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: d9bfff9c-6630-4837-b91c-08d6c537b113 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2019 02:27:10.6618 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR04MB5319 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 216.71.153.144 Subject: [Qemu-devel] [PATCH v1 4/8] target/riscv: Add the MPV and MTL mstatus bits X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "alistair23@gmail.com" , "palmer@sifive.com" , Alistair Francis Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Alistair Francis --- target/riscv/cpu_bits.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h index 945aa8dbb8..fe7164754b 100644 --- a/target/riscv/cpu_bits.h +++ b/target/riscv/cpu_bits.h @@ -316,14 +316,11 @@ /* mstatus CSR bits */ #define MSTATUS_UIE 0x00000001 #define MSTATUS_SIE 0x00000002 -#define MSTATUS_HIE 0x00000004 #define MSTATUS_MIE 0x00000008 #define MSTATUS_UPIE 0x00000010 #define MSTATUS_SPIE 0x00000020 -#define MSTATUS_HPIE 0x00000040 #define MSTATUS_MPIE 0x00000080 #define MSTATUS_SPP 0x00000100 -#define MSTATUS_HPP 0x00000600 #define MSTATUS_MPP 0x00001800 #define MSTATUS_FS 0x00006000 #define MSTATUS_XS 0x00018000 @@ -335,6 +332,8 @@ #define MSTATUS_TVM 0x00100000 /* since: priv-1.10 */ #define MSTATUS_TW 0x20000000 /* since: priv-1.10 */ #define MSTATUS_TSR 0x40000000 /* since: priv-1.10 */ +#define MSTATUS_MTL 0x4000000000ULL +#define MSTATUS_MPV 0x8000000000ULL #define MSTATUS64_UXL 0x0000000300000000ULL #define MSTATUS64_SXL 0x0000000C00000000ULL