From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUybB-0001FB-PO for qemu-devel@nongnu.org; Tue, 01 Apr 2014 09:19:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUyb6-00061r-8d for qemu-devel@nongnu.org; Tue, 01 Apr 2014 09:19:29 -0400 Received: from smtp.codeaurora.org ([198.145.11.231]:35878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUyb6-00061X-2M for qemu-devel@nongnu.org; Tue, 01 Apr 2014 09:19:24 -0400 Message-ID: <533ABCD6.40603@codeaurora.org> Date: Tue, 01 Apr 2014 09:19:18 -0400 From: Christopher Covington MIME-Version: 1.0 References: <1396023024-2262-1-git-send-email-peter.maydell@linaro.org> <1396023024-2262-12-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1396023024-2262-12-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 11/37] target-arm: Don't mention PMU in debug feature register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Peter Crosthwaite , patches@linaro.org, Michael Matz , Alexander Graf , qemu-devel@nongnu.org, Laurent Desnogues , Dirk Mueller , Will Newton , =?ISO-8859-1?Q?Alex_Benn=E9e?= , kvmarm@lists.cs.columbia.edu, Christoffer Dall , Richard Henderson Hi Peter, On 03/28/2014 12:09 PM, Peter Maydell wrote: > Suppress the ID_AA64DFR0_EL1 PMUVer field, even if the CPU specific > value claims that it exists. QEMU doesn't currently implement it, > and not advertising it prevents the guest from trying to use it > and getting UNDEFs on unimplemented registers. > > Signed-off-by: Peter Maydell > Reviewed-by: Peter Crosthwaite > --- > This is arguably a hack, but otherwise Linux tries to prod > half a dozen PMU sysregs. > --- > target-arm/helper.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/target-arm/helper.c b/target-arm/helper.c > index 4b6c1b6..62f7fd3 100644 > --- a/target-arm/helper.c > +++ b/target-arm/helper.c > @@ -2036,7 +2036,12 @@ void register_cp_regs_for_features(ARMCPU *cpu) > { .name = "ID_AA64DFR0_EL1", .state = ARM_CP_STATE_AA64, > .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 0, > .access = PL1_R, .type = ARM_CP_CONST, > - .resetvalue = cpu->id_aa64dfr0 }, > + /* We mask out the PMUVer field, beacuse we don't currently > + * implement the PMU. Not advertising it prevents the guest > + * from trying to use it and getting UNDEFs on registers we > + * don't implement. > + */ > + .resetvalue = cpu->id_aa64dfr0 & ~0xf00 }, > { .name = "ID_AA64DFR1_EL1", .state = ARM_CP_STATE_AA64, > .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 1, > .access = PL1_R, .type = ARM_CP_CONST, Is the A32 port able to communicate the instruction count to target software via the PMU? Thanks, Christopher -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation.