From patchwork Mon Oct 26 13:01:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 535921 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6B97214012C for ; Tue, 27 Oct 2015 00:02:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Yq60fnMY; dkim-atps=neutral Received: from localhost ([::1]:52752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqhQN-00085O-EE for incoming@patchwork.ozlabs.org; Mon, 26 Oct 2015 09:02:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqhPr-0007GQ-Ei for qemu-devel@nongnu.org; Mon, 26 Oct 2015 09:02:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZqhPl-0002Ub-FY for qemu-devel@nongnu.org; Mon, 26 Oct 2015 09:02:23 -0400 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:34737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqhPl-0002UW-9h for qemu-devel@nongnu.org; Mon, 26 Oct 2015 09:02:17 -0400 Received: by padhk11 with SMTP id hk11so188558342pad.1 for ; Mon, 26 Oct 2015 06:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=F/X+PD1hNixj28OsMuwQ8gdPaQrekphvfPsThMD0D0o=; b=Yq60fnMYJjvq/C4ujrTUoZKQUcLeqXflqq+vPdM18sY3ibML1hBNUVaj56hpqxZ6ge sjGIFGilHwD1OmthiwrXyxR84JE/uyhiWaAJA91Pk3bu6rzH0F+0r4va5y5iu7zTYI3B I4IxCn47pDPNwN8Ih8pgdDMWp6U1VT4uZNOyLELnEmgJH2ey45i+FbNh0xtWgW1ZBFlH 24QbP97Q2ZsDdhbZbFynKoIuHQ2LFdbhGZenniqMvgrg7Z3qPrH9nuMWmrEq2CuoSkTo tyVR3qkIBESgig8Ss39LuQtz0+83xfkdzZEXT/kkTljgANLbJwarTIiareth2RwujkF7 f9NQ== X-Received: by 10.66.158.74 with SMTP id ws10mr21893890pab.121.1445864536723; Mon, 26 Oct 2015 06:02:16 -0700 (PDT) Received: from localhost (ec2-52-8-89-49.us-west-1.compute.amazonaws.com. [52.8.89.49]) by smtp.gmail.com with ESMTPSA id ce3sm33966171pbb.35.2015.10.26.06.02.14 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 26 Oct 2015 06:02:15 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Mon, 26 Oct 2015 14:01:54 +0100 Message-Id: <1445864527-14520-2-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445864527-14520-1-git-send-email-edgar.iglesias@gmail.com> References: <1445864527-14520-1-git-send-email-edgar.iglesias@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::230 Cc: laurent.desnogues@gmail.com, serge.fdrv@gmail.com, edgar.iglesias@xilinx.com, alex.bennee@linaro.org, agraf@suse.de Subject: [Qemu-devel] [PATCH v5 01/14] target-arm: Add HPFAR_EL2 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: "Edgar E. Iglesias" Reviewed-by: Alex Bennée Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h | 1 + target-arm/helper.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 3daa7f5..7d3c4c7 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -279,6 +279,7 @@ typedef struct CPUARMState { }; uint64_t far_el[4]; }; + uint64_t hpfar_el2; union { /* Translation result. */ struct { uint64_t _unused_par_0; diff --git a/target-arm/helper.c b/target-arm/helper.c index e7fda37..3aec303 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -3230,6 +3230,10 @@ static const ARMCPRegInfo el3_no_el2_cp_reginfo[] = { { .name = "MDCR_EL2", .state = ARM_CP_STATE_BOTH, .opc0 = 3, .opc1 = 4, .crn = 1, .crm = 1, .opc2 = 1, .access = PL2_RW, .type = ARM_CP_CONST, .resetvalue = 0 }, + { .name = "HPFAR_EL2", .state = ARM_CP_STATE_BOTH, + .opc0 = 3, .opc1 = 4, .crn = 6, .crm = 0, .opc2 = 4, + .access = PL2_RW, .accessfn = access_el3_aa32ns_aa64any, + .type = ARM_CP_CONST, .resetvalue = 0 }, REGINFO_SENTINEL }; @@ -3460,6 +3464,14 @@ static const ARMCPRegInfo el2_cp_reginfo[] = { .opc0 = 3, .opc1 = 4, .crn = 1, .crm = 1, .opc2 = 1, .access = PL2_RW, .resetvalue = 0, .fieldoffset = offsetof(CPUARMState, cp15.mdcr_el2), }, + { .name = "HPFAR", .state = ARM_CP_STATE_AA32, + .cp = 15, .opc1 = 4, .crn = 6, .crm = 0, .opc2 = 4, + .access = PL2_RW, .accessfn = access_el3_aa32ns, + .fieldoffset = offsetof(CPUARMState, cp15.hpfar_el2) }, + { .name = "HPFAR_EL2", .state = ARM_CP_STATE_AA64, + .opc0 = 3, .opc1 = 4, .crn = 6, .crm = 0, .opc2 = 4, + .access = PL2_RW, + .fieldoffset = offsetof(CPUARMState, cp15.hpfar_el2) }, REGINFO_SENTINEL };