lkml.org 
[lkml]   [2022]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] KVM: arm64: PMU: Fix PMCR_EL0 reset value
On Fri, 09 Dec 2022 17:58:31 +0000,
Oliver Upton <oliver.upton@linux.dev> wrote:
>
> On Fri, Dec 09, 2022 at 04:44:46PM +0000, James Clark wrote:
> > ARMV8_PMU_PMCR_N_MASK is an unshifted value which results in the wrong
> > reset value for PMCR_EL0, so shift it to fix it.
>
> That's just mean. *_MASK tends to be a shifted mask, although it would
> appear that asm/perf_event.h does not follow this convention. Fixing
> that would be nice (as I'm sure somebody else will get burned by this),
> but for the sake of an immediate fix:

Well, that'll teach me the usual lesson: last minute changes without
full non-regression testing are bound to end in disaster.

>
> > This fixes the following error when running qemu:
> >
> > $ qemu-system-aarch64 -cpu host -machine type=virt,accel=kvm -kernel ...
> >
> > target/arm/helper.c:1813: pmevcntr_rawwrite: Assertion `counter < pmu_num_counters(env)' failed.
> >
> > Fixes: 292e8f149476 ("KVM: arm64: PMU: Simplify PMCR_EL0 reset handling")
> > Signed-off-by: James Clark <james.clark@arm.com>
>
> Reviewed-by: Oliver Upton <oliver.upton@linux.dev>

Thanks both. I'll queue that ASAP as a fix.

M.

--
Without deviation from the norm, progress is not possible.

\
 
 \ /
  Last update: 2022-12-10 12:19    [W:0.057 / U:1.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site