kernel_samsung_a53x/arch/arm64/kvm
Raghavendra Rao Ananta 5d7c1cabce KVM: arm64: Ignore PMCNTENSET_EL0 while checking for overflow status
commit 54bbee190d42166209185d89070c58a343bf514b upstream.

DDI0487K.a D13.3.1 describes the PMU overflow condition, which evaluates
to true if any counter's global enable (PMCR_EL0.E), overflow flag
(PMOVSSET_EL0[n]), and interrupt enable (PMINTENSET_EL1[n]) are all 1.
Of note, this does not require a counter to be enabled
(i.e. PMCNTENSET_EL0[n] = 1) to generate an overflow.

Align kvm_pmu_overflow_status() with the reality of the architecture
and stop using PMCNTENSET_EL0 as part of the overflow condition. The
bug was discovered while running an SBSA PMU test [*], which only sets
PMCR.E, PMOVSSET<0>, PMINTENSET<0>, and expects an overflow interrupt.

Cc: stable@vger.kernel.org
Fixes: 76d883c4e640 ("arm64: KVM: Add access handler for PMOVSSET and PMOVSCLR register")
Link: https://github.com/ARM-software/sbsa-acs/blob/master/test_pool/pmu/operating_system/test_pmu001.c
Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
[ oliver: massaged changelog ]
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20241120005230.2335682-2-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:24:18 +01:00
..
hyp arm64: lse: Always use LSE atomic instructions 2024-11-17 17:45:05 +01:00
vgic KVM: arm64: Make ICC_*SGI*_EL1 undef in the absence of a vGICv3 2024-11-23 23:20:50 +01:00
arch_timer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fpsimd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
guest.c KVM: arm64: Allow AArch32 PSTATE.M to be restored as System mode 2024-11-19 12:27:18 +01:00
handle_exit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hypercalls.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
inject_fault.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmu-emul.c KVM: arm64: Ignore PMCNTENSET_EL0 while checking for overflow status 2024-12-17 13:24:18 +01:00
pmu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
psci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pvtime.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reset.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sys_regs.c KVM: arm64: Make ICC_*SGI*_EL1 undef in the absence of a vGICv3 2024-11-23 23:20:50 +01:00
sys_regs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_arm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_handle_exit.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trng.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
va_layout.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vgic-sys-reg-v3.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00