From cdb142397bbddcb86bb4d195e9fde9aef994cddf Mon Sep 17 00:00:00 2001 From: Junjie Mao Date: Thu, 31 Mar 2022 21:25:27 +0800 Subject: [PATCH] config-tools: fix the generation of DM-land ivshmem regions The device-model land ivshmem regions are not properly generated into the launch scripts today because: 1. Those regions are provided by "Device Model", not "Device model". 2. VM names are not properly encoded in the XPATH that search for the ivshmem regions accessible to a VM. This patch fixes both issues. Fixes: 0d84ecc4a ("config_tools: merge data in launch XMLs into scenario XMLs") Tracked-On: #6690 Signed-off-by: Junjie Mao --- misc/config_tools/launch_config/launch_cfg_gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/config_tools/launch_config/launch_cfg_gen.py b/misc/config_tools/launch_config/launch_cfg_gen.py index c1e182d14..054b650bb 100755 --- a/misc/config_tools/launch_config/launch_cfg_gen.py +++ b/misc/config_tools/launch_config/launch_cfg_gen.py @@ -237,7 +237,7 @@ def generate_for_one_vm(board_etree, hv_scenario_etree, vm_scenario_etree, vm_id # Emulated PCI devices script.add_virtual_device("hostbridge", vbdf="0:0") - for ivshmem in eval_xpath_all(vm_scenario_etree, "//IVSHMEM_REGION[PROVIDED_BY = 'Device model' and .//VM_NAME = 'vm_name']"): + for ivshmem in eval_xpath_all(vm_scenario_etree, f"//IVSHMEM_REGION[PROVIDED_BY = 'Device Model' and .//VM_NAME = '{vm_name}']"): script.add_virtual_device("ivshmem", options=f"dm:/{ivshmem.find('NAME').text},{ivshmem.find('IVSHMEM_SIZE').text}") if eval_xpath(vm_scenario_etree, ".//console_vuart/text()") == "PCI":