config_tools: refine console virtual UARTs

As is recommended by UX/DX reviews, the per-VM console virtual UART is now
limited to the following choices:

  - Disabled
  - a COM port from COM1 to COM4
  - PCI based

This patch converts the schema of scenario XMLs to integrate this
recommendation and add logic in the scenario upgrader to migrate data from
old scenario XMLs.

v1 -> v2:

  * Update the static allocators and C source transformers according to the
    new console vUART config item.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Junjie Mao
2022-02-28 23:13:06 +08:00
committed by acrnsi-robot
parent 7ad9596dd6
commit e88532b59d
27 changed files with 169 additions and 899 deletions

View File

@@ -92,14 +92,7 @@
<ramdisk_mod/>
<bootargs/>
</os_config>
<legacy_vuart id="0">
<type>VUART_LEGACY_PIO</type>
<base>COM1_BASE</base>
<irq>COM1_IRQ</irq>
</legacy_vuart>
<console_vuart id="0">
<base>INVALID_PCI_BASE</base>
</console_vuart>
<console_vuart>COM Port 1</console_vuart>
<mmio_resources>
<TPM2>n</TPM2>
<p2sb>n</p2sb>
@@ -134,14 +127,7 @@
<bootargs>root=/dev/nvme0n1p3 rw rootwait console=tty0 console=ttyS0 consoleblank=0 no_timer_check quiet loglevel=3
i915.nuclear_pageflip=1 swiotlb=131072</bootargs>
</os_config>
<legacy_vuart id="0">
<type>VUART_LEGACY_PIO</type>
<base>SERVICE_VM_COM1_BASE</base>
<irq>SERVICE_VM_COM1_IRQ</irq>
</legacy_vuart>
<console_vuart id="0">
<base>INVALID_PCI_BASE</base>
</console_vuart>
<console_vuart>COM Port 1</console_vuart>
<pci_devs>
<pci_dev/>
</pci_devs>
@@ -160,14 +146,7 @@
<base>0</base>
<size>0</size>
</epc_section>
<legacy_vuart id="0">
<type>VUART_LEGACY_PIO</type>
<base>COM1_BASE</base>
<irq>COM1_IRQ</irq>
</legacy_vuart>
<console_vuart id="0">
<base>INVALID_PCI_BASE</base>
</console_vuart>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
<vm id="3">
@@ -184,14 +163,7 @@
<base>0</base>
<size>0</size>
</epc_section>
<legacy_vuart id="0">
<type>VUART_LEGACY_PIO</type>
<base>COM1_BASE</base>
<irq>COM1_IRQ</irq>
</legacy_vuart>
<console_vuart id="0">
<base>INVALID_PCI_BASE</base>
</console_vuart>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
</acrn-config>

View File

@@ -95,14 +95,7 @@
<bootargs> rw rootwait root=/dev/sda3 console=ttyS0 noxsave nohpet no_timer_check ignore_loglevel log_buf_len=16M consoleblank=0 tsc=reliable reboot=acpi
</bootargs>
</os_config>
<legacy_vuart id="0">
<type>VUART_LEGACY_PIO</type>
<base>COM1_BASE</base>
<irq>COM1_IRQ</irq>
</legacy_vuart>
<console_vuart id="0">
<base>INVALID_PCI_BASE</base>
</console_vuart>
<console_vuart>COM Port 1</console_vuart>
<mmio_resources>
<TPM2>n</TPM2>
</mmio_resources>
@@ -143,14 +136,7 @@
consoleblank=0 tsc=reliable reboot=acpi
</bootargs>
</os_config>
<legacy_vuart id="0">
<type>VUART_LEGACY_PIO</type>
<base>COM1_BASE</base>
<irq>COM1_IRQ</irq>
</legacy_vuart>
<console_vuart id="0">
<base>INVALID_PCI_BASE</base>
</console_vuart>
<console_vuart>COM Port 1</console_vuart>
<mmio_resources>
<TPM2>n</TPM2>
</mmio_resources>

View File

@@ -96,14 +96,7 @@
<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>
<legacy_vuart id="0">
<type>VUART_LEGACY_PIO</type>
<base>SERVICE_VM_COM1_BASE</base>
<irq>SERVICE_VM_COM1_IRQ</irq>
</legacy_vuart>
<console_vuart id="0">
<base>INVALID_PCI_BASE</base>
</console_vuart>
<console_vuart>COM Port 1</console_vuart>
<pci_devs>
<pci_dev/>
</pci_devs>
@@ -124,14 +117,7 @@
<base>0</base>
<size>0</size>
</epc_section>
<legacy_vuart id="0">
<type>VUART_LEGACY_PIO</type>
<base>COM1_BASE</base>
<irq>COM1_IRQ</irq>
</legacy_vuart>
<console_vuart id="0">
<base>INVALID_PCI_BASE</base>
</console_vuart>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
<vm id="2">
@@ -151,14 +137,7 @@
<base>0</base>
<size>0</size>
</epc_section>
<legacy_vuart id="0">
<type>VUART_LEGACY_PIO</type>
<base>COM1_BASE</base>
<irq>COM1_IRQ</irq>
</legacy_vuart>
<console_vuart id="0">
<base>INVALID_PCI_BASE</base>
</console_vuart>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
<vm id="3">
@@ -177,14 +156,7 @@
<base>0</base>
<size>0</size>
</epc_section>
<legacy_vuart id="0">
<type>VUART_LEGACY_PIO</type>
<base>COM1_BASE</base>
<irq>COM1_IRQ</irq>
</legacy_vuart>
<console_vuart id="0">
<base>INVALID_PCI_BASE</base>
</console_vuart>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
<vm id="4">
@@ -203,14 +175,7 @@
<base>0</base>
<size>0</size>
</epc_section>
<legacy_vuart id="0">
<type>VUART_LEGACY_PIO</type>
<base>COM1_BASE</base>
<irq>COM1_IRQ</irq>
</legacy_vuart>
<console_vuart id="0">
<base>INVALID_PCI_BASE</base>
</console_vuart>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
<vm id="5">
@@ -229,14 +194,7 @@
<base>0</base>
<size>0</size>
</epc_section>
<legacy_vuart id="0">
<type>VUART_LEGACY_PIO</type>
<base>COM1_BASE</base>
<irq>COM1_IRQ</irq>
</legacy_vuart>
<console_vuart id="0">
<base>INVALID_PCI_BASE</base>
</console_vuart>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
<vm id="6">
@@ -255,14 +213,7 @@
<base>0</base>
<size>0</size>
</epc_section>
<legacy_vuart id="0">
<type>VUART_LEGACY_PIO</type>
<base>COM1_BASE</base>
<irq>COM1_IRQ</irq>
</legacy_vuart>
<console_vuart id="0">
<base>INVALID_PCI_BASE</base>
</console_vuart>
<console_vuart>COM Port 1</console_vuart>
<PTM>n</PTM>
</vm>
</acrn-config>