perf/x86/amd/ibs: Fix reading of the IBS OpData register and thus precise RIP validity
authorKim Phillips <kim.phillips@amd.com>
Wed, 23 Oct 2019 15:09:54 +0000 (10:09 -0500)
committerIngo Molnar <mingo@kernel.org>
Mon, 28 Oct 2019 10:01:59 +0000 (11:01 +0100)
commit317b96bb14303c7998dbcd5bc606bd8038fdd4b4
tree92cc130484c7be01c5cee99fe562808569e19b03
parent8c7e975667fbc3b7c816119dd56104739899f125
perf/x86/amd/ibs: Fix reading of the IBS OpData register and thus precise RIP validity

The loop that reads all the IBS MSRs into *buf stopped one MSR short of
reading the IbsOpData register, which contains the RipInvalid status bit.

Fix the offset_max assignment so the MSR gets read, so the RIP invalid
evaluation is based on what the IBS h/w output, instead of what was
left in memory.

Signed-off-by: Kim Phillips <kim.phillips@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Fixes: d47e8238cd76 ("perf/x86-ibs: Take instruction pointer from ibs sample")
Link: https://lkml.kernel.org/r/20191023150955.30292-1-kim.phillips@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/amd/ibs.c