From patchwork Mon Apr 4 16:43:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 605923 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id 3qdyVc0lpSz9sBX for ; Tue, 5 Apr 2016 02:43:52 +1000 (AEST) Received: from localhost ([::1]:59942 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an7bS-0005ui-9T for incoming@patchwork.ozlabs.org; Mon, 04 Apr 2016 12:43:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an7b0-0004yV-9y for qemu-devel@nongnu.org; Mon, 04 Apr 2016 12:43:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1an7az-0002ti-Fl for qemu-devel@nongnu.org; Mon, 04 Apr 2016 12:43:22 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:56333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1an7az-0002t2-9H for qemu-devel@nongnu.org; Mon, 04 Apr 2016 12:43:21 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1an7au-0003Hk-14 for qemu-devel@nongnu.org; Mon, 04 Apr 2016 17:43:16 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 4 Apr 2016 17:43:12 +0100 Message-Id: <1459788192-26272-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459788192-26272-1-git-send-email-peter.maydell@linaro.org> References: <1459788192-26272-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 5/5] target-arm: Make the 64-bit version of VTCR do the migration 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 Move the ALIAS tag from VTCR_EL2 to VTCR so that we migrate the 64-bit version, as is usual. (This has no particular effect now unless the guest wrote to the high RES0 bits of VTCR_EL2.) Add a comment about why it's OK that we don't have the various accessor functions that the EL1 TCR regdefs do. Signed-off-by: Peter Maydell Reviewed-by: Sergey Fedorov Message-id: 1459435778-5526-4-git-send-email-peter.maydell@linaro.org --- target-arm/helper.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 0e54d90..09638b2 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -3564,11 +3564,15 @@ static const ARMCPRegInfo el2_cp_reginfo[] = { .fieldoffset = offsetof(CPUARMState, cp15.tcr_el[2]) }, { .name = "VTCR", .state = ARM_CP_STATE_AA32, .cp = 15, .opc1 = 4, .crn = 2, .crm = 1, .opc2 = 2, + .type = ARM_CP_ALIAS, .access = PL2_RW, .accessfn = access_el3_aa32ns, .fieldoffset = offsetof(CPUARMState, cp15.vtcr_el2) }, { .name = "VTCR_EL2", .state = ARM_CP_STATE_AA64, .opc0 = 3, .opc1 = 4, .crn = 2, .crm = 1, .opc2 = 2, - .access = PL2_RW, .type = ARM_CP_ALIAS, + .access = PL2_RW, + /* no .writefn needed as this can't cause an ASID change; + * no .raw_writefn or .resetfn needed as we never use mask/base_mask + */ .fieldoffset = offsetof(CPUARMState, cp15.vtcr_el2) }, { .name = "VTTBR", .state = ARM_CP_STATE_AA32, .cp = 15, .opc1 = 6, .crm = 2,