linux-stable/arch/arm64
Colton Lewis 2c47e7a74f perf/core: Correct perf sampling with guest VMs
Previously any PMU overflow interrupt that fired while a VCPU was
loaded was recorded as a guest event whether it truly was or not. This
resulted in nonsense perf recordings that did not honor
perf_event_attr.exclude_guest and recorded guest IPs where it should
have recorded host IPs.

Rework the sampling logic to only record guest samples for events with
exclude_guest = 0. This way any host-only events with exclude_guest
set will never see unexpected guest samples. The behaviour of events
with exclude_guest = 0 is unchanged.

Note that events configured to sample both host and guest may still
misattribute a PMI that arrived in the host as a guest event depending
on KVM arch and vendor behavior.

Signed-off-by: Colton Lewis <coltonlewis@google.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20241113190156.2145593-6-coltonlewis@google.com
2024-11-14 10:40:01 +01:00
..
boot Char/Misc and other driver changes for 6.12-rc1 2024-09-26 10:13:08 -07:00
configs i2c-for-6.12-rc1 2024-09-23 14:34:19 -07:00
crypto move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hyperv x86/hyperv: Use Hyper-V entropy to seed guest random number generator 2024-03-18 22:01:52 +00:00
include perf/core: Correct perf sampling with guest VMs 2024-11-14 10:40:01 +01:00
kernel perf/core: Correct perf sampling with guest VMs 2024-11-14 10:40:01 +01:00
kvm KVM: arm64: Constrain the host to the maximum shared SVE VL with pKVM 2024-10-01 15:25:23 +01:00
lib arm64: crypto: use CC_FLAGS_FPU for NEON CFLAGS 2024-05-19 14:36:18 -07:00
mm dma-mapping updates for linux 6.12 2024-09-19 11:12:49 +02:00
net bpf, arm64: Jit BPF_CALL to direct call when possible 2024-09-04 11:51:06 -07:00
tools Merge branch 'for-next/poe' into for-next/core 2024-09-12 13:43:41 +01:00
xen
Kbuild
Kconfig arm64: fix selection of HAVE_DYNAMIC_FTRACE_WITH_ARGS 2024-10-01 12:47:19 +01:00
Kconfig.debug
Kconfig.platforms Updates for the interrupt subsystem: 2024-07-22 13:52:05 -07:00
Makefile arm64: Force position-independent veneers 2024-10-01 12:46:27 +01:00