Files
linux/arch/x86/kernel/cpu
Peter Newman 2a81160d29 x86/resctrl: Fix event counts regression in reused RMIDs
When creating a new monitoring group, the RMID allocated for it may have
been used by a group which was previously removed. In this case, the
hardware counters will have non-zero values which should be deducted
from what is reported in the new group's counts.

resctrl_arch_reset_rmid() initializes the prev_msr value for counters to
0, causing the initial count to be charged to the new group. Resurrect
__rmid_read() and use it to initialize prev_msr correctly.

Unlike before, __rmid_read() checks for error bits in the MSR read so
that callers don't need to.

Fixes: 1d81d15db3 ("x86/resctrl: Move mbm_overflow_count() into resctrl_arch_rmid_read()")
Signed-off-by: Peter Newman <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Reviewed-by: Reinette Chatre <[email protected]>
Tested-by: Babu Moger <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
2023-01-10 19:51:59 +01:00
..
2022-08-04 11:11:59 +02:00
2023-01-04 11:25:32 +01:00
…
2022-06-27 10:34:00 +02:00
2022-10-17 16:40:56 +02:00
…
…
…
2021-10-21 15:49:07 +02:00
…