From patchwork Fri May 13 16:41:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Baumann X-Patchwork-Id: 9092491 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 70EF19F372 for ; Fri, 13 May 2016 16:41:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D07DE2022D for ; Fri, 13 May 2016 16:41:27 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 171A32021A for ; Fri, 13 May 2016 16:41:27 +0000 (UTC) Received: from localhost ([::1]:35263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1G9W-0004gv-9r for patchwork-qemu-devel@patchwork.kernel.org; Fri, 13 May 2016 12:41:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1G9K-0004bM-9v for qemu-devel@nongnu.org; Fri, 13 May 2016 12:41:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b1G9I-0008HB-Py for qemu-devel@nongnu.org; Fri, 13 May 2016 12:41:13 -0400 Received: from mail-bl2on0111.outbound.protection.outlook.com ([65.55.169.111]:18064 helo=na01-bl2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b1G9D-0008Fp-1w; Fri, 13 May 2016 12:41:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=/PWf1WRkqt8vqETlQ9nWyTz+8nBwyemelkP2PXfQ6ZU=; b=nFF2DASHymGi1iAmUuNPkQjV6m2ob4XBzhzDdxbmDWsGVhnFwVnEEYg4+lostuAbfK4Woqwu2kAXaOC9BZ+ieDnOHRyuCZt0EkIzknfBJZjzxV8eYd7boIGYNQKUxloZ1hnf5fDISoQ5SWGJKXEz89JgXAaqCheiwLlL2R9glxQ= Received: from BLUPR0301MB2034.namprd03.prod.outlook.com (10.164.22.24) by BLUPR0301MB2036.namprd03.prod.outlook.com (10.164.22.26) with Microsoft SMTP Server (TLS) id 15.1.492.11; Fri, 13 May 2016 16:41:04 +0000 Received: from BLUPR0301MB2034.namprd03.prod.outlook.com ([10.164.22.24]) by BLUPR0301MB2034.namprd03.prod.outlook.com ([10.164.22.24]) with mapi id 15.01.0492.019; Fri, 13 May 2016 16:41:04 +0000 From: Andrew Baumann To: Peter Maydell Thread-Topic: Shouldn't cortex-a15 enable ARM_FEATURE_EL2? Thread-Index: AdGtM5hhHKTDP39VRCm+lEhZVDkFVA== Date: Fri, 13 May 2016 16:41:04 +0000 Message-ID: Accept-Language: en-AU, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linaro.org; dkim=none (message not signed) header.d=none; linaro.org; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [2001:4898:80e8:5::3ea] x-ms-office365-filtering-correlation-id: 69a8a979-b513-45c9-6ce9-08d37b4d6018 x-microsoft-exchange-diagnostics: 1; BLUPR0301MB2036; 5:p+suN0FtDAQQZSMbxcFpYT9kSAJDPK+DWqQgCN1xGpBWFxSixTjlNY23pHlj5J1Q1KUX+vek+Cuu4MPoMAKNcDag6k4pFkHAfq1uSjhqy7vJUHMrUDj2JbeQ5LnL7epxksy62HTqzKfiobmQ01ansA==; 24:kCLtCFxrAxPuVX2K+AatAsfF4MPtXKEeiOIX/QJbfdKwUpmqcvQdkFu23fY9KYZ0LGANyRrOasdaB+zW7xTwiI3QylA2e65pe+3gfAKw4mQ=; 7:Ut3ueDOO5xfB1sPZ2fH5moiyKMO68VdUTxHeLTtgv5jvI0y2Pp6XEL0udp2hnFUaEx4l1BeBV2ACf/enhgzAkso4XF+YBe7soHCbkJKKNhhFe04ONkGyAgHI3SDy+1T9zRZI9E2bcwyRhG40W3Ui9CcJIw6WEBhuyvUTH1I3SR24ABasKo7Csen8tCzQUwSis0pHuV55mMLyy1t5qNNIZw== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0301MB2036; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(61426038)(61427038); SRVR:BLUPR0301MB2036; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0301MB2036; x-forefront-prvs: 0941B96580 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(2906002)(86612001)(76576001)(229853001)(77096005)(586003)(5003600100002)(3660700001)(1220700001)(10090500001)(11100500001)(110136002)(189998001)(6116002)(102836003)(99286002)(122556002)(5005710100001)(10290500002)(575784001)(86362001)(2900100001)(5004730100002)(8936002)(33656002)(5002640100001)(50986999)(92566002)(4326007)(81166006)(8676002)(5008740100001)(54356999)(3280700002)(9686002)(87936001)(74316001)(3826002); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR0301MB2036; H:BLUPR0301MB2034.namprd03.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2016 16:41:04.2877 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB2036 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 65.55.169.111 Subject: [Qemu-devel] Shouldn't cortex-a15 enable ARM_FEATURE_EL2? 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: qemu-arm , QEMU Developers Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Peter, I'm trying to use the MRS/MSR banked register instructions you recently implemented, but found that they raised an undefined instruction exception on the cortex-a15 CPU model. This seems to be caused by the check in msr_banked_access_decode(), which looks for ARM_FEATURE_V8 or ARM_FEATURE_EL2. The quick kludge below worked for me, but I don't have high confidence in its correctness -- the CPU supports the virtualisation extensions, but I've no idea whether the rest of qemu is consistent with enabling that feature. I guess you have a better idea? Cheers, Andrew --- a/target-arm/cpu.c +++ b/target-arm/cpu.c @@ -1132,6 +1132,7 @@ static void cortex_a15_initfn(Object *obj) set_feature(&cpu->env, ARM_FEATURE_DUMMY_C15_REGS); set_feature(&cpu->env, ARM_FEATURE_CBAR_RO); set_feature(&cpu->env, ARM_FEATURE_LPAE); + set_feature(&cpu->env, ARM_FEATURE_EL2); set_feature(&cpu->env, ARM_FEATURE_EL3); cpu->kvm_target = QEMU_KVM_ARM_TARGET_CORTEX_A15; cpu->midr = 0x412fc0f1;