From 5ed6190741d61c992ac9b9d718ed6e82d6b99a52 Mon Sep 17 00:00:00 2001 From: Kunhui-Li Date: Tue, 16 May 2023 15:18:43 +0800 Subject: [PATCH] config_tools: add customized parameters in launch script generation logic add customized parameters in the launch script generation logic. If user specify customized parameters in configurator, we will append them to the dm parameters for launching VMs. Tracked-On: #8408 Signed-off-by: Kunhui-Li Reviewed-by: Junjie Mao --- misc/config_tools/launch_config/launch_cfg_gen.py | 5 +++++ misc/config_tools/schema/config.xsd | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/misc/config_tools/launch_config/launch_cfg_gen.py b/misc/config_tools/launch_config/launch_cfg_gen.py index 631ee4140..88c43d948 100755 --- a/misc/config_tools/launch_config/launch_cfg_gen.py +++ b/misc/config_tools/launch_config/launch_cfg_gen.py @@ -11,6 +11,7 @@ import os import sys import copy +import shlex import argparse import logging @@ -417,6 +418,10 @@ def generate_for_one_vm(board_etree, hv_scenario_etree, vm_scenario_etree, vm_id ### # Lastly, conclude the device model parameters with the VM name ### + customized_parameters = eval_xpath(vm_scenario_etree, ".//customized_parameters/text()") + if customized_parameters is not None: + customized_parameters = shlex.quote(customized_parameters) + script.add_plain_dm_parameter(f"{customized_parameters}") script.add_plain_dm_parameter(f"{vm_name}") return script diff --git a/misc/config_tools/schema/config.xsd b/misc/config_tools/schema/config.xsd index d4b4f606e..e7a79fbc4 100644 --- a/misc/config_tools/schema/config.xsd +++ b/misc/config_tools/schema/config.xsd @@ -472,6 +472,11 @@ argument and memory. Enable virtualization of PCIe Precision Time Measurement (PTM) mechanism for devices with PTM capability and for real-time application. The hypervisor provides PCIe root port emulation instead of host bridge emulation for the VM. PTM coordinates timing between the device and root port with the device's local timebases without relying on software. + + + Specify the customized parameters that are appened to the device model when launching this VM. + + Enable virt-IO devices in post-launched VMs.