From 02268941d8887a931995c60674dc031995951148 Mon Sep 17 00:00:00 2001 From: Kunhui-Li Date: Thu, 30 Dec 2021 15:25:39 +0800 Subject: [PATCH] config_tools: remove the parameters "pm_notify_channel" and "pm_by_vuart" of acrn-dm Since PR #7002 has removed "pm_notify_channel" and "pm_by_vuart" from acrn-dm usage, this patch also removes the two parameters in the launch script generation logic. Tracked-On: #6690 Signed-off-by: Kunhui-Li --- .../generic_board/hybrid_launch_2user_vm.xml | 6 +----- .../generic_board/shared_launch_6user_vm.xml | 14 +------------ .../nuc11tnbi5/hybrid_launch_2user_vm.xml | 6 +----- .../nuc11tnbi5/shared_launch_6user_vm.xml | 14 +------------ .../hybrid_rt_launch_1user_vm_waag.xml | 4 +--- .../whl-ipc-i5/sdc_launch_1user_vm_laag.xml | 4 +--- .../whl-ipc-i5/sdc_launch_1user_vm_zephyr.xml | 4 +--- .../shared_launch_1user_vm_hardrt.xml | 4 +--- .../shared_launch_1user_vm_vxworks.xml | 4 +--- .../shared_launch_1user_vm_waag.xml | 4 +--- .../whl-ipc-i5/shared_launch_2user_vm.xml | 6 +----- .../whl-ipc-i5/shared_launch_6user_vm.xml | 14 +------------ misc/config_tools/launch_config/com.py | 21 ------------------- .../launch_config/launch_cfg_gen.py | 2 -- .../config_tools/launch_config/launch_item.py | 3 --- misc/config_tools/library/launch_cfg_lib.py | 9 -------- 16 files changed, 12 insertions(+), 107 deletions(-) diff --git a/misc/config_tools/data/generic_board/hybrid_launch_2user_vm.xml b/misc/config_tools/data/generic_board/hybrid_launch_2user_vm.xml index 0c57c35b0..9628b81ee 100644 --- a/misc/config_tools/data/generic_board/hybrid_launch_2user_vm.xml +++ b/misc/config_tools/data/generic_board/hybrid_launch_2user_vm.xml @@ -6,8 +6,6 @@ 4096 ovmf Disable - - n n @@ -53,8 +51,6 @@ 512 ovmf Disable - - n n @@ -93,4 +89,4 @@ - \ No newline at end of file + diff --git a/misc/config_tools/data/generic_board/shared_launch_6user_vm.xml b/misc/config_tools/data/generic_board/shared_launch_6user_vm.xml index 0c59d0a44..36d045a4a 100644 --- a/misc/config_tools/data/generic_board/shared_launch_6user_vm.xml +++ b/misc/config_tools/data/generic_board/shared_launch_6user_vm.xml @@ -6,8 +6,6 @@ 4096 ovmf Disable - - n n @@ -53,9 +51,7 @@ 1024 ovmf Disable - n - n @@ -100,8 +96,6 @@ 512 ovmf Disable - - n n @@ -147,8 +141,6 @@ 512 ovmf Disable - - n n @@ -194,8 +186,6 @@ 512 ovmf Disable - - n n @@ -241,8 +231,6 @@ 512 ovmf Disable - - n n @@ -281,4 +269,4 @@ - \ No newline at end of file + diff --git a/misc/config_tools/data/nuc11tnbi5/hybrid_launch_2user_vm.xml b/misc/config_tools/data/nuc11tnbi5/hybrid_launch_2user_vm.xml index 009221d9c..7a8010c6a 100644 --- a/misc/config_tools/data/nuc11tnbi5/hybrid_launch_2user_vm.xml +++ b/misc/config_tools/data/nuc11tnbi5/hybrid_launch_2user_vm.xml @@ -6,8 +6,6 @@ 4096 ovmf Disable - - n n @@ -53,8 +51,6 @@ 512 ovmf Disable - - n n @@ -93,4 +89,4 @@ - \ No newline at end of file + diff --git a/misc/config_tools/data/nuc11tnbi5/shared_launch_6user_vm.xml b/misc/config_tools/data/nuc11tnbi5/shared_launch_6user_vm.xml index 1f48d063e..7d35c6f5c 100644 --- a/misc/config_tools/data/nuc11tnbi5/shared_launch_6user_vm.xml +++ b/misc/config_tools/data/nuc11tnbi5/shared_launch_6user_vm.xml @@ -6,8 +6,6 @@ 4096 ovmf Disable - - n n @@ -53,9 +51,7 @@ 1024 ovmf Disable - n - n @@ -100,8 +96,6 @@ 512 ovmf Disable - - n n @@ -147,8 +141,6 @@ 512 ovmf Disable - - n n @@ -194,8 +186,6 @@ 512 ovmf Disable - - n n @@ -241,8 +231,6 @@ 512 ovmf Disable - - n n @@ -281,4 +269,4 @@ - \ No newline at end of file + diff --git a/misc/config_tools/data/whl-ipc-i5/hybrid_rt_launch_1user_vm_waag.xml b/misc/config_tools/data/whl-ipc-i5/hybrid_rt_launch_1user_vm_waag.xml index 4690139ae..f95206978 100644 --- a/misc/config_tools/data/whl-ipc-i5/hybrid_rt_launch_1user_vm_waag.xml +++ b/misc/config_tools/data/whl-ipc-i5/hybrid_rt_launch_1user_vm_waag.xml @@ -6,8 +6,6 @@ 4096 ovmf Enable - - n n @@ -46,4 +44,4 @@ - \ No newline at end of file + diff --git a/misc/config_tools/data/whl-ipc-i5/sdc_launch_1user_vm_laag.xml b/misc/config_tools/data/whl-ipc-i5/sdc_launch_1user_vm_laag.xml index 874f8495d..53577fc95 100644 --- a/misc/config_tools/data/whl-ipc-i5/sdc_launch_1user_vm_laag.xml +++ b/misc/config_tools/data/whl-ipc-i5/sdc_launch_1user_vm_laag.xml @@ -6,8 +6,6 @@ 2048 ovmf Disable - - n n @@ -46,4 +44,4 @@ - \ No newline at end of file + diff --git a/misc/config_tools/data/whl-ipc-i5/sdc_launch_1user_vm_zephyr.xml b/misc/config_tools/data/whl-ipc-i5/sdc_launch_1user_vm_zephyr.xml index fb7634794..eb7e9e274 100644 --- a/misc/config_tools/data/whl-ipc-i5/sdc_launch_1user_vm_zephyr.xml +++ b/misc/config_tools/data/whl-ipc-i5/sdc_launch_1user_vm_zephyr.xml @@ -6,8 +6,6 @@ 128 ovmf Enable - - n n @@ -46,4 +44,4 @@ - \ No newline at end of file + diff --git a/misc/config_tools/data/whl-ipc-i5/shared_launch_1user_vm_hardrt.xml b/misc/config_tools/data/whl-ipc-i5/shared_launch_1user_vm_hardrt.xml index 27c5397a9..cce831fc2 100644 --- a/misc/config_tools/data/whl-ipc-i5/shared_launch_1user_vm_hardrt.xml +++ b/misc/config_tools/data/whl-ipc-i5/shared_launch_1user_vm_hardrt.xml @@ -6,8 +6,6 @@ 1024 ovmf Disable - - n n @@ -46,4 +44,4 @@ - \ No newline at end of file + diff --git a/misc/config_tools/data/whl-ipc-i5/shared_launch_1user_vm_vxworks.xml b/misc/config_tools/data/whl-ipc-i5/shared_launch_1user_vm_vxworks.xml index 01c8214ef..1fdb80a0b 100644 --- a/misc/config_tools/data/whl-ipc-i5/shared_launch_1user_vm_vxworks.xml +++ b/misc/config_tools/data/whl-ipc-i5/shared_launch_1user_vm_vxworks.xml @@ -6,8 +6,6 @@ 2048 ovmf Disable - - n n @@ -46,4 +44,4 @@ - \ No newline at end of file + diff --git a/misc/config_tools/data/whl-ipc-i5/shared_launch_1user_vm_waag.xml b/misc/config_tools/data/whl-ipc-i5/shared_launch_1user_vm_waag.xml index 1f6fc032b..6692603ce 100644 --- a/misc/config_tools/data/whl-ipc-i5/shared_launch_1user_vm_waag.xml +++ b/misc/config_tools/data/whl-ipc-i5/shared_launch_1user_vm_waag.xml @@ -6,8 +6,6 @@ 4096 ovmf Enable - - n n @@ -46,4 +44,4 @@ - \ No newline at end of file + diff --git a/misc/config_tools/data/whl-ipc-i5/shared_launch_2user_vm.xml b/misc/config_tools/data/whl-ipc-i5/shared_launch_2user_vm.xml index 564c51ca6..a2a4d6586 100644 --- a/misc/config_tools/data/whl-ipc-i5/shared_launch_2user_vm.xml +++ b/misc/config_tools/data/whl-ipc-i5/shared_launch_2user_vm.xml @@ -6,8 +6,6 @@ 4096 ovmf Enable - - n n @@ -53,8 +51,6 @@ 1024 ovmf Disable - - n n @@ -93,4 +89,4 @@ - \ No newline at end of file + diff --git a/misc/config_tools/data/whl-ipc-i5/shared_launch_6user_vm.xml b/misc/config_tools/data/whl-ipc-i5/shared_launch_6user_vm.xml index ed624c5f5..e2ea38236 100644 --- a/misc/config_tools/data/whl-ipc-i5/shared_launch_6user_vm.xml +++ b/misc/config_tools/data/whl-ipc-i5/shared_launch_6user_vm.xml @@ -6,8 +6,6 @@ 4096 ovmf Enable - - n n @@ -53,8 +51,6 @@ 1024 ovmf Disable - - n n @@ -100,8 +96,6 @@ 512 ovmf Disable - - n n @@ -147,8 +141,6 @@ 512 ovmf Disable - - n n @@ -194,8 +186,6 @@ 512 ovmf Disable - - n n @@ -241,8 +231,6 @@ 512 ovmf Disable - - n n @@ -281,4 +269,4 @@ - \ No newline at end of file + diff --git a/misc/config_tools/launch_config/com.py b/misc/config_tools/launch_config/com.py index 61529b46d..e96a767f3 100644 --- a/misc/config_tools/launch_config/com.py +++ b/misc/config_tools/launch_config/com.py @@ -563,27 +563,6 @@ def dm_arg_set(names, sel, virt_io, dm, sriov, vmid, config): if user_vm_type == "WINDOWS": print(" --windows \\", file=config) - # pm_channel set - if dm['pm_channel'][vmid] and dm['pm_channel'][vmid] != None: - pm_key = dm['pm_channel'][vmid] - pm_vuart = "--pm_notify_channel uart" - if vmid in dm["allow_trigger_s5"] and dm["allow_trigger_s5"][vmid] == 'y': - pm_vuart = pm_vuart + ",allow_trigger_s5 " - else: - pm_vuart = pm_vuart + " " - if pm_key == "vuart1(tty)": - vuart_base = launch_cfg_lib.get_vuart1_from_scenario(sos_vmid + vmid) - if vuart_base == "INVALID_COM_BASE": - err_key = "user_vm:id={}:poweroff_channel".format(vmid) - launch_cfg_lib.ERR_LIST[err_key] = "vuart1 of VM{} in scenario file should select 'SERVICE_VM_COM2_BASE'".format(sos_vmid + vmid) - return - scenario_cfg_lib.get_sos_vuart_settings() - print(" {} \\".format(pm_vuart + launch_cfg_lib.PM_CHANNEL_DIC[pm_key] + scenario_cfg_lib.SERVICE_VM_UART1_VALID_NUM), file=config) - elif pm_key == "vuart1(pty)": - print(" {} \\".format(pm_vuart + launch_cfg_lib.PM_CHANNEL_DIC[pm_key]), file=config) - else: - print(" {} \\".format(launch_cfg_lib.PM_CHANNEL_DIC[pm_key]), file=config) - # set logger_setting for all VMs print(" $logger_setting \\", file=config) diff --git a/misc/config_tools/launch_config/launch_cfg_gen.py b/misc/config_tools/launch_config/launch_cfg_gen.py index f50744cf0..03ed00ddd 100644 --- a/misc/config_tools/launch_config/launch_cfg_gen.py +++ b/misc/config_tools/launch_config/launch_cfg_gen.py @@ -52,10 +52,8 @@ def get_launch_item_values(board_info, scenario_info=None): launch_item_values["user_vm,vbootloader"] = launch_cfg_lib.BOOT_TYPE launch_item_values['user_vm,vuart0'] = launch_cfg_lib.DM_VUART0 - launch_item_values['user_vm,poweroff_channel'] = launch_cfg_lib.PM_CHANNEL launch_item_values["user_vm,cpu_affinity"] = board_cfg_lib.get_processor_info() launch_item_values['user_vm,enable_ptm'] = launch_cfg_lib.y_n - launch_item_values['user_vm,allow_trigger_s5'] = launch_cfg_lib.y_n launch_cfg_lib.set_shm_regions(launch_item_values, scenario_info) launch_cfg_lib.set_pci_vuarts(launch_item_values, scenario_info) diff --git a/misc/config_tools/launch_config/launch_item.py b/misc/config_tools/launch_config/launch_item.py index 3e37f2f7d..b797f0f52 100644 --- a/misc/config_tools/launch_config/launch_item.py +++ b/misc/config_tools/launch_config/launch_item.py @@ -25,7 +25,6 @@ class AcrnDmArgs: self.args["vbootloader"] = common.get_leaf_tag_map(self.launch_info, "vbootloader") self.args["vuart0"] = common.get_leaf_tag_map(self.launch_info, "vuart0") self.args["cpu_sharing"] = common.get_hv_item_tag(self.scenario_info, "FEATURES", "SCHEDULER") - self.args["pm_channel"] = common.get_leaf_tag_map(self.launch_info, "poweroff_channel") self.args["cpu_affinity"] = common.get_leaf_tag_map(self.launch_info, "cpu_affinity", "pcpu_id") # get default cpu_affinity from scenario file scenario_names = {v: k for k, v in common.get_leaf_tag_map(self.scenario_info, "name").items()} @@ -53,7 +52,6 @@ class AcrnDmArgs: self.args["communication_vuarts"] = common.get_leaf_tag_map(self.launch_info, "communication_vuarts", "communication_vuart") self.args["console_vuart"] = common.get_leaf_tag_map(self.launch_info, "console_vuart") self.args["enable_ptm"] = common.get_leaf_tag_map(self.launch_info, "enable_ptm") - self.args["allow_trigger_s5"] = common.get_leaf_tag_map(self.launch_info, "allow_trigger_s5") def check_item(self): (rootfs, num) = board_cfg_lib.get_rootfs(self.board_info) @@ -63,7 +61,6 @@ class AcrnDmArgs: launch_cfg_lib.args_aval_check(self.args["vbootloader"], "vbootloader", launch_cfg_lib.BOOT_TYPE) launch_cfg_lib.args_aval_check(self.args["vuart0"], "vuart0", launch_cfg_lib.DM_VUART0) launch_cfg_lib.args_aval_check(self.args["enable_ptm"], "enable_ptm", launch_cfg_lib.y_n) - launch_cfg_lib.args_aval_check(self.args["allow_trigger_s5"], "allow_trigger_s5", launch_cfg_lib.y_n) cpu_affinity = launch_cfg_lib.user_vm_cpu_affinity(self.args["cpu_affinity"]) err_dic = scenario_cfg_lib.vm_cpu_affinity_check(self.scenario_info, self.launch_info, cpu_affinity) launch_cfg_lib.ERR_LIST.update(err_dic) diff --git a/misc/config_tools/library/launch_cfg_lib.py b/misc/config_tools/library/launch_cfg_lib.py index 4abeb5e88..946713e5f 100644 --- a/misc/config_tools/library/launch_cfg_lib.py +++ b/misc/config_tools/library/launch_cfg_lib.py @@ -50,15 +50,6 @@ PT_SLOT = { } -PM_CHANNEL = ['', 'IOC', 'PowerButton', 'vuart1(pty)', 'vuart1(tty)'] -PM_CHANNEL_DIC = { - None:'', - 'IOC':'--pm_notify_channel ioc', - 'PowerButton':'--pm_notify_channel power_button', - 'vuart1(pty)':'--pm_by_vuart pty,/run/acrn/life_mngr_$vm_name \\\n -l com2,/run/acrn/life_mngr_$vm_name', - 'vuart1(tty)':'--pm_by_vuart tty,/dev/', -} - MOUNT_FLAG_DIC = {}