From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTCEz-00018I-Df for qemu-devel@nongnu.org; Tue, 09 Feb 2016 12:38:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTCEy-0007XH-GG for qemu-devel@nongnu.org; Tue, 09 Feb 2016 12:38:17 -0500 Received: from mail-vk0-x22a.google.com ([2607:f8b0:400c:c05::22a]:35125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTCEy-0007Wx-D5 for qemu-devel@nongnu.org; Tue, 09 Feb 2016 12:38:16 -0500 Received: by mail-vk0-x22a.google.com with SMTP id e6so121819864vkh.2 for ; Tue, 09 Feb 2016 09:38:16 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <2e5674d7022b539461595f0f42767baee132ed76.1454720020.git.alistair.francis@xilinx.com> References: <2e5674d7022b539461595f0f42767baee132ed76.1454720020.git.alistair.francis@xilinx.com> From: Peter Maydell Date: Tue, 9 Feb 2016 17:37:56 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v2 4/5] target-arm: Add PMUSERENR_EL0 register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alistair Francis Cc: Christopher Covington , Peter Crosthwaite , QEMU Developers , Aaron Lindsay , Nathan Rossi On 6 February 2016 at 00:55, Alistair Francis wrote: > The Linux kernel accesses this register early in its setup. > > Signed-off-by: Christopher Covington > Signed-off-by: Alistair Francis > --- > > target-arm/helper.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/target-arm/helper.c b/target-arm/helper.c > index 8d401c6..b4bf6fa 100644 > --- a/target-arm/helper.c > +++ b/target-arm/helper.c > @@ -1094,6 +1094,12 @@ static const ARMCPRegInfo v7_cp_reginfo[] = { > .fieldoffset = offsetof(CPUARMState, cp15.c9_pmuserenr), > .resetvalue = 0, > .writefn = pmuserenr_write, .raw_writefn = raw_write }, > + { .name = "PMUSERENR_EL0", .state = ARM_CP_STATE_AA64, > + .opc0 = 3, .opc1 = 3, .crn = 9, .crm = 14, .opc2 = 0, > + .access = PL0_R | PL1_RW, > + .fieldoffset = offsetof(CPUARMState, cp15.c9_pmuserenr), > + .resetvalue = 0, > + .writefn = pmuserenr_write, .raw_writefn = raw_write }, Either this or the 32-bit version need to be marked ARM_CP_ALIAS. Otherwise Reviewed-by: Peter Maydell thanks -- PMM