Received: from eggs.gnu.org ([2001:4830:134:3::10]:36693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwGvL-0007L8-Pa for qemu-devel@nongnu.org; Wed, 03 Dec 2014 15:53:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwGvD-0001gk-4t for qemu-devel@nongnu.org; Wed, 03 Dec 2014 15:53:23 -0500 Received: from mxip3-inbound.gatech.edu ([130.207.182.45]:55415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwGvD-0001fx-0Q for qemu-devel@nongnu.org; Wed, 03 Dec 2014 15:53:15 -0500 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) From: Chengyu Song In-Reply-To: <547F71B0.4030801@codeaurora.org> Date: Wed, 3 Dec 2014 15:53:00 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1417590738-29072-1-git-send-email-csong84@gatech.edu> <547F71B0.4030801@codeaurora.org> Subject: Re: [Qemu-devel] [PATCH] ARM64: support access to more performance registers in AA64 mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christopher Covington Cc: qemu-devel@nongnu.org Hi Christopher, > On Dec 3, 2014, at 3:25 PM, Christopher Covington = wrote: > On 12/03/2014 02:12 AM, Chengyu Song wrote: >> In AA64 mode, certain system registers are access through MSR/MRS=20 >> instructions instead of MCR/MRC. This patch added more such = registers: >=20 > If you don't mind sharing, I'm curious what motivated this patch. I = have a > particular interest in having `perf stat -e instructions:u echo` = inside > qemu-system-aarch64 function correctly, and this looks like a good = step in > that direction. I'm playing with the Nexus 9 kernel and it died with a undef instruction = exception caused by those MSR/MRS instructions. >> /* ARMv8 manual, D8.4.10 */ >> PMINTENCLR_EL1 >=20 > It'd probably good to mention the version of the document. The version I use is A.a Non-Confidential Beta, release on 04 September = 2013. I don't have any later version. >> + .opc0 =3D 3, .crn =3D 9, .crm =3D 12, .opc1 =3D 3, .opc2 =3D = 3, >=20 > It might be helpful to order the fields opc0, opc1, crn, crm, opc2 to = match > the documentation and some (most?) of the other A64 QEMU code. Good point. Let me try to resubmit the patch. >=20 >> + .access =3D PL0_RW, .fieldoffset =3D offsetof(CPUARMState, = cp15.c9_pmovsr), >> + .accessfn =3D pmreg_access, >> + .writefn =3D pmovsr_write, >> + .raw_writefn =3D raw_write }, >=20 > Should this contain .type =3D ARM_CP_NO_MIGRATE, if PMOVSCLR_EL0, = PMOVSSET_EL0, > and PMOVSR all refer to the same underlying variable? I don't know. I'm not an expert here, so I simply copied from the AA32 = version. It would be nicer if you can create a correct patch :) > Should PMOVSSET_EL0 also be added? PMOVSSET is not available in QEMU, so I'm not sure how it should be = added > Again, should .type =3D ARM_CP_NO_MIGRATE be used as this shares a = variable with > PMUSERENR? Same as above. > Again, should .type =3D ARM_CP_NO_MIGRATE be used as this shares a = variable with > PMINTSET? Same as above. BTW, I think the current mask (0x7E000000) in the pmccfiltr_write = function is not right. Thanks, Chengyu=