config_tools: refine memory setting for HPAn

1. Update the data structure of vm/memory in scenario and schema files.
The scenario will look like this.

<hpa_region>
  <start_hpa>xxx</start_hpa>
  <size_hpa>xxx</size_hpa>
</hpa_region>

2. Update xsl files to generate the related struct.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Chenli Wei
2022-04-12 19:42:34 +08:00
committed by acrnsi-robot
parent ed1c638c87
commit 52268f5cc2
5 changed files with 44 additions and 50 deletions

View File

@@ -211,7 +211,7 @@ def generate_for_one_vm(board_etree, hv_scenario_etree, vm_scenario_etree, vm_id
if lapic_ids:
script.add_dynamic_dm_parameter("add_cpus", f"{' '.join([str(x) for x in sorted(lapic_ids)])}")
script.add_plain_dm_parameter(f"-m {eval_xpath(vm_scenario_etree, './/memory/whole/text()')}M")
script.add_plain_dm_parameter(f"-m {eval_xpath(vm_scenario_etree, './/memory/size/text()')}M")
if eval_xpath(vm_scenario_etree, "//SSRAM_ENABLED") == "y" and \
eval_xpath(vm_scenario_etree, ".//vm_type/text()") == "RTVM":