mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-25 02:41:45 +00:00
config_tools: add upgrader of scenario XMLs
With a bunch of dramatic improvement to the schema of scenario XML recently, it is now non-trivial for users of previous releases to migrate their scenario definitions to the next-gen schema, which will be a major obstacle when upgrading to the next ACRN release. In order to ease the upgrade of scenario XML, this patch introduces a script that takes a scenario XML of previous releases and generates a new one which satisfies the latest schema. The major data that can be migrated include: - Virtual UART and shared memory configurations - VM types, load_order and guest flags Other data are preserved as long as they are still needed according to the schema. The script to print a list that summarizes the data that are unintendedly discarded during the upgrade, so that users can double check the results and edit the generated scenario using the configurator. The upgrader share the same command-line interface of the default value populator and scenario validator. More upgrading logic will be added at the same time the schema is changed. v1 -> v2: * The upgrader now pretty-prints the upgraded XML. * Apply the upgrader to the current scenario XMLs in the repo. The ordering of nodes are adjusted to align with the schema, but no essential changes are made. * Set the log level to INFO. Tracked-On: #6690 Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -32,8 +32,7 @@
|
||||
<ACPI_PARSE_ENABLED>y</ACPI_PARSE_ENABLED>
|
||||
<L1D_VMENTRY_ENABLED>n</L1D_VMENTRY_ENABLED>
|
||||
<MCE_ON_PSC_DISABLED>n</MCE_ON_PSC_DISABLED>
|
||||
<IVSHMEM>
|
||||
</IVSHMEM>
|
||||
<IVSHMEM/>
|
||||
</FEATURES>
|
||||
<MEMORY>
|
||||
<STACK_SIZE>0x2000</STACK_SIZE>
|
||||
@@ -67,13 +66,12 @@
|
||||
</vuart_connections>
|
||||
</hv>
|
||||
<vm id="0">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<load_order>PRE_LAUNCHED_VM</load_order>
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<name>SAFETY_VM0</name>
|
||||
<cpu_affinity>
|
||||
<pcpu_id>3</pcpu_id>
|
||||
</cpu_affinity>
|
||||
<pt_intx> </pt_intx>
|
||||
<clos>
|
||||
<vcpu_clos>0</vcpu_clos>
|
||||
</clos>
|
||||
@@ -106,10 +104,11 @@
|
||||
<TPM2>n</TPM2>
|
||||
<p2sb>n</p2sb>
|
||||
</mmio_resources>
|
||||
<pt_intx> </pt_intx>
|
||||
</vm>
|
||||
<vm id="1">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<load_order>SERVICE_VM</load_order>
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<name>ACRN_Service_VM</name>
|
||||
<cpu_affinity>
|
||||
<pcpu_id>0</pcpu_id>
|
||||
@@ -146,8 +145,8 @@
|
||||
</pci_devs>
|
||||
</vm>
|
||||
<vm id="2">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<load_order>POST_LAUNCHED_VM</load_order>
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<name>POST_STD_VM1</name>
|
||||
<cpu_affinity>
|
||||
<pcpu_id>2</pcpu_id>
|
||||
@@ -170,8 +169,8 @@
|
||||
<PTM>n</PTM>
|
||||
</vm>
|
||||
<vm id="3">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<load_order>POST_LAUNCHED_VM</load_order>
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<name>POST_STD_VM2</name>
|
||||
<cpu_affinity>
|
||||
<pcpu_id>2</pcpu_id>
|
||||
|
@@ -73,8 +73,8 @@
|
||||
</vuart_connections>
|
||||
</hv>
|
||||
<vm id="0">
|
||||
<vm_type>RTVM</vm_type>
|
||||
<load_order>PRE_LAUNCHED_VM</load_order>
|
||||
<vm_type>RTVM</vm_type>
|
||||
<name>PRE_RT_VM0</name>
|
||||
<lapic_passthrough>y</lapic_passthrough>
|
||||
<cpu_affinity>
|
||||
@@ -113,18 +113,26 @@
|
||||
<console_vuart id="0">
|
||||
<base>INVALID_PCI_BASE</base>
|
||||
</console_vuart>
|
||||
<mmio_resources>
|
||||
<TPM2>n</TPM2>
|
||||
</mmio_resources>
|
||||
<pci_devs>
|
||||
<pci_dev>00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-LM (rev 10)</pci_dev>
|
||||
<pci_dev>01:00.0 Non-Volatile memory controller: Silicon Motion, Inc. SM2263EN/SM2263XT SSD Controller (rev 03)</pci_dev>
|
||||
</pci_devs>
|
||||
<mmio_resources>
|
||||
<TPM2>n</TPM2>
|
||||
</mmio_resources>
|
||||
</vm>
|
||||
<vm id="1">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<load_order>SERVICE_VM</load_order>
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<name>ACRN_Service_VM</name>
|
||||
<cpu_affinity>
|
||||
<pcpu_id>0</pcpu_id>
|
||||
<pcpu_id>1</pcpu_id>
|
||||
<pcpu_id>2</pcpu_id>
|
||||
<pcpu_id>3</pcpu_id>
|
||||
<pcpu_id>4</pcpu_id>
|
||||
<pcpu_id>5</pcpu_id>
|
||||
</cpu_affinity>
|
||||
<clos>
|
||||
<vcpu_clos>0</vcpu_clos>
|
||||
<vcpu_clos>0</vcpu_clos>
|
||||
@@ -143,14 +151,6 @@
|
||||
<ramdisk_mod/>
|
||||
<bootargs>root=/dev/nvme0n1p3 rw rootwait console=ttyS0,115200n8 ignore_loglevel no_timer_check</bootargs>
|
||||
</os_config>
|
||||
<cpu_affinity>
|
||||
<pcpu_id>0</pcpu_id>
|
||||
<pcpu_id>1</pcpu_id>
|
||||
<pcpu_id>2</pcpu_id>
|
||||
<pcpu_id>3</pcpu_id>
|
||||
<pcpu_id>4</pcpu_id>
|
||||
<pcpu_id>5</pcpu_id>
|
||||
</cpu_affinity>
|
||||
<legacy_vuart id="0">
|
||||
<type>VUART_LEGACY_PIO</type>
|
||||
<base>SERVICE_VM_COM1_BASE</base>
|
||||
@@ -164,8 +164,8 @@
|
||||
</pci_devs>
|
||||
</vm>
|
||||
<vm id="2">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<load_order>POST_LAUNCHED_VM</load_order>
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<name>POST_STD_VM1</name>
|
||||
<cpu_affinity>
|
||||
<pcpu_id>1</pcpu_id>
|
||||
@@ -192,8 +192,8 @@
|
||||
<PTM>n</PTM>
|
||||
</vm>
|
||||
<vm id="3">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<load_order>POST_LAUNCHED_VM</load_order>
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<name>POST_STD_VM2</name>
|
||||
<cpu_affinity>
|
||||
<pcpu_id>4</pcpu_id>
|
||||
|
@@ -32,8 +32,7 @@
|
||||
<ACPI_PARSE_ENABLED>y</ACPI_PARSE_ENABLED>
|
||||
<L1D_VMENTRY_ENABLED>n</L1D_VMENTRY_ENABLED>
|
||||
<MCE_ON_PSC_DISABLED>n</MCE_ON_PSC_DISABLED>
|
||||
<IVSHMEM>
|
||||
</IVSHMEM>
|
||||
<IVSHMEM/>
|
||||
</FEATURES>
|
||||
<MEMORY>
|
||||
<STACK_SIZE>0x2000</STACK_SIZE>
|
||||
@@ -67,8 +66,8 @@
|
||||
</vuart_connections>
|
||||
</hv>
|
||||
<vm id="0">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<load_order>PRE_LAUNCHED_VM</load_order>
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<name>PRE_STD_VM0</name>
|
||||
<cpu_affinity>
|
||||
<pcpu_id>0</pcpu_id>
|
||||
@@ -104,18 +103,18 @@
|
||||
<console_vuart id="0">
|
||||
<base>INVALID_PCI_BASE</base>
|
||||
</console_vuart>
|
||||
<mmio_resources>
|
||||
<TPM2>n</TPM2>
|
||||
</mmio_resources>
|
||||
<pci_devs>
|
||||
<pci_dev>00:17.0 SATA controller: Intel Corporation Cannon Lake PCH SATA AHCI Controller (rev 10)</pci_dev>
|
||||
<pci_dev>00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (7) I219-LM (rev 10)</pci_dev>
|
||||
<pci_dev/>
|
||||
</pci_devs>
|
||||
<mmio_resources>
|
||||
<TPM2>n</TPM2>
|
||||
</mmio_resources>
|
||||
</vm>
|
||||
<vm id="1">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<load_order>PRE_LAUNCHED_VM</load_order>
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<name>PRE_STD_VM1</name>
|
||||
<cpu_affinity>
|
||||
<pcpu_id>1</pcpu_id>
|
||||
@@ -152,12 +151,12 @@
|
||||
<console_vuart id="0">
|
||||
<base>INVALID_PCI_BASE</base>
|
||||
</console_vuart>
|
||||
<mmio_resources>
|
||||
<TPM2>n</TPM2>
|
||||
</mmio_resources>
|
||||
<pci_devs>
|
||||
<pci_dev>00:14.0 USB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)</pci_dev>
|
||||
<pci_dev/>
|
||||
</pci_devs>
|
||||
<mmio_resources>
|
||||
<TPM2>n</TPM2>
|
||||
</mmio_resources>
|
||||
</vm>
|
||||
</acrn-config>
|
||||
|
@@ -24,8 +24,7 @@
|
||||
<ACPI_PARSE_ENABLED>y</ACPI_PARSE_ENABLED>
|
||||
<L1D_VMENTRY_ENABLED>n</L1D_VMENTRY_ENABLED>
|
||||
<MCE_ON_PSC_DISABLED>n</MCE_ON_PSC_DISABLED>
|
||||
<IVSHMEM>
|
||||
</IVSHMEM>
|
||||
<IVSHMEM/>
|
||||
</FEATURES>
|
||||
<MEMORY>
|
||||
<STACK_SIZE>0x2000</STACK_SIZE>
|
||||
@@ -60,8 +59,8 @@
|
||||
</vuart_connections>
|
||||
</hv>
|
||||
<vm id="0">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<load_order>SERVICE_VM</load_order>
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<name>ACRN_Service_VM</name>
|
||||
<clos>
|
||||
<vcpu_clos>0</vcpu_clos>
|
||||
@@ -91,8 +90,8 @@
|
||||
</pci_devs>
|
||||
</vm>
|
||||
<vm id="1">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<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>
|
||||
@@ -116,8 +115,8 @@
|
||||
</console_vuart>
|
||||
</vm>
|
||||
<vm id="2">
|
||||
<vm_type>RTVM</vm_type>
|
||||
<load_order>POST_LAUNCHED_VM</load_order>
|
||||
<vm_type>RTVM</vm_type>
|
||||
<name>POST_RT_VM1</name>
|
||||
<cpu_affinity>
|
||||
<pcpu_id>2</pcpu_id>
|
||||
@@ -142,8 +141,8 @@
|
||||
<PTM>n</PTM>
|
||||
</vm>
|
||||
<vm id="3">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<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>
|
||||
@@ -168,8 +167,8 @@
|
||||
<PTM>n</PTM>
|
||||
</vm>
|
||||
<vm id="4">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<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>
|
||||
@@ -194,8 +193,8 @@
|
||||
<PTM>n</PTM>
|
||||
</vm>
|
||||
<vm id="5">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<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>
|
||||
@@ -220,8 +219,8 @@
|
||||
<PTM>n</PTM>
|
||||
</vm>
|
||||
<vm id="6">
|
||||
<vm_type>STANDARD_VM</vm_type>
|
||||
<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>
|
||||
|
Reference in New Issue
Block a user