config_tools: merge data in launch XMLs into scenario XMLs

Splitting the definitions of a post-launched VM into two files, namely the
scenario XML and launch XML, introduces duplicated field in both files and
leads to a high probability of having inconsistencies between them (see
issue #7156 as an example). Further more, this split has also adds much
complexity to the configurator which has to either hide some of the items
from user interfaces or synchronize different fields upon changes.

The advantage of the split, however, is not widely adopted. Having a
separate XML capturing the VM definition tweakable in the service VM at
runtime seems to give users more flexibility to redefine a VM without
recompiling the hypervisor. But that is not a common practice in the
industry segment; instead it is preferred to have a static scenario
definition to make sure that all resources are allocated carefully in a
fixed manner in order for better determinism.

As a result, this patch merges the fields in launch XMLs into the schema of
scenario XMLs. Some fields are post-launched VM specific and thus added,
while the others have similar items in scenario XMLs today.

The launch script generator is also updated accordingly to generate launch
scripts from the new scenario XMLs (which now contain the same amount of
information as previous launch XMLs).

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Junjie Mao
2022-02-28 19:53:43 +08:00
committed by acrnsi-robot
parent 678879fd34
commit 0d84ecc4a1
38 changed files with 3113 additions and 3386 deletions

View File

@@ -1,191 +0,0 @@
<acrn-config board="nuc11tnbi5" scenario="shared">
<hv>
<DEBUG_OPTIONS>
<BUILD_TYPE>debug</BUILD_TYPE>
<SERIAL_CONSOLE>/dev/ttyS0</SERIAL_CONSOLE>
<MEM_LOGLEVEL>5</MEM_LOGLEVEL>
<NPK_LOGLEVEL>5</NPK_LOGLEVEL>
<CONSOLE_LOGLEVEL>3</CONSOLE_LOGLEVEL>
</DEBUG_OPTIONS>
<FEATURES>
<RELOC>y</RELOC>
<SCHEDULER>SCHED_BVT</SCHEDULER>
<MULTIBOOT2>y</MULTIBOOT2>
<ENFORCE_TURNOFF_AC>y</ENFORCE_TURNOFF_AC>
<ENFORCE_TURNOFF_GP>n</ENFORCE_TURNOFF_GP>
<SECURITY_VM_FIXUP>n</SECURITY_VM_FIXUP>
<RDT>
<RDT_ENABLED>n</RDT_ENABLED>
<CDP_ENABLED>y</CDP_ENABLED>
<VCAT_ENABLED>n</VCAT_ENABLED>
<CLOS_MASK>0xfffff</CLOS_MASK>
<CLOS_MASK>0xfffff</CLOS_MASK>
<CLOS_MASK>0xfffff</CLOS_MASK>
<CLOS_MASK>0xfffff</CLOS_MASK>
<CLOS_MASK>0xfffff</CLOS_MASK>
<CLOS_MASK>0xfffff</CLOS_MASK>
<CLOS_MASK>0xfffff</CLOS_MASK>
<CLOS_MASK>0xfffff</CLOS_MASK>
</RDT>
<HYPERV_ENABLED>y</HYPERV_ENABLED>
<IOMMU_ENFORCE_SNP>n</IOMMU_ENFORCE_SNP>
<ACPI_PARSE_ENABLED>y</ACPI_PARSE_ENABLED>
<L1D_VMENTRY_ENABLED>n</L1D_VMENTRY_ENABLED>
<MCE_ON_PSC_DISABLED>n</MCE_ON_PSC_DISABLED>
<IVSHMEM/>
</FEATURES>
<MEMORY>
<STACK_SIZE>0x2000</STACK_SIZE>
</MEMORY>
<CAPACITIES>
<MAX_VM_NUM>16</MAX_VM_NUM>
<IOMMU_BUS_NUM>0x100</IOMMU_BUS_NUM>
<MAX_IOAPIC_NUM>1</MAX_IOAPIC_NUM>
<MAX_PCI_DEV_NUM>96</MAX_PCI_DEV_NUM>
<MAX_IOAPIC_LINES>120</MAX_IOAPIC_LINES>
<MAX_PT_IRQ_ENTRIES>256</MAX_PT_IRQ_ENTRIES>
<MAX_MSIX_TABLE_NUM/>
<MAX_EMULATED_MMIO>16</MAX_EMULATED_MMIO>
</CAPACITIES>
<MISC_CFG>
<GPU_SBDF>0x00000010</GPU_SBDF>
</MISC_CFG>
<vuart_connections>
<vuart_connection>
<name>Connection_1</name>
<type>legacy</type>
<endpoint>
<vm_name>ACRN_Service_VM</vm_name>
<io_port>0x3F</io_port>
</endpoint>
<endpoint>
<vm_name>POST_STD_VM1</vm_name>
<io_port>0x3F</io_port>
</endpoint>
</vuart_connection>
<vuart_connection>
<name>Connection_2</name>
<type>pci</type>
<endpoint>
<vm_name>ACRN_Service_VM</vm_name>
<vbdf>00:10.0</vbdf>
</endpoint>
<endpoint>
<vm_name>POST_RT_VM1</vm_name>
<vbdf>00:10.0</vbdf>
</endpoint>
</vuart_connection>
</vuart_connections>
</hv>
<vm id="0">
<load_order>SERVICE_VM</load_order>
<vm_type>STANDARD_VM</vm_type>
<name>ACRN_Service_VM</name>
<clos>
<vcpu_clos>0</vcpu_clos>
</clos>
<memory>
<start_hpa>0</start_hpa>
<size>0x20000000</size>
</memory>
<os_config>
<kern_type>KERNEL_BZIMAGE</kern_type>
<kern_mod>Linux_bzImage</kern_mod>
<ramdisk_mod/>
<bootargs>rw rootwait root=/dev/nvme0n1p3 console=tty0 console=ttyS0 consoleblank=0 no_timer_check quiet loglevel=3
i915.nuclear_pageflip=1 swiotlb=131072</bootargs>
</os_config>
<console_vuart>COM Port 1</console_vuart>
</vm>
<vm id="1">
<load_order>POST_LAUNCHED_VM</load_order>
<vm_type>STANDARD_VM</vm_type>
<name>POST_STD_VM1</name>
<cpu_affinity>
<pcpu_id>0</pcpu_id>
<pcpu_id>1</pcpu_id>
</cpu_affinity>
<clos>
<vcpu_clos>0</vcpu_clos>
<vcpu_clos>0</vcpu_clos>
</clos>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
<vm id="2">
<load_order>POST_LAUNCHED_VM</load_order>
<vm_type>RTVM</vm_type>
<name>POST_RT_VM1</name>
<lapic_passthrough>y</lapic_passthrough>
<cpu_affinity>
<pcpu_id>2</pcpu_id>
<pcpu_id>3</pcpu_id>
</cpu_affinity>
<clos>
<vcpu_clos>0</vcpu_clos>
<vcpu_clos>0</vcpu_clos>
</clos>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
<vm id="3">
<load_order>POST_LAUNCHED_VM</load_order>
<vm_type>STANDARD_VM</vm_type>
<name>POST_STD_VM2</name>
<cpu_affinity>
<pcpu_id>0</pcpu_id>
<pcpu_id>1</pcpu_id>
</cpu_affinity>
<clos>
<vcpu_clos>0</vcpu_clos>
<vcpu_clos>0</vcpu_clos>
</clos>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
<vm id="4">
<load_order>POST_LAUNCHED_VM</load_order>
<vm_type>STANDARD_VM</vm_type>
<name>POST_STD_VM3</name>
<cpu_affinity>
<pcpu_id>0</pcpu_id>
<pcpu_id>1</pcpu_id>
</cpu_affinity>
<clos>
<vcpu_clos>0</vcpu_clos>
<vcpu_clos>0</vcpu_clos>
</clos>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
<vm id="5">
<load_order>POST_LAUNCHED_VM</load_order>
<vm_type>STANDARD_VM</vm_type>
<name>POST_STD_VM4</name>
<cpu_affinity>
<pcpu_id>0</pcpu_id>
<pcpu_id>1</pcpu_id>
</cpu_affinity>
<clos>
<vcpu_clos>0</vcpu_clos>
<vcpu_clos>0</vcpu_clos>
</clos>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
<vm id="6">
<load_order>POST_LAUNCHED_VM</load_order>
<vm_type>STANDARD_VM</vm_type>
<name>POST_STD_VM5</name>
<cpu_affinity>
<pcpu_id>0</pcpu_id>
<pcpu_id>1</pcpu_id>
</cpu_affinity>
<clos>
<vcpu_clos>0</vcpu_clos>
<vcpu_clos>0</vcpu_clos>
</clos>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
</acrn-config>

View File

@@ -0,0 +1 @@
shared_launch_6user_vm.xml