From b42c283b2034dde986e773ac21f05d6551719c1a Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Mon, 16 Mar 2020 13:48:08 +0800 Subject: [PATCH] acrn-config: add some configs in board defconfig 1. add CONFIG_scenario=y config in $(BOARD).config file so that SCENARIO parameter will not be needed when build with xmls. 2. add CONFIG_MAX_KATA_VM_NUM; 3. add CONFIG_ENFORCE_VALIDATED_ACPI_INFO=y because all ACPI info generated by acrn-config has been validated; Tracked-On: #3854 Signed-off-by: Wei Liu Acked-by: Victor Sun --- .../board_config/new_board_kconfig.py | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/misc/acrn-config/board_config/new_board_kconfig.py b/misc/acrn-config/board_config/new_board_kconfig.py index 36689725e..260379afb 100644 --- a/misc/acrn-config/board_config/new_board_kconfig.py +++ b/misc/acrn-config/board_config/new_board_kconfig.py @@ -8,9 +8,7 @@ import subprocess import board_cfg_lib -DESC = """ -# New board kconfig generated by vm config tool -# Modified by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) +DESC = """# Board defconfig generated by acrn-config tool """ VM_NUM_MAP_TOTAL_HV_RAM_SIZE = { @@ -82,7 +80,7 @@ def get_serial_type(): # Get ttySx information from board config file ttys_lines = board_cfg_lib.get_info(board_cfg_lib.BOARD_INFO_FILE, "", "") - scenario_name = board_cfg_lib.get_scenario_name() + (err_dic, scenario_name) = board_cfg_lib.get_scenario_name() if scenario_name == "logical_partition": ttyn = 'ttyS0' else: @@ -145,7 +143,11 @@ def generate_file(config): hv_start_addr = int(avl_start_addr, 16) + int(hex(reserved_ram), 16) hv_start_addr = board_cfg_lib.round_up(hv_start_addr, MEM_ALIGN) + # add config scenario name + (err_dic, scenario_name) = board_cfg_lib.get_scenario_name() + print("{}".format(DESC), file=config) + print("CONFIG_{}=y".format(scenario_name.upper()), file=config) print('CONFIG_BOARD="{}"'.format(board_cfg_lib.BOARD_NAME), file=config) (serial_type, serial_value) = get_serial_type() @@ -161,8 +163,12 @@ def generate_file(config): print("CONFIG_HV_RAM_SIZE={}".format(hex(hv_ram_size)), file=config) cpu_core_num = len(board_cfg_lib.get_processor_info()) - if cpu_core_num == 2: - print("# KATA VM is not supported on dual-core systems", file=config) + if scenario_name == "sdc" and cpu_core_num > 2: + print("CONFIG_MAX_KATA_VM_NUM=1", file=config) + else: + if cpu_core_num == 2: + print("# KATA VM is not supported on dual-core systems", file=config) + print("CONFIG_MAX_KATA_VM_NUM=0", file=config) if is_rdt_supported(): @@ -170,4 +176,6 @@ def generate_file(config): else: print("CONFIG_RDT_ENABLED=n", file=config) + print("CONFIG_ENFORCE_VALIDATED_ACPI_INFO=y", file=config) + return err_dic