Skip to content

Commit 5638bd7

Browse files
MarcondiroPeter Zijlstra
authored andcommitted
perf/x86/intel/pt: Fix topa_entry base length
topa_entry->base needs to store a pfn. It obviously needs to be large enough to store the largest possible x86 pfn which is MAXPHYADDR-PAGE_SIZE (52-12). So it is 4 bits too small. Increase the size of topa_entry->base from 36 bits to 40 bits. Note, systems where physical addresses can be 256TiB or more are affected. [ Adrian: Amend commit message as suggested by Dave Hansen ] Fixes: 52ca9ce ("perf/x86/intel/pt: Add Intel PT PMU driver") Signed-off-by: Marco Cavenati <[email protected]> Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Adrian Hunter <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected]
1 parent f8a86a9 commit 5638bd7

File tree

1 file changed

+2
-2
lines changed
  • arch/x86/events/intel

1 file changed

+2
-2
lines changed

arch/x86/events/intel/pt.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ struct topa_entry {
3333
u64 rsvd2 : 1;
3434
u64 size : 4;
3535
u64 rsvd3 : 2;
36-
u64 base : 36;
37-
u64 rsvd4 : 16;
36+
u64 base : 40;
37+
u64 rsvd4 : 12;
3838
};
3939

4040
/* TSC to Core Crystal Clock Ratio */

0 commit comments

Comments
 (0)