Skip to content

Commit cdac28e

Browse files
vijaydhanrajwenlingz
authored andcommitted
acrn-config: Update platform max CLOS value to be least common
value among RDT resources. This patch identifies the least common supported clos value from multiple RDT resource. This is done so as to have consistent capabilities across all resource allocations. From SDM, "The number of CLOS supported for the MBA feature may or may not align with other resources such as L3 CAT. In cases where the RDT features support different numbers of CLOS the lowest numerical CLOS support the common set of features, while higher CLOS may support a subset. For instance, if L3 CAT supports 8 CLOS while MBA supports 4 CLOS, all 8 CLOS would have L3 CAT masks available for cache control, but the upper 4 CLOS would not offer MBA support. In this case the upper 4 CLOS would not be subject to any throttling control. Software can manage supported resources / CLOS in order to either have 1) consistent capabilities across CLOS by using the common subset or 2) enable more flexibility by selectively applying resource control where needed based on careful CLOS and thread mapping". We decided to go with option #1, as it will be more consistent and less prone to user errorw hen programming the resource mask MSRs. Tracked-On: #3715 Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
1 parent 89a6354 commit cdac28e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

misc/acrn-config/board_config/misc_cfg_h.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,14 @@ def generate_file(config):
119119
print("#define MAX_PCPU_NUM\t{}U".format(max_cpu_num), file=config)
120120

121121
# set macro of max clos number
122-
(cache_support, clos_max) = board_cfg_lib.clos_info_parser(board_cfg_lib.BOARD_INFO_FILE)
123-
print("#define MAX_PLATFORM_CLOS_NUM\t{}U".format(clos_max), file=config)
122+
(_, clos_max, _) = board_cfg_lib.clos_info_parser(board_cfg_lib.BOARD_INFO_FILE)
123+
if len(clos_max) != 0:
124+
common_clos_max = min(clos_max)
125+
else:
126+
common_clos_max = 0
127+
128+
print("#define MAX_PLATFORM_CLOS_NUM\t{}U".format(common_clos_max), file=config)
129+
124130

125131
# define rootfs with macro
126132
for i in range(root_dev_num):

0 commit comments

Comments
 (0)