mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
acrn-config: add MAX_CACHE_CLOS_NUM_ENTRIES/MAX_MBA_CLOS_NUM_ENTRIES macros
1.Add macro MAX_CACHE_CLOS_NUM_ENTRIES for CAT, and MAX_MBA_CLOS_NUM_ENTRIES for MBA. MAX_MBA_CLOS_NUM_ENTRIES: Max number of Cache Mask entries corresponding to each CLOS. This can vary if CDP is enabled vs disabled, as each CLOS entry will have corresponding cache mask values for Data and Code when CDP is enabled. MAX_CACHE_CLOS_NUM_ENTRIES: Max number of MBA delay entries corresponding to each CLOS. 2.Move VMx_VCPU_CLOS macro to misc_cfg.h head file. Tracked-On: #5229 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
This commit is contained in:
@@ -210,8 +210,10 @@ def clos_output(scenario_items, i, config):
|
||||
"""
|
||||
hv_info = scenario_items['hv']
|
||||
|
||||
if board_cfg_lib.is_rdt_supported() and hv_info.features.rdt_enabled == 'y':
|
||||
if board_cfg_lib.is_rdt_supported():
|
||||
print("#ifdef CONFIG_RDT_ENABLED", file=config)
|
||||
print("\t\t.clos = VM{}_VCPU_CLOS,".format(i), file=config)
|
||||
print("#endif", file=config)
|
||||
|
||||
def get_guest_flag(flags):
|
||||
"""
|
||||
|
@@ -40,19 +40,6 @@ def cpu_affinity_output(vm_info, i, config):
|
||||
print("#define VM{0}_CONFIG_CPU_AFFINITY {1}".format(
|
||||
i, cpu_bits['cpu_map']), file=config)
|
||||
|
||||
def clos_config_output(scenario_items, i, config):
|
||||
"""
|
||||
Output the macro vcpu affinity
|
||||
:param scenario_items: the data structure have all the xml items values
|
||||
:param i: the index of vm id
|
||||
:param config: file pointor to store the information
|
||||
"""
|
||||
vm_info = scenario_items['vm']
|
||||
hv_info = scenario_items['hv']
|
||||
|
||||
if board_cfg_lib.is_rdt_supported() and hv_info.features.rdt_enabled == 'y':
|
||||
clos_config = vm_info.get_clos_bitmap(i)
|
||||
print("#define VM{0}_VCPU_CLOS\t\t\t{1}".format(i, clos_config['clos_map']), file=config)
|
||||
|
||||
def scenario_vm_num(scenario_items, config):
|
||||
|
||||
@@ -80,7 +67,6 @@ def gen_pre_launch_vm(scenario_items, config):
|
||||
|
||||
cpu_bits = vm_info.get_cpu_bitmap(vm_i)
|
||||
cpu_affinity_output(vm_info, vm_i, config)
|
||||
clos_config_output(scenario_items, vm_i, config)
|
||||
print("#define VM{0}_CONFIG_MEM_START_HPA {1}UL".format(
|
||||
vm_i, vm_info.mem_info.mem_start_hpa[vm_i]), file=config)
|
||||
print("#define VM{0}_CONFIG_MEM_SIZE {1}UL".format(
|
||||
@@ -112,7 +98,6 @@ def gen_post_launch_header(scenario_items, config):
|
||||
|
||||
is_post_vm_available = True
|
||||
cpu_affinity_output(vm_info, vm_i, config)
|
||||
clos_config_output(scenario_items, vm_i, config)
|
||||
|
||||
if vm_info.shmem.shmem_enabled == 'y' and vm_i in vm_info.shmem.shmem_num.keys():
|
||||
print("#define VM{}_CONFIG_PCI_DEV_NUM {}U".format(vm_i,
|
||||
@@ -141,7 +126,6 @@ def gen_sos_header(scenario_items, config):
|
||||
for vm_i,vm_type in common.VM_TYPES.items():
|
||||
if vm_type == 'SOS_VM':
|
||||
cpu_affinity_output(vm_info, vm_i, config)
|
||||
clos_config_output(scenario_items, vm_i, config)
|
||||
print("", file=config)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user