Reinette Chatre 46637d4570 x86/resctrl: Maintain MBM counter width per resource
The original Memory Bandwidth Monitoring (MBM) architectural
definition defines counters of up to 62 bits in the IA32_QM_CTR MSR,
and the first-generation MBM implementation uses 24 bit counters.
Software is required to poll at 1 second or faster to ensure that
data is retrieved before a counter rollover occurs more than once
under worst conditions.

As system bandwidths scale the software requirement is maintained with
the introduction of a per-resource enumerable MBM counter width.

In preparation for supporting hardware with an enumerable MBM counter
width the current globally static MBM counter width is moved to a
per-resource MBM counter width. Currently initialized to 24 always
to result in no functional change.

In essence there is one function, mbm_overflow_count() that needs to
know the counter width to handle rollovers. The static value
used within mbm_overflow_count() will be replaced with a value
discovered from the hardware. Support for learning the MBM counter
width from hardware is added in the change that follows.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/e36743b9800f16ce600f86b89127391f61261f23.1588715690.git.reinette.chatre@intel.com
2020-05-06 18:00:35 +02:00
..
2020-03-30 17:35:14 -07:00
2020-03-30 19:14:28 -07:00
2020-01-09 14:40:03 +01:00
2019-11-26 19:25:25 -08:00
2019-11-27 11:42:01 -08:00
2020-02-26 15:21:22 +01:00
2019-11-12 16:21:15 +01:00
2019-11-12 16:21:15 +01:00
2020-03-21 16:03:25 +01:00
2020-02-16 20:58:06 +01:00
2019-11-28 11:16:43 -08:00
2019-06-24 19:19:24 +02:00
2020-03-30 19:35:52 -07:00
2020-02-16 20:58:06 +01:00
2020-03-21 16:03:25 +01:00
2020-03-30 19:35:52 -07:00
2020-03-30 19:55:39 -07:00
2020-02-16 20:58:06 +01:00
2020-04-15 11:13:12 +02:00
2020-02-09 12:11:12 -08:00