Date   

[PATCH v2 2/7] HV: Add helper function send_single_nmi

Kaige Fu
 

This patch adds a helper function send_single_nmi. The fisrt caller
will soon come with the following patch.

Signed-off-by: Kaige Fu <kaige.fu@...>
---
hypervisor/arch/x86/lapic.c | 15 +++++++++++++++
hypervisor/include/arch/x86/lapic.h | 9 +++++++++
2 files changed, 24 insertions(+)

diff --git a/hypervisor/arch/x86/lapic.c b/hypervisor/arch/x86/lapic.c
index c06daaab..a54cb067 100644
--- a/hypervisor/arch/x86/lapic.c
+++ b/hypervisor/arch/x86/lapic.c
@@ -288,3 +288,18 @@ void send_single_init(uint16_t pcpu_id)

msr_write(MSR_IA32_EXT_APIC_ICR, icr.value);
}
+
+/**
+ * @pre pcpu_id < CONFIG_MAX_PCPU_NUM
+ *
+ * @return None
+ */
+void send_single_nmi(uint16_t pcpu_id)
+{
+ union apic_icr icr;
+
+ icr.value_32.hi_32 = per_cpu(lapic_id, pcpu_id);
+ icr.value_32.lo_32 = (INTR_LAPIC_ICR_PHYSICAL << 11U) | (INTR_LAPIC_ICR_NMI << 8U);
+
+ msr_write(MSR_IA32_EXT_APIC_ICR, icr.value);
+}
diff --git a/hypervisor/include/arch/x86/lapic.h b/hypervisor/include/arch/x86/lapic.h
index 5e490b8c..9b59c21d 100644
--- a/hypervisor/include/arch/x86/lapic.h
+++ b/hypervisor/include/arch/x86/lapic.h
@@ -183,4 +183,13 @@ void send_single_ipi(uint16_t pcpu_id, uint32_t vector);
*/
void send_single_init(uint16_t pcpu_id);

+/**
+ * @brief Send an NMI signal to a single pCPU
+ *
+ * @param[in] pcpu_id The id of destination physical cpu
+ *
+ * @return None
+ */
+void send_single_nmi(uint16_t pcpu_id);
+
#endif /* INTR_LAPIC_H */
--
2.20.0


[PATCH v2 1/7] HV: Push NMI vector on to the exception stack

Kaige Fu
 

This patch pushs the NMI vector (2) on to the exception stack.
So, we can get the right vector in dispatch_exception.

Signed-off-by: Kaige Fu <kaige.fu@...>
---
hypervisor/arch/x86/idt.S | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hypervisor/arch/x86/idt.S b/hypervisor/arch/x86/idt.S
index cb42ea9e..74f220f9 100644
--- a/hypervisor/arch/x86/idt.S
+++ b/hypervisor/arch/x86/idt.S
@@ -110,9 +110,9 @@ excp_debug:

.align 8
excp_nmi:
-
-
-
+ pushq $0x0 /* pseudo error code */
+ pushq $0x02
+ jmp excp_save_frame

.align 8
excp_breakpoint:
--
2.20.0


[PATCH v2 0/7] Use NMI to nofity vCPUs with lapic-pt

Kaige Fu
 

ACRN hypervisor needs to kick vCPU off VMX non-root mode to do some
operations in hypervisor, such as interrupt/exception injection, EPT
flush etc. For non lapic-pt vCPUs, we can use IPI to do so. But, it
doesn't work for lapic-pt vCPUs as the IPI will be injected to VMs
directly without vmexit.

Consequently, there may be fatal errors triggered. 1). Certain operation may not be
carried out on time which may further lead to fatal errors. Taking the
EPT flush request as an example, once we don't flush the EPT on time and
the guest access the out-of-date EPT, fatal error happens. 2). The IPI
vector will be delivered to VMs directly. If the guest can't handle it
properly, further interrupts might be blocked which will cause the VMs
hang.

The NMI can be used as the notification signal to kick the vCPU off VMX
non-root mode for lapic-pt vCPUs. This patchset does it by enable NMI-exiting
after passthroughing the lapic to vCPU.

TODOs:
- Filter out all NMI sources:
* Write ICR with deliver mode NMI
* Program the MSI data with deliver mode NMI
* Program the LVTs with deliver mode NMI
- Implement the smp_call for lapic-pt VMs to facilitate the debug of lapic-pt VMs.

--
v1 -> v2:
- Fix wrong comment in patch 1/7.
- Move the 'virtual NMI' enabling codes to switch_apicv_mode_x2apic. So, we only
need to enable 'NMI-window exiting' in nmi handler and disable 'NMI-window
exiting' in nmi window exiting handler.
- Add comment for why acrn don't support vNMI when NMI is used as notification
signal in patch "ignore the NMI injection request for lapic-pt vCPUs".

Kaige Fu (7):
HV: Push NMI vector on to the exception stack
HV: Add helper function send_single_nmi
HV: Use NMI to kick lapic-pt vCPU's thread
HV: ignore the NMI injection request for lapic-pt vCPUs
HV: Use NMI-window exiting to address req missing issue
HV: Use NMI to replace INIT signal for lapic-pt VMs S5
HV: Remove INIT signal notification related code

hypervisor/arch/x86/guest/virq.c | 72 ++++++++++++++++++++--------
hypervisor/arch/x86/guest/vmcs.c | 18 +++++--
hypervisor/arch/x86/guest/vmexit.c | 23 +--------
hypervisor/arch/x86/idt.S | 6 +--
hypervisor/arch/x86/irq.c | 51 ++++++++++++++++----
hypervisor/arch/x86/lapic.c | 9 +---
hypervisor/common/schedule.c | 24 +++++++---
hypervisor/include/arch/x86/irq.h | 1 +
hypervisor/include/arch/x86/lapic.h | 4 +-
hypervisor/include/common/schedule.h | 4 +-
10 files changed, 138 insertions(+), 74 deletions(-)

--
2.20.0


Re: [PATCH 2/6] acrn-config: add 'virtio-console' info in launch xmls

Victor Sun
 


On 12/9/2019 3:34 PM, Wei Liu wrote:
Some vm need mediator of 'virtio-console', so add 'console' item
into the launch config files that user could edit them from webUI.

Tracked-On: #4186
Signed-off-by: Wei Liu <weix.w.liu@...>
---
 .../xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml       | 3 ++-
 .../xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml     | 3 ++-
 .../xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml       | 3 ++-
 .../xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml | 3 ++-
 .../xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml       | 3 ++-
 .../xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml       | 3 ++-
 .../xmls/config-xmls/generic/hybrid_launch_1uos.xml         | 3 ++-
 .../xmls/config-xmls/generic/industry_launch_1uos.xml       | 3 ++-
 .../xmls/config-xmls/generic/industry_launch_2uos.xml       | 6 ++++--
 .../xmls/config-xmls/generic/sdc_launch_1uos.xml            | 3 ++-
 .../config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml    | 3 ++-
 .../config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml   | 3 ++-
 .../xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml | 3 ++-
 .../xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml      | 6 ++++--
 .../xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml      | 3 ++-
 .../xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml    | 3 ++-
 .../config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml   | 3 ++-
 .../config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml  | 3 ++-
 .../config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml     | 3 ++-
 .../xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml     | 6 ++++--
 .../xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml     | 3 ++-
 .../xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml   | 3 ++-
 .../config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml  | 3 ++-
 .../config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml | 3 ++-
 .../config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml    | 3 ++-
 .../xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml    | 6 ++++--
 .../xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml    | 3 ++-
 .../xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml  | 3 ++-
 .../config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml  | 3 ++-
 .../config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml | 3 ++-
 .../config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml    | 3 ++-
 .../xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml    | 6 ++++--
 .../xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml    | 3 ++-
 .../xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml  | 3 ++-
 34 files changed, 78 insertions(+), 39 deletions(-)

diff --git a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml
index 76ca8edc7558..4724c944fe67 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<poweroff_channel desc="the method of power off uos" readonly="true">
 	--pm_notify_channel ioc \
 	</poweroff_channel>
@@ -30,6 +30,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">AaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/dev/mmcblk1p3:android/android.img</block>
+		<console desc="virtio console device">@stdio:stdio_port</console>

please specify virtio-console desc as "<console desc="virtio console deviceinput format: [@]stdio|tty|pty|sock:portname[=portpath][,[@]stdio|tty|pty:portname[=portpath]]  "


 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml
index a9f13a3c1a02..863f1e5e44e1 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<poweroff_channel desc="the method of power off uos" readonly="true">
 	--pm_notify_channel ioc \
 	</poweroff_channel>
@@ -30,6 +30,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">AliaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/dev/mmcblk1p3:alios/alios.img</block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml
index ed7a3fe6067d..b9ef37496bab 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<poweroff_channel desc="the method of power off uos" readonly="true">
 	--pm_notify_channel ioc \
 	</poweroff_channel>
@@ -30,6 +30,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/dev/mmcblk1p3:clearlinux/clearlinux.img</block>
+		<console desc="virtio console device">@pty:pty_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml
index b7f6ff8c020f..537fdc42b15b 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<poweroff_channel desc="the method of power off uos" readonly="true">
 	--pm_notify_channel power_button \
 	</poweroff_channel>
@@ -30,6 +30,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/dev/mmcblk0p1:clearlinux/clearlinux.img</block>
+		<console desc="virtio console device">@pty:pty_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml b/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml
index 306269d94249..746f2eedc118 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<poweroff_channel desc="the method of power off uos" readonly="true">
 	--pm_notify_channel power_button \
 	</poweroff_channel>
@@ -30,6 +30,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">AaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/dev/mmcblk0p1:android/android.img</block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml
index 5d3649187765..200dc77eb63b 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<poweroff_channel desc="the method of power off uos" readonly="true">
 	--pm_notify_channel power_button \
 	</poweroff_channel>
@@ -30,6 +30,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/dev/mmcblk0p1:clearlinux/clearlinux.img</block>
+		<console desc="virtio console device">@pty:pty_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/generic/hybrid_launch_1uos.xml b/misc/acrn-config/xmls/config-xmls/generic/hybrid_launch_1uos.xml
index 26124f1da2c7..4401241b3766 100644
--- a/misc/acrn-config/xmls/config-xmls/generic/hybrid_launch_1uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/hybrid_launch_1uos.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte"></mem_size>
 	<gvt_args desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type"></console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<poweroff_channel desc="the method of power off uos">
 	</poweroff_channel>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
@@ -29,6 +29,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+		<console desc="virtio console device"></console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.xml b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.xml
index 1118fba81f1e..9e3944d267f4 100644
--- a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte"></mem_size>
 	<gvt_args desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type"></console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<poweroff_channel desc="the method of power off uos">
 	</poweroff_channel>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
@@ -29,6 +29,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+		<console desc="virtio console device"></console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.xml
index 4dbb774d71bf..f25541e0f36d 100644
--- a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte"></mem_size>
 	<gvt_args desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type"></console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<poweroff_channel desc="the method of power off uos">
 	</poweroff_channel>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
@@ -29,6 +29,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+		<console desc="virtio console device"></console>
 	</virtio_devices>
     </uos>
     <uos id="2">
@@ -37,7 +38,7 @@
 	<mem_size desc="UOS memory size in MByte"></mem_size>
 	<gvt_args desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type"></console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<poweroff_channel desc="the method of power off uos">
 	</poweroff_channel>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
@@ -61,6 +62,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+		<console desc="virtio console device"></console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/generic/sdc_launch_1uos.xml b/misc/acrn-config/xmls/config-xmls/generic/sdc_launch_1uos.xml
index 76200d86ec05..24d39dad94ae 100644
--- a/misc/acrn-config/xmls/config-xmls/generic/sdc_launch_1uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/sdc_launch_1uos.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte"></mem_size>
 	<gvt_args desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type"></console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<poweroff_channel desc="the method of power off uos">
 	</poweroff_channel>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
@@ -29,6 +29,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+		<console desc="virtio console device"></console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml
index c7fbfb38699f..aa8ae7f5f7b6 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">1024</mem_size>
 	<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml
index 0c332ad6ac36..df731631c9b4 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./VxWorks.img</block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml
index 4f52ce570121..bf4c33721128 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">4096</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">com1(ttyS0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+		<console desc="virtio console device"></console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml
index c21f822a5e62..298b1accca6d 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">4096</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">com1(ttyS0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+		<console desc="virtio console device"></console>
 	</virtio_devices>
     </uos>
 
@@ -36,7 +37,7 @@
 	<mem_size desc="UOS memory size in MByte">1024</mem_size>
 	<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -58,6 +59,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml
index df0bfb5028be..54b2c30810a8 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<poweroff_channel desc="the method of power off uos" readonly="true">
 	--pm_notify_channel power_button \
 	</poweroff_channel>
@@ -30,6 +30,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/home/clear/uos/uos.img</block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml
index 89c9431ec833..42c0e8d82050 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">128</mem_size>
 	<gvt_args desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">com1(ttyS0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./zephyr.img</block>
+		<console desc="virtio console device">@pty:pty_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml
index 895f294c456b..0637da5a89f8 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">1024</mem_size>
 	<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml
index 2b89b8b81df9..16c3e21cbd3c 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./VxWorks.img</block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml
index 2ea8bb642b7e..107bd2c4c2bb 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">4096</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">com1(ttyS0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+		<console desc="virtio console device"></console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml
index 596dece2edc3..9bcb976c5763 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">4096</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">com1(ttyS0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+		<console desc="virtio console device"></console>
 	</virtio_devices>
     </uos>
 
@@ -36,7 +37,7 @@
 	<mem_size desc="UOS memory size in MByte">1024</mem_size>
 	<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -58,6 +59,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml
index 6dce9df19417..360f8a68b7c1 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<poweroff_channel desc="the method of power off uos" readonly="true">
 	--pm_notify_channel power_button \
 	</poweroff_channel>
@@ -30,6 +30,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/home/clear/uos/uos.img</block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml
index dd3b4fa7379e..9eda7291bd3b 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">128</mem_size>
 	<gvt_args desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">com1(ttyS0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./zephyr.img</block>
+		<console desc="virtio console device">@pty:pty_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml
index 04d07af3d02f..99fc10933ece 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">1024</mem_size>
 	<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml
index 791133e58c4d..e81e15c20118 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./VxWorks.img</block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml
index 57a4d83cd6f5..9d38f4a3dac6 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">4096</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">com1(ttyS0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+		<console desc="virtio console device"></console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml
index 58e360be9c15..58f5e2ba5a0e 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">4096</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">com1(ttyS0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+		<console desc="virtio console device"></console>
 	</virtio_devices>
     </uos>
 
@@ -36,7 +37,7 @@
 	<mem_size desc="UOS memory size in MByte">1024</mem_size>
 	<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -58,6 +59,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml
index 77111fb5a4ba..be44f3b6d9b8 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<poweroff_channel desc="the method of power off uos" readonly="true">
 	--pm_notify_channel power_button \
 	</poweroff_channel>
@@ -30,6 +30,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/home/clear/uos/uos.img</block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml
index e46f4e9f2fca..4a71d047e480 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">128</mem_size>
 	<gvt_args desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">com1(ttyS0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./zephyr.img</block>
+		<console desc="virtio console device">@pty:pty_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml
index 1767e83094b9..364ebf7e7ed8 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">1024</mem_size>
 	<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml
index 08f9242308e5..e925f400e158 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./VxWorks.img</block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml
index 1134c554ffd4..e5d4293ff236 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">4096</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">com1(ttyS0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+		<console desc="virtio console device"></console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml
index ebacf0be7b27..e4e28c57e7b8 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">4096</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">com1(ttyS0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+		<console desc="virtio console device"></console>
 	</virtio_devices>
     </uos>
 
@@ -36,7 +37,7 @@
 	<mem_size desc="UOS memory size in MByte">1024</mem_size>
 	<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -58,6 +59,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml
index 6aaa1f355334..fa1e442dd146 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">2048</mem_size>
 	<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
 	<poweroff_channel desc="the method of power off uos" readonly="true">
 	--pm_notify_channel power_button \
 	</poweroff_channel>
@@ -30,6 +30,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/home/clear/uos/uos.img</block>
+		<console desc="virtio console device">@stdio:stdio_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml
index db96aadb0bf7..c8ec476c7c3a 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml
@@ -5,7 +5,7 @@
 	<mem_size desc="UOS memory size in MByte">128</mem_size>
 	<gvt_args desc="GVT argument for the vm"></gvt_args>
 	<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
-	<console_type desc="UOS console type">com1(ttyS0)</console_type>
+	<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
 	<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
 
 	<passthrough_devices>
@@ -27,6 +27,7 @@
 		<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
 		<input desc="virtio input device"></input>
 		<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./zephyr.img</block>
+		<console desc="virtio console device">@pty:pty_port</console>
 	</virtio_devices>
     </uos>
 </acrn-config>


[PATCH 6/6] acrn-config: unify get_vuart_info_id api in config tool

Liu, WeiX W
 

1. unify get_vuart_info_id/get_vuart_id api in board/scenario/launch
config tool.
2. if vm use 'vuart_tty' method to power off, make sure this vm have
select the vuart1 'SOS_COM2_BASE'.

Tracked-On; #3854
Signed-off-by: Wei Liu <weix.w.liu@...>
---
misc/acrn-config/board_config/misc_cfg_h.py | 17 ++-----
misc/acrn-config/launch_config/com.py | 6 +++
misc/acrn-config/library/board_cfg_lib.py | 42 +---------------
misc/acrn-config/library/common.py | 50 ++++++++++++++++++++
misc/acrn-config/library/launch_cfg_lib.py | 8 +++-
misc/acrn-config/library/scenario_cfg_lib.py | 42 +---------------
6 files changed, 70 insertions(+), 95 deletions(-)

diff --git a/misc/acrn-config/board_config/misc_cfg_h.py b/misc/acrn-config/board_config/misc_cfg_h.py
index 554ab2c0eae8..eeae6503cb76 100644
--- a/misc/acrn-config/board_config/misc_cfg_h.py
+++ b/misc/acrn-config/board_config/misc_cfg_h.py
@@ -14,17 +14,11 @@ MISC_CFG_END = """#endif /* MISC_CFG_H */"""

class Vuart:

- t_vm_id = []
- t_vuart_id = []
- v_type = []
- v_base = []
- v_irq = []
-
- def style_check_1(self):
- self.v_irq = []
-
- def style_check_2(self):
- self.v_irq = []
+ t_vm_id = {}
+ t_vuart_id = {}
+ v_type = {}
+ v_base = {}
+ v_irq = {}


def sos_bootarg_diff(sos_cmdlines, config):
@@ -159,7 +153,6 @@ def generate_file(config):
print("#define SOS_COM2_BASE\t\t{}U".format(vuart1_port_base), file=config)
print("#define SOS_COM2_IRQ\t\t{}U".format(vuart1_irq), file=config)

-
# sos boot command line
print("", file=config)
if "SOS_VM" in vm_types:
diff --git a/misc/acrn-config/launch_config/com.py b/misc/acrn-config/launch_config/com.py
index 690a8a1417e0..89f9581edfa6 100644
--- a/misc/acrn-config/launch_config/com.py
+++ b/misc/acrn-config/launch_config/com.py
@@ -533,6 +533,12 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
# pm_channel set
if dm['pm_channel'][vmid] and dm['pm_channel'][vmid] != None:
pm_key = dm['pm_channel'][vmid]
+ if pm_key == "vuart_tty":
+ vuart_base = launch_cfg_lib.get_vuart1_from_scenario(sos_vmid + vmid)
+ if vuart_base == "INVALID_COM_BASE":
+ err_key = "uos:id={}:poweroff_channel".format(vmid)
+ launch_cfg_lib.ERR_LIST[err_key] = "vuart1 of VM{} in scenario file should select 'SOS_COM2_BASE'".format(sos_vmid + vmid)
+ return
print(" {} \\".format(launch_cfg_lib.PM_CHANNEL_DIC[pm_key]), file=config)

# XHCI args set
diff --git a/misc/acrn-config/library/board_cfg_lib.py b/misc/acrn-config/library/board_cfg_lib.py
index 3367b33fd55e..f419f02154fc 100644
--- a/misc/acrn-config/library/board_cfg_lib.py
+++ b/misc/acrn-config/library/board_cfg_lib.py
@@ -384,29 +384,6 @@ def get_board_private_vuart(branch_tag, tag_console):
return (err_dic, vuart0_console_dic, vuart1_console_dic)


-def get_vuart_id(tmp_vuart, leaf_tag, leaf_text):
- """
- Get all vuart id member of class
- :param leaf_tag: key pattern of item tag
- :param tmp_vuart: a dictionary to store member:value
- :param leaf_text: key pattern of item tag's value
- :return: a dictionary to which stored member:value
- """
- if leaf_tag == "type":
- tmp_vuart['type'] = leaf_text
- if leaf_tag == "base":
- tmp_vuart['base'] = leaf_text
- if leaf_tag == "irq":
- tmp_vuart['irq'] = leaf_text
-
- if leaf_tag == "target_vm_id":
- tmp_vuart['target_vm_id'] = leaf_text
- if leaf_tag == "target_uart_id":
- tmp_vuart['target_uart_id'] = leaf_text
-
- return tmp_vuart
-
-
def get_vuart_info_id(config_file, idx):
"""
Get vuart information by vuart id indexx
@@ -414,24 +391,7 @@ def get_vuart_info_id(config_file, idx):
:param idx: vuart index in range: [0,1]
:return: dictionary which stored the vuart-id
"""
- tmp_tag = []
- vm_id = 0
- root = common.get_config_root(config_file)
- for item in root:
- for sub in item:
- tmp_vuart = {}
- for leaf in sub:
- if sub.tag == "vuart" and int(sub.attrib['id']) == idx:
- tmp_vuart = get_vuart_id(tmp_vuart, leaf.tag, leaf.text)
-
- # append vuart for each vm
- if tmp_vuart and sub.tag == "vuart":
- #tmp_vuart[vm_id] = tmp_vuart
- tmp_tag.append(tmp_vuart)
-
- if item.tag == "vm":
- vm_id += 1
-
+ tmp_tag = common.get_vuart_info_id(config_file, idx)
return tmp_tag


diff --git a/misc/acrn-config/library/common.py b/misc/acrn-config/library/common.py
index 3845415a875f..ed7f7bbde45c 100644
--- a/misc/acrn-config/library/common.py
+++ b/misc/acrn-config/library/common.py
@@ -627,3 +627,53 @@ def undline_name(name):
name_str = "_".join(name_str.split()).upper()

return name_str
+
+
+def get_vuart_id(tmp_vuart, leaf_tag, leaf_text):
+ """
+ Get all vuart id member of class
+ :param tmp_vuart: a dictionary to store member:value
+ :param leaf_tag: key pattern of item tag
+ :param leaf_text: key pattern of item tag's value
+ :return: a dictionary to which stored member:value
+ """
+ if leaf_tag == "type":
+ tmp_vuart['type'] = leaf_text
+ if leaf_tag == "base":
+ tmp_vuart['base'] = leaf_text
+ if leaf_tag == "irq":
+ tmp_vuart['irq'] = leaf_text
+
+ if leaf_tag == "target_vm_id":
+ tmp_vuart['target_vm_id'] = leaf_text
+ if leaf_tag == "target_uart_id":
+ tmp_vuart['target_uart_id'] = leaf_text
+
+ return tmp_vuart
+
+
+def get_vuart_info_id(config_file, idx):
+ """
+ Get vuart information by vuart id indexx
+ :param config_file: it is a file what contains information for script to read from
+ :param idx: vuart index in range: [0,1]
+ :return: dictionary which stored the vuart-id
+ """
+ tmp_tag = {}
+ vm_id = 0
+ root = get_config_root(config_file)
+ for item in root:
+ for sub in item:
+ tmp_vuart = {}
+ for leaf in sub:
+ if sub.tag == "vuart" and int(sub.attrib['id']) == idx:
+ tmp_vuart = get_vuart_id(tmp_vuart, leaf.tag, leaf.text)
+
+ # append vuart for each vm
+ if tmp_vuart and sub.tag == "vuart":
+ tmp_tag[vm_id] = tmp_vuart
+
+ if item.tag == "vm":
+ vm_id += 1
+
+ return tmp_tag
diff --git a/misc/acrn-config/library/launch_cfg_lib.py b/misc/acrn-config/library/launch_cfg_lib.py
index 6140dc5883a6..7e9e8bcb0ad0 100644
--- a/misc/acrn-config/library/launch_cfg_lib.py
+++ b/misc/acrn-config/library/launch_cfg_lib.py
@@ -52,7 +52,7 @@ PM_CHANNEL_DIC = {
None:'',
'IOC':'--pm_notify_channel ioc',
'Power Button':'--pm_notify_channel power_button',
- 'vuart_pty':'--pm_notify_channel uart \\\n\t--pm_by_vuart pty,/run/acrn/life_mngr_$vm_name \\\n\t-l com2,/run/acrn/life_mngr_$vm_name',
+ 'vuart_pty':'--pm_notify_channel uart \\\n --pm_by_vuart pty,/run/acrn/life_mngr_$vm_name \\\n -l com2,/run/acrn/life_mngr_$vm_name',
'vuart_tty':'--pm_notify_channel uart --pm_by_vuart tty,/dev/ttyS1',
}

@@ -595,3 +595,9 @@ def undline_name(name):
:return: name_str which contain'_'
"""
return common.undline_name(name)
+
+
+def get_vuart1_from_scenario(vmid):
+ """Get the vmid's vuart1 base"""
+ vuart1 = common.get_vuart_info_id(SCENARIO_INFO_FILE, 1)
+ return vuart1[vmid]['base']
diff --git a/misc/acrn-config/library/scenario_cfg_lib.py b/misc/acrn-config/library/scenario_cfg_lib.py
index a452c3af9863..f03bd861a4d2 100644
--- a/misc/acrn-config/library/scenario_cfg_lib.py
+++ b/misc/acrn-config/library/scenario_cfg_lib.py
@@ -670,29 +670,6 @@ def gen_patch(srcs_list, scenario_name):
return err_dic


-def get_vuart_id(tmp_vuart, leaf_tag, leaf_text):
- """
- Get all vuart id member of class
- :param tmp_vuart: a dictionary to store member:value
- :param leaf_tag: key pattern of item tag
- :param leaf_text: key pattern of item tag's value
- :return: a dictionary to which stored member:value
- """
- if leaf_tag == "type":
- tmp_vuart['type'] = leaf_text
- if leaf_tag == "base":
- tmp_vuart['base'] = leaf_text
- if leaf_tag == "irq":
- tmp_vuart['irq'] = leaf_text
-
- if leaf_tag == "target_vm_id":
- tmp_vuart['target_vm_id'] = leaf_text
- if leaf_tag == "target_uart_id":
- tmp_vuart['target_uart_id'] = leaf_text
-
- return tmp_vuart
-
-
def get_vuart_info_id(config_file, idx):
"""
Get vuart information by vuart id indexx
@@ -700,23 +677,7 @@ def get_vuart_info_id(config_file, idx):
:param idx: vuart index in range: [0,1]
:return: dictionary which stored the vuart-id
"""
- tmp_tag = {}
- vm_id = 0
- root = common.get_config_root(config_file)
- for item in root:
- for sub in item:
- tmp_vuart = {}
- for leaf in sub:
- if sub.tag == "vuart" and int(sub.attrib['id']) == idx:
- tmp_vuart = get_vuart_id(tmp_vuart, leaf.tag, leaf.text)
-
- # append vuart for each vm
- if tmp_vuart and sub.tag == "vuart":
- tmp_tag[vm_id] = tmp_vuart
-
- if item.tag == "vm":
- vm_id += 1
-
+ tmp_tag = common.get_vuart_info_id(config_file, idx)
return tmp_tag


@@ -737,7 +698,6 @@ def avl_vuart_ui_select(scenario_info):
key = "vm={},vuart=1,base".format(vm_i)
tmp_vuart[key] = ['INVALID_COM_BASE', 'COM2_BASE']

- #print(tmp_vuart)
return tmp_vuart


--
2.20.1


[PATCH 5/6] acrn-config: add 'poweroff_channel' support for launch config

Liu, WeiX W
 

Add pm_channel support to parse and get 'poweroff_channel' item value
from launch config files, these values are selectable by user.

Signed-off-by: Wei Liu <weix.w.liu@...>
---
misc/acrn-config/launch_config/com.py | 17 ++++++-----------
.../acrn-config/launch_config/launch_cfg_gen.py | 1 +
misc/acrn-config/launch_config/launch_item.py | 1 +
misc/acrn-config/library/launch_cfg_lib.py | 8 ++++++++
4 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/misc/acrn-config/launch_config/com.py b/misc/acrn-config/launch_config/com.py
index d307f8901de6..690a8a1417e0 100644
--- a/misc/acrn-config/launch_config/com.py
+++ b/misc/acrn-config/launch_config/com.py
@@ -503,15 +503,6 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
if uos_type in ("ANDROID", "ALIOS"):
print(" -s {},virtio-rpmb \\".format(launch_cfg_lib.virtual_dev_slot("virtio-rpmb")), file=config)
- if board_name == "apl-up2":
- print(" --pm_notify_channel power_button \\", file=config)
- if board_name == "apl-mrb":
- print(" --pm_notify_channel ioc \\", file=config)
-
- if is_nuc_whl_clr(names, vmid):
- print(" --pm_notify_channel uart \\", file=config)
- print(' --pm_by_vuart pty,/run/acrn/life_mngr_$vm_name \\', file=config)
- print(' -l com2,/run/acrn/life_mngr_$vm_name \\', file=config)

# mac_seed
if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
@@ -523,7 +514,6 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
print(" --lapic_pt \\", file=config)
print(" --rtvm \\", file=config)
print(" --virtio_poll 1000000 \\", file=config)
- print(" --pm_notify_channel uart --pm_by_vuart tty,/dev/ttyS1 \\", file=config)

# vxworks
if uos_type == "VXWORKS":
@@ -540,7 +530,12 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
print("{} \\".format(dm_str), file=config)
print(" --windows \\", file=config)

- # WA: XHCI args set
+ # pm_channel set
+ if dm['pm_channel'][vmid] and dm['pm_channel'][vmid] != None:
+ pm_key = dm['pm_channel'][vmid]
+ print(" {} \\".format(launch_cfg_lib.PM_CHANNEL_DIC[pm_key]), file=config)
+
+ # XHCI args set
xhci_args_set(dm, vmid, config)

# VIRTIO args set
diff --git a/misc/acrn-config/launch_config/launch_cfg_gen.py b/misc/acrn-config/launch_config/launch_cfg_gen.py
index 43e042112547..8229664c8b5b 100644
--- a/misc/acrn-config/launch_config/launch_cfg_gen.py
+++ b/misc/acrn-config/launch_config/launch_cfg_gen.py
@@ -46,6 +46,7 @@ def get_launch_item_values(board_info):

launch_item_values["uos,vbootloader"] = launch_cfg_lib.BOOT_TYPE
launch_item_values['uos,vuart0'] = launch_cfg_lib.DM_VUART0
+ launch_item_values['uos,poweroff_channel'] = launch_cfg_lib.PM_CHANNEL

return launch_item_values

diff --git a/misc/acrn-config/launch_config/launch_item.py b/misc/acrn-config/launch_config/launch_item.py
index f9c152b17453..2c7a25f03e95 100644
--- a/misc/acrn-config/launch_config/launch_item.py
+++ b/misc/acrn-config/launch_config/launch_item.py
@@ -20,6 +20,7 @@ class AcrnDmArgs:
self.args["gvt_args"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "gvt_args")
self.args["vbootloader"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "vbootloader")
self.args["vuart0"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "vuart0")
+ self.args["pm_channel"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "poweroff_channel")
self.args["off_pcpus"] = launch_cfg_lib.get_leaf_tag_map(self.scenario_info, "vcpu_affinity", "pcpu_id")
self.args["xhci"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "usb_xhci")

diff --git a/misc/acrn-config/library/launch_cfg_lib.py b/misc/acrn-config/library/launch_cfg_lib.py
index d49a5775c64f..6140dc5883a6 100644
--- a/misc/acrn-config/library/launch_cfg_lib.py
+++ b/misc/acrn-config/library/launch_cfg_lib.py
@@ -47,6 +47,14 @@ PT_SLOT = {


POST_UUID_DIC = {}
+PM_CHANNEL = ['', 'IOC', 'Power Button', 'vuart_pty', 'vuart_tty']
+PM_CHANNEL_DIC = {
+ None:'',
+ 'IOC':'--pm_notify_channel ioc',
+ 'Power Button':'--pm_notify_channel power_button',
+ 'vuart_pty':'--pm_notify_channel uart \\\n\t--pm_by_vuart pty,/run/acrn/life_mngr_$vm_name \\\n\t-l com2,/run/acrn/life_mngr_$vm_name',
+ 'vuart_tty':'--pm_notify_channel uart --pm_by_vuart tty,/dev/ttyS1',
+}


def prepare(check_git):
--
2.20.1


[PATCH 4/6] acrn-config: modify 'poweroff_channel' info in launch xmls

Liu, WeiX W
 

Some vm need power off method, so modify 'poweroff_channel'
item in the launch config files that user could select them from webUI.

Signed-off-by: Wei Liu <weix.w.liu@...>
---
.../xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml | 4 +---
.../xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml | 4 +---
.../xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml | 4 +---
.../xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml | 4 +---
.../xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml | 4 +---
.../xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml | 4 +---
.../xmls/config-xmls/generic/hybrid_launch_1uos.xml | 3 +--
.../xmls/config-xmls/generic/industry_launch_1uos.xml | 3 +--
.../xmls/config-xmls/generic/industry_launch_2uos.xml | 6 ++----
.../xmls/config-xmls/generic/sdc_launch_1uos.xml | 3 +--
.../config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml | 1 +
.../config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml | 1 +
.../xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml | 1 +
.../xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml | 2 ++
.../xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml | 4 +---
.../xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml | 1 +
.../config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml | 1 +
.../config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml | 1 +
.../config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml | 1 +
.../xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml | 2 ++
.../xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml | 4 +---
.../xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml | 1 +
.../config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml | 1 +
.../config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml | 1 +
.../config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml | 1 +
.../xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml | 2 ++
.../xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml | 4 +---
.../xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml | 1 +
.../config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml | 1 +
.../config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml | 1 +
.../config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml | 1 +
.../xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml | 2 ++
.../xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml | 4 +---
.../xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml | 1 +
34 files changed, 39 insertions(+), 40 deletions(-)

diff --git a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml
index 4724c944fe67..4a5159ea6183 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml
@@ -6,9 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
- <poweroff_channel desc="the method of power off uos" readonly="true">
- --pm_notify_channel ioc \
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos">IOC</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml
index 863f1e5e44e1..2b70adfabfe7 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml
@@ -6,9 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
- <poweroff_channel desc="the method of power off uos" readonly="true">
- --pm_notify_channel ioc \
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos">IOC</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml
index b9ef37496bab..93373ab3d82e 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml
@@ -6,9 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
- <poweroff_channel desc="the method of power off uos" readonly="true">
- --pm_notify_channel ioc \
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos">IOC</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml
index 537fdc42b15b..cf29553db424 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml
@@ -6,9 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
- <poweroff_channel desc="the method of power off uos" readonly="true">
- --pm_notify_channel power_button \
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos">Power Button</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml b/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml
index 746f2eedc118..e62a8fdb3d21 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml
@@ -6,9 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
- <poweroff_channel desc="the method of power off uos" readonly="true">
- --pm_notify_channel power_button \
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos">Power Button</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml
index 200dc77eb63b..5d4917deb6c0 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml
@@ -6,9 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
- <poweroff_channel desc="the method of power off uos" readonly="true">
- --pm_notify_channel power_button \
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos">Power Button</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/generic/hybrid_launch_1uos.xml b/misc/acrn-config/xmls/config-xmls/generic/hybrid_launch_1uos.xml
index 4401241b3766..ec434f2c9447 100644
--- a/misc/acrn-config/xmls/config-xmls/generic/hybrid_launch_1uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/hybrid_launch_1uos.xml
@@ -6,8 +6,7 @@
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
- <poweroff_channel desc="the method of power off uos">
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.xml b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.xml
index 9e3944d267f4..356e110fd02e 100644
--- a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.xml
@@ -6,8 +6,7 @@
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
- <poweroff_channel desc="the method of power off uos">
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.xml
index f25541e0f36d..bdc5af694c2c 100644
--- a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.xml
@@ -6,8 +6,7 @@
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
- <poweroff_channel desc="the method of power off uos">
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -39,8 +38,7 @@
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
- <poweroff_channel desc="the method of power off uos">
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/generic/sdc_launch_1uos.xml b/misc/acrn-config/xmls/config-xmls/generic/sdc_launch_1uos.xml
index 24d39dad94ae..687f6cd4000e 100644
--- a/misc/acrn-config/xmls/config-xmls/generic/sdc_launch_1uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/sdc_launch_1uos.xml
@@ -6,8 +6,7 @@
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
- <poweroff_channel desc="the method of power off uos">
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml
index aa8ae7f5f7b6..855cbd216e1e 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml
@@ -6,6 +6,7 @@
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
+ <poweroff_channel desc="the method of power off uos">vuart_tty</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml
index df731631c9b4..d45f5e96b6d8 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml
index bf4c33721128..aaa0088438d6 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml
index 298b1accca6d..a30532ba6677 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -38,6 +39,7 @@
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
+ <poweroff_channel desc="the method of power off uos">vuart_tty</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml
index 54b2c30810a8..b89bbfbbb6f6 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml
@@ -6,9 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
- <poweroff_channel desc="the method of power off uos" readonly="true">
- --pm_notify_channel power_button \
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos">vuart_pty</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml
index 42c0e8d82050..d8f9825cbe51 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml
index 0637da5a89f8..464cd24c1cdd 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml
@@ -6,6 +6,7 @@
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
+ <poweroff_channel desc="the method of power off uos">vuart_tty</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml
index 16c3e21cbd3c..56115d0271d4 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml
index 107bd2c4c2bb..caadc2d9183e 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml
index 9bcb976c5763..29ab2806bc69 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -38,6 +39,7 @@
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
+ <poweroff_channel desc="the method of power off uos">vuart_tty</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml
index 360f8a68b7c1..b531148f5e37 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml
@@ -6,9 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
- <poweroff_channel desc="the method of power off uos" readonly="true">
- --pm_notify_channel power_button \
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos">vuart_pty</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml
index 9eda7291bd3b..0843eefad664 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml
index 99fc10933ece..b9039e4f51aa 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml
@@ -6,6 +6,7 @@
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
+ <poweroff_channel desc="the method of power off uos">vuart_tty</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml
index e81e15c20118..e4a70afd33c3 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml
index 9d38f4a3dac6..64a3e302e696 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml
index 58f5e2ba5a0e..2c7f0c757984 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -38,6 +39,7 @@
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
+ <poweroff_channel desc="the method of power off uos">vuart_tty</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml
index be44f3b6d9b8..512fba1ed279 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml
@@ -6,9 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
- <poweroff_channel desc="the method of power off uos" readonly="true">
- --pm_notify_channel power_button \
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos">vuart_pty</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml
index 4a71d047e480..70929db78e80 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml
index 364ebf7e7ed8..9cecdd494038 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml
@@ -6,6 +6,7 @@
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
+ <poweroff_channel desc="the method of power off uos">vuart_tty</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml
index e925f400e158..569e9e6d3a53 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml
index e5d4293ff236..0911cd7f45d0 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml
index e4e28c57e7b8..9cc2b11ad492 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -38,6 +39,7 @@
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
+ <poweroff_channel desc="the method of power off uos">vuart_tty</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml
index fa1e442dd146..177fa1924c24 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml
@@ -6,9 +6,7 @@
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
- <poweroff_channel desc="the method of power off uos" readonly="true">
- --pm_notify_channel power_button \
- </poweroff_channel>
+ <poweroff_channel desc="the method of power off uos">vuart_pty</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml
index c8ec476c7c3a..b21f154b55be 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml
@@ -6,6 +6,7 @@
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
<vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
+ <poweroff_channel desc="the method of power off uos"></poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
--
2.20.1


[PATCH 3/6] acrn-config: supply the capability to edit 'gvt_args' from webUI

Liu, WeiX W
 

In some vms do not have to use gvt_args or need specify configuration
for 'gvt_args' tag.
The patch Supply the capability to edit 'gvt_args' item from webUI.

Signed-off-by: Wei Liu <weix.w.liu@...>
---
misc/acrn-config/launch_config/com.py | 8 +++++---
misc/acrn-config/launch_config/launch_cfg_gen.py | 1 -
misc/acrn-config/launch_config/launch_item.py | 1 -
misc/acrn-config/library/launch_cfg_lib.py | 3 +--
4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/misc/acrn-config/launch_config/com.py b/misc/acrn-config/launch_config/com.py
index 0fcf58f62780..d307f8901de6 100644
--- a/misc/acrn-config/launch_config/com.py
+++ b/misc/acrn-config/launch_config/com.py
@@ -225,11 +225,13 @@ def interrupt_storm(pt_sel, config):
print("", file=config)


-def gvt_arg_set(uos_type, config):
+def gvt_arg_set(dm, vmid, uos_type, config):

if uos_type not in ('CLEARLINUX', 'ANDROID', 'ALIOS', 'WINDOWS'):
return
- print(' -s 2,pci-gvt -G "$2" \\', file=config)
+ gvt_args = dm['gvt_args'][vmid]
+ if gvt_args:
+ print(' -s 2,pci-gvt -G "$2" \\', file=config)


def log_level_set(uos_type, config):
@@ -545,7 +547,7 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
virtio_args_set(dm, virt_io, vmid, config)

# GVT args set
- gvt_arg_set(uos_type, config)
+ gvt_arg_set(dm, vmid, uos_type, config)

# vbootloader setting
vboot_arg_set(dm, vmid, config)
diff --git a/misc/acrn-config/launch_config/launch_cfg_gen.py b/misc/acrn-config/launch_config/launch_cfg_gen.py
index f71ed5743ee5..43e042112547 100644
--- a/misc/acrn-config/launch_config/launch_cfg_gen.py
+++ b/misc/acrn-config/launch_config/launch_cfg_gen.py
@@ -46,7 +46,6 @@ def get_launch_item_values(board_info):

launch_item_values["uos,vbootloader"] = launch_cfg_lib.BOOT_TYPE
launch_item_values['uos,vuart0'] = launch_cfg_lib.DM_VUART0
- launch_item_values['uos,gvt_args'] = launch_cfg_lib.GVT_ARGS

return launch_item_values

diff --git a/misc/acrn-config/launch_config/launch_item.py b/misc/acrn-config/launch_config/launch_item.py
index 6d428eee13c3..f9c152b17453 100644
--- a/misc/acrn-config/launch_config/launch_item.py
+++ b/misc/acrn-config/launch_config/launch_item.py
@@ -28,7 +28,6 @@ class AcrnDmArgs:
launch_cfg_lib.args_aval_check(self.args["uos_type"], "uos_type", launch_cfg_lib.UOS_TYPES)
launch_cfg_lib.args_aval_check(self.args["rtos_type"], "rtos_type", launch_cfg_lib.RTOS_TYPE)
launch_cfg_lib.mem_size_check(self.args["mem_size"], "mem_size")
- launch_cfg_lib.args_aval_check(self.args["gvt_args"], "gvt_args", launch_cfg_lib.GVT_ARGS)
launch_cfg_lib.args_aval_check(self.args["vbootloader"], "vbootloader", launch_cfg_lib.BOOT_TYPE)
launch_cfg_lib.args_aval_check(self.args["vuart0"], "vuart0", launch_cfg_lib.DM_VUART0)

diff --git a/misc/acrn-config/library/launch_cfg_lib.py b/misc/acrn-config/library/launch_cfg_lib.py
index 9c1070b8443f..d49a5775c64f 100644
--- a/misc/acrn-config/library/launch_cfg_lib.py
+++ b/misc/acrn-config/library/launch_cfg_lib.py
@@ -17,7 +17,6 @@ BOOT_TYPE = ['no', 'vsbl', 'ovmf']
RTOS_TYPE = ['no', 'Soft RT', 'Hard RT']
DM_VUART0 = ['Disable', 'Enable']
UOS_TYPES = ['CLEARLINUX', 'ANDROID', 'ALIOS', 'PREEMPT-RT LINUX', 'VXWORKS', 'WINDOWS', 'ZEPHYR', 'GENERIC LINUX']
-GVT_ARGS = ['64 448 8']

PT_SUB_PCI = {}
PT_SUB_PCI['usb_xdci'] = ['USB controller']
@@ -456,7 +455,7 @@ def args_aval_check(arg_list, item, avl_list):
"""
# args should be set into launch xml from webUI
i_cnt = 1
- skip_check_list = ['gvt_args']
+ skip_check_list = ['']
if item in skip_check_list:
return

--
2.20.1


[PATCH 2/6] acrn-config: add 'virtio-console' info in launch xmls

Liu, WeiX W
 

Some vm need mediator of 'virtio-console', so add 'console' item
into the launch config files that user could edit them from webUI.

Tracked-On: #4186
Signed-off-by: Wei Liu <weix.w.liu@...>
---
.../xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml | 3 ++-
.../xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml | 3 ++-
.../xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml | 3 ++-
.../xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml | 3 ++-
.../xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml | 3 ++-
.../xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml | 3 ++-
.../xmls/config-xmls/generic/hybrid_launch_1uos.xml | 3 ++-
.../xmls/config-xmls/generic/industry_launch_1uos.xml | 3 ++-
.../xmls/config-xmls/generic/industry_launch_2uos.xml | 6 ++++--
.../xmls/config-xmls/generic/sdc_launch_1uos.xml | 3 ++-
.../config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml | 3 ++-
.../config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml | 3 ++-
.../xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml | 3 ++-
.../xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml | 6 ++++--
.../xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml | 3 ++-
.../xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml | 3 ++-
.../config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml | 3 ++-
.../config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml | 3 ++-
.../config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml | 3 ++-
.../xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml | 6 ++++--
.../xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml | 3 ++-
.../xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml | 3 ++-
.../config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml | 3 ++-
.../config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml | 3 ++-
.../config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml | 3 ++-
.../xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml | 6 ++++--
.../xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml | 3 ++-
.../xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml | 3 ++-
.../config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml | 3 ++-
.../config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml | 3 ++-
.../config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml | 3 ++-
.../xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml | 6 ++++--
.../xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml | 3 ++-
.../xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml | 3 ++-
34 files changed, 78 insertions(+), 39 deletions(-)

diff --git a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml
index 76ca8edc7558..4724c944fe67 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<poweroff_channel desc="the method of power off uos" readonly="true">
--pm_notify_channel ioc \
</poweroff_channel>
@@ -30,6 +30,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">AaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/dev/mmcblk1p3:android/android.img</block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml
index a9f13a3c1a02..863f1e5e44e1 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<poweroff_channel desc="the method of power off uos" readonly="true">
--pm_notify_channel ioc \
</poweroff_channel>
@@ -30,6 +30,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">AliaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/dev/mmcblk1p3:alios/alios.img</block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml
index ed7a3fe6067d..b9ef37496bab 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<poweroff_channel desc="the method of power off uos" readonly="true">
--pm_notify_channel ioc \
</poweroff_channel>
@@ -30,6 +30,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/dev/mmcblk1p3:clearlinux/clearlinux.img</block>
+ <console desc="virtio console device">@pty:pty_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml
index b7f6ff8c020f..537fdc42b15b 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<poweroff_channel desc="the method of power off uos" readonly="true">
--pm_notify_channel power_button \
</poweroff_channel>
@@ -30,6 +30,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/dev/mmcblk0p1:clearlinux/clearlinux.img</block>
+ <console desc="virtio console device">@pty:pty_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml b/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml
index 306269d94249..746f2eedc118 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<poweroff_channel desc="the method of power off uos" readonly="true">
--pm_notify_channel power_button \
</poweroff_channel>
@@ -30,6 +30,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">AaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/dev/mmcblk0p1:android/android.img</block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml
index 5d3649187765..200dc77eb63b 100644
--- a/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<poweroff_channel desc="the method of power off uos" readonly="true">
--pm_notify_channel power_button \
</poweroff_channel>
@@ -30,6 +30,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/dev/mmcblk0p1:clearlinux/clearlinux.img</block>
+ <console desc="virtio console device">@pty:pty_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/generic/hybrid_launch_1uos.xml b/misc/acrn-config/xmls/config-xmls/generic/hybrid_launch_1uos.xml
index 26124f1da2c7..4401241b3766 100644
--- a/misc/acrn-config/xmls/config-xmls/generic/hybrid_launch_1uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/hybrid_launch_1uos.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte"></mem_size>
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type"></console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<poweroff_channel desc="the method of power off uos">
</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
@@ -29,6 +29,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+ <console desc="virtio console device"></console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.xml b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.xml
index 1118fba81f1e..9e3944d267f4 100644
--- a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte"></mem_size>
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type"></console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<poweroff_channel desc="the method of power off uos">
</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
@@ -29,6 +29,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+ <console desc="virtio console device"></console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.xml
index 4dbb774d71bf..f25541e0f36d 100644
--- a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte"></mem_size>
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type"></console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<poweroff_channel desc="the method of power off uos">
</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
@@ -29,6 +29,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+ <console desc="virtio console device"></console>
</virtio_devices>
</uos>
<uos id="2">
@@ -37,7 +38,7 @@
<mem_size desc="UOS memory size in MByte"></mem_size>
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type"></console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<poweroff_channel desc="the method of power off uos">
</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
@@ -61,6 +62,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+ <console desc="virtio console device"></console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/generic/sdc_launch_1uos.xml b/misc/acrn-config/xmls/config-xmls/generic/sdc_launch_1uos.xml
index 76200d86ec05..24d39dad94ae 100644
--- a/misc/acrn-config/xmls/config-xmls/generic/sdc_launch_1uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/sdc_launch_1uos.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte"></mem_size>
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type"></console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<poweroff_channel desc="the method of power off uos">
</poweroff_channel>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>
@@ -29,6 +29,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+ <console desc="virtio console device"></console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml
index c7fbfb38699f..aa8ae7f5f7b6 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">1024</mem_size>
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml
index 0c332ad6ac36..df731631c9b4 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./VxWorks.img</block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml
index 4f52ce570121..bf4c33721128 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_waag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">4096</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">com1(ttyS0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+ <console desc="virtio console device"></console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml
index c21f822a5e62..298b1accca6d 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">4096</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">com1(ttyS0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+ <console desc="virtio console device"></console>
</virtio_devices>
</uos>

@@ -36,7 +37,7 @@
<mem_size desc="UOS memory size in MByte">1024</mem_size>
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -58,6 +59,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml
index df0bfb5028be..54b2c30810a8 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<poweroff_channel desc="the method of power off uos" readonly="true">
--pm_notify_channel power_button \
</poweroff_channel>
@@ -30,6 +30,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/home/clear/uos/uos.img</block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml
index 89c9431ec833..42c0e8d82050 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">128</mem_size>
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">com1(ttyS0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./zephyr.img</block>
+ <console desc="virtio console device">@pty:pty_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml
index 895f294c456b..0637da5a89f8 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">1024</mem_size>
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml
index 2b89b8b81df9..16c3e21cbd3c 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxworks.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./VxWorks.img</block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml
index 2ea8bb642b7e..107bd2c4c2bb 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">4096</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">com1(ttyS0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+ <console desc="virtio console device"></console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml
index 596dece2edc3..9bcb976c5763 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">4096</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">com1(ttyS0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+ <console desc="virtio console device"></console>
</virtio_devices>
</uos>

@@ -36,7 +37,7 @@
<mem_size desc="UOS memory size in MByte">1024</mem_size>
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -58,6 +59,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml
index 6dce9df19417..360f8a68b7c1 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<poweroff_channel desc="the method of power off uos" readonly="true">
--pm_notify_channel power_button \
</poweroff_channel>
@@ -30,6 +30,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/home/clear/uos/uos.img</block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml
index dd3b4fa7379e..9eda7291bd3b 100644
--- a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">128</mem_size>
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">com1(ttyS0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./zephyr.img</block>
+ <console desc="virtio console device">@pty:pty_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml
index 04d07af3d02f..99fc10933ece 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_hardrt.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">1024</mem_size>
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml
index 791133e58c4d..e81e15c20118 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vxworks.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./VxWorks.img</block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml
index 57a4d83cd6f5..9d38f4a3dac6 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">4096</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">com1(ttyS0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+ <console desc="virtio console device"></console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml
index 58e360be9c15..58f5e2ba5a0e 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">4096</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">com1(ttyS0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+ <console desc="virtio console device"></console>
</virtio_devices>
</uos>

@@ -36,7 +37,7 @@
<mem_size desc="UOS memory size in MByte">1024</mem_size>
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -58,6 +59,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml
index 77111fb5a4ba..be44f3b6d9b8 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<poweroff_channel desc="the method of power off uos" readonly="true">
--pm_notify_channel power_button \
</poweroff_channel>
@@ -30,6 +30,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/home/clear/uos/uos.img</block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml
index e46f4e9f2fca..4a71d047e480 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">128</mem_size>
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">com1(ttyS0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./zephyr.img</block>
+ <console desc="virtio console device">@pty:pty_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml
index 1767e83094b9..364ebf7e7ed8 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_hardrt.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">1024</mem_size>
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml
index 08f9242308e5..e925f400e158 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vxworks.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./VxWorks.img</block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml
index 1134c554ffd4..e5d4293ff236 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">4096</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">com1(ttyS0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+ <console desc="virtio console device"></console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml
index ebacf0be7b27..e4e28c57e7b8 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">4096</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">com1(ttyS0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">WaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./win10-ltsc.img</block>
+ <console desc="virtio console device"></console>
</virtio_devices>
</uos>

@@ -36,7 +37,7 @@
<mem_size desc="UOS memory size in MByte">1024</mem_size>
<gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -58,6 +59,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img"></block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml
index 6aaa1f355334..fa1e442dd146 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">2048</mem_size>
<gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">virtio-console(hvc0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Disable</vuart0>
<poweroff_channel desc="the method of power off uos" readonly="true">
--pm_notify_channel power_button \
</poweroff_channel>
@@ -30,6 +30,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX].">LaaG</network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">/home/clear/uos/uos.img</block>
+ <console desc="virtio console device">@stdio:stdio_port</console>
</virtio_devices>
</uos>
</acrn-config>
diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml
index db96aadb0bf7..c8ec476c7c3a 100644
--- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml
@@ -5,7 +5,7 @@
<mem_size desc="UOS memory size in MByte">128</mem_size>
<gvt_args desc="GVT argument for the vm"></gvt_args>
<vbootloader desc="virtual bootloader method" readonly="true">ovmf</vbootloader>
- <console_type desc="UOS console type">com1(ttyS0)</console_type>
+ <vuart0 desc="vUART0 which emulated by device model">Enable</vuart0>
<usb_xhci desc="USB xHCI mediator configuration. input format: bus#-port#[:bus#-port#: ...]. e.g.: 1-2:2-4"></usb_xhci>

<passthrough_devices>
@@ -27,6 +27,7 @@
<network desc="virtio network devices setting. Input format: tap_name,[vhost],[mac=XX:XX:XX:XX:XX:XX]."></network>
<input desc="virtio input device"></input>
<block desc="virtio block device setting. format: [blk partition:][img path] e.g.: /dev/sda3:./a/b.img">./zephyr.img</block>
+ <console desc="virtio console device">@pty:pty_port</console>
</virtio_devices>
</uos>
</acrn-config>
--
2.20.1


[PATCH 1/6] acrn-config: add virtio-net mediator support for launch config

Liu, WeiX W
 

Add virtio-net mediator support to parse and get 'virtio-network' item value
from launch config files, these values are editable by user.

Tracked-On: #4186
Signed-off-by: Wei Liu <weix.w.liu@...>
---
misc/acrn-config/launch_config/com.py | 14 +++++++-------
misc/acrn-config/launch_config/launch_cfg_gen.py | 2 +-
misc/acrn-config/launch_config/launch_item.py | 5 +++--
misc/acrn-config/library/launch_cfg_lib.py | 7 +------
4 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/misc/acrn-config/launch_config/com.py b/misc/acrn-config/launch_config/com.py
index 3f789f10fab8..0fcf58f62780 100644
--- a/misc/acrn-config/launch_config/com.py
+++ b/misc/acrn-config/launch_config/com.py
@@ -465,6 +465,12 @@ def virtio_args_set(dm, virt_io, vmid, config):
net_name = net.split(',')[0]
print(" -s {},virtio-net,{} \\".format(launch_cfg_lib.virtual_dev_slot("virtio-net{}".format(net)), net_name), file=config)

+ # virtio-console set, the value type is a string
+ if virt_io['console'][vmid]:
+ print(" -s {},virtio-console,{} \\".format(
+ launch_cfg_lib.virtual_dev_slot("virtio-console"),
+ virt_io['console'][vmid]), file=config)
+

def dm_arg_set(names, sel, virt_io, dm, vmid, config):

@@ -545,15 +551,9 @@ def dm_arg_set(names, sel, virt_io, dm, vmid, config):
vboot_arg_set(dm, vmid, config)

# redirect console
- if dm['console_type'][vmid] == "com1(ttyS0)":
+ if dm['vuart0'][vmid] == "Enable":
print(" -s 1:0,lpc \\", file=config)
print(" -l com1,stdio \\", file=config)
- print(" -s {},{} \\".format(launch_cfg_lib.virtual_dev_slot("com1(ttyS0)"),
- launch_cfg_lib.RE_CONSOLE_MAP['com1(ttyS0)']), file=config)
- else:
- print(" -s {},{} \\".format(
- launch_cfg_lib.virtual_dev_slot("virtio-console(hvc0)"),
- launch_cfg_lib.RE_CONSOLE_MAP['virtio-console(hvc0)']), file=config)

if uos_type in ("CLEARLINUX", "ANDROID", "ALIOS"):
print(" -s {},virtio-hyper_dmabuf \\".format(launch_cfg_lib.virtual_dev_slot("virtio-hyper_dmabuf")), file=config)
diff --git a/misc/acrn-config/launch_config/launch_cfg_gen.py b/misc/acrn-config/launch_config/launch_cfg_gen.py
index d1ee1af64b0d..f71ed5743ee5 100644
--- a/misc/acrn-config/launch_config/launch_cfg_gen.py
+++ b/misc/acrn-config/launch_config/launch_cfg_gen.py
@@ -45,7 +45,7 @@ def get_launch_item_values(board_info):
launch_item_values["uos,rtos_type"] = launch_cfg_lib.RTOS_TYPE

launch_item_values["uos,vbootloader"] = launch_cfg_lib.BOOT_TYPE
- launch_item_values['uos,console_type'] = launch_cfg_lib.REDIRECT_CONSOLE
+ launch_item_values['uos,vuart0'] = launch_cfg_lib.DM_VUART0
launch_item_values['uos,gvt_args'] = launch_cfg_lib.GVT_ARGS

return launch_item_values
diff --git a/misc/acrn-config/launch_config/launch_item.py b/misc/acrn-config/launch_config/launch_item.py
index aa2fc1d74b57..6d428eee13c3 100644
--- a/misc/acrn-config/launch_config/launch_item.py
+++ b/misc/acrn-config/launch_config/launch_item.py
@@ -19,7 +19,7 @@ class AcrnDmArgs:
self.args["mem_size"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "mem_size")
self.args["gvt_args"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "gvt_args")
self.args["vbootloader"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "vbootloader")
- self.args["console_type"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "console_type")
+ self.args["vuart0"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "vuart0")
self.args["off_pcpus"] = launch_cfg_lib.get_leaf_tag_map(self.scenario_info, "vcpu_affinity", "pcpu_id")
self.args["xhci"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "usb_xhci")

@@ -30,7 +30,7 @@ class AcrnDmArgs:
launch_cfg_lib.mem_size_check(self.args["mem_size"], "mem_size")
launch_cfg_lib.args_aval_check(self.args["gvt_args"], "gvt_args", launch_cfg_lib.GVT_ARGS)
launch_cfg_lib.args_aval_check(self.args["vbootloader"], "vbootloader", launch_cfg_lib.BOOT_TYPE)
- launch_cfg_lib.args_aval_check(self.args["console_type"], "console_type", launch_cfg_lib.REDIRECT_CONSOLE)
+ launch_cfg_lib.args_aval_check(self.args["vuart0"], "vuart0", launch_cfg_lib.DM_VUART0)


class AvailablePthru():
@@ -152,3 +152,4 @@ class VirtioDeviceSelect():
self.dev["input"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "virtio_devices", "input")
self.dev["block"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "virtio_devices", "block")
self.dev["network"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "virtio_devices", "network")
+ self.dev["console"] = launch_cfg_lib.get_leaf_tag_map(self.launch_info, "virtio_devices", "console")
diff --git a/misc/acrn-config/library/launch_cfg_lib.py b/misc/acrn-config/library/launch_cfg_lib.py
index 73c9d184bf10..9c1070b8443f 100644
--- a/misc/acrn-config/library/launch_cfg_lib.py
+++ b/misc/acrn-config/library/launch_cfg_lib.py
@@ -15,15 +15,10 @@ LAUNCH_INFO_FILE = ""
ERR_LIST = {}
BOOT_TYPE = ['no', 'vsbl', 'ovmf']
RTOS_TYPE = ['no', 'Soft RT', 'Hard RT']
-REDIRECT_CONSOLE = ['com1(ttyS0)', 'virtio-console(hvc0)']
+DM_VUART0 = ['Disable', 'Enable']
UOS_TYPES = ['CLEARLINUX', 'ANDROID', 'ALIOS', 'PREEMPT-RT LINUX', 'VXWORKS', 'WINDOWS', 'ZEPHYR', 'GENERIC LINUX']
GVT_ARGS = ['64 448 8']

-RE_CONSOLE_MAP = {
- "com1(ttyS0)":"virtio-console,@pty:pty_port",
- "virtio-console(hvc0)":"virtio-console,@stdio:stdio_port"
-}
-
PT_SUB_PCI = {}
PT_SUB_PCI['usb_xdci'] = ['USB controller']
PT_SUB_PCI['ipu'] = ['Multimedia controller']
--
2.20.1


[PATCH 0/6]acrn-config: add virtio-console and pm_channel to

Liu, WeiX W
 

1.Add virtio-net mediator support to parse and get 'virtio-network' item value
from launch config files, these values are editable by user.

2.Some vm need mediator of 'virtio-console', so add 'console' item
into the launch config files that user could edit them from webUI.

3.In some vms do not have to use gvt_args or need specify configuration
for 'gvt_args' tag.
The patch Supply the capability to edit 'gvt_args' item from webUI.

4. Some vm need power off method, so modify 'poweroff_channel'
item in the launch config files that user could select them from webUI.

5.Add pm_channel support to parse and get 'poweroff_channel' item value
from launch config files, these values are selectable by user.

6. unify get_vuart_info_id/get_vuart_id api in board/scenario/launch
config tool.


Wei Liu (6):
acrn-config: add virtio-net mediator support for launch config
acrn-config: add 'virtio-console' info in launch xmls
acrn-config: supply the capability to edit 'gvt_args' from webUI
acrn-config: modify 'poweroff_channel' info in launch xmls
acrn-config: add 'poweroff_channel' support for launch config
acrn-config: unify get_vuart_info_id api in config tool

misc/acrn-config/board_config/misc_cfg_h.py | 17 ++-----
misc/acrn-config/launch_config/com.py | 45 +++++++++--------
.../launch_config/launch_cfg_gen.py | 4 +-
misc/acrn-config/launch_config/launch_item.py | 7 +--
misc/acrn-config/library/board_cfg_lib.py | 42 +---------------
misc/acrn-config/library/common.py | 50 +++++++++++++++++++
misc/acrn-config/library/launch_cfg_lib.py | 24 ++++++---
misc/acrn-config/library/scenario_cfg_lib.py | 42 +---------------
.../apl-mrb/sdc_launch_1uos_aaag.xml | 7 ++-
.../apl-mrb/sdc_launch_1uos_aliaag.xml | 7 ++-
.../apl-mrb/sdc_launch_1uos_laag.xml | 7 ++-
.../apl-up2-n3350/sdc_launch_1uos_laag.xml | 7 ++-
.../apl-up2/sdc_launch_1uos_aaag.xml | 7 ++-
.../apl-up2/sdc_launch_1uos_laag.xml | 7 ++-
.../generic/hybrid_launch_1uos.xml | 6 +--
.../generic/industry_launch_1uos.xml | 6 +--
.../generic/industry_launch_2uos.xml | 12 ++---
.../config-xmls/generic/sdc_launch_1uos.xml | 6 +--
.../nuc6cayh/industry_launch_1uos_hardrt.xml | 4 +-
.../nuc6cayh/industry_launch_1uos_vxworks.xml | 4 +-
.../nuc6cayh/industry_launch_1uos_waag.xml | 4 +-
.../nuc6cayh/industry_launch_2uos.xml | 8 ++-
.../nuc6cayh/sdc_launch_1uos_laag.xml | 7 ++-
.../nuc6cayh/sdc_launch_1uos_zephyr.xml | 4 +-
.../nuc7i7dnb/industry_launch_1uos_hardrt.xml | 4 +-
.../industry_launch_1uos_vxworks.xml | 4 +-
.../nuc7i7dnb/industry_launch_1uos_waag.xml | 4 +-
.../nuc7i7dnb/industry_launch_2uos.xml | 8 ++-
.../nuc7i7dnb/sdc_launch_1uos_laag.xml | 7 ++-
.../nuc7i7dnb/sdc_launch_1uos_zephyr.xml | 4 +-
.../industry_launch_1uos_hardrt.xml | 4 +-
.../industry_launch_1uos_vxworks.xml | 4 +-
.../whl-ipc-i5/industry_launch_1uos_waag.xml | 4 +-
.../whl-ipc-i5/industry_launch_2uos.xml | 8 ++-
.../whl-ipc-i5/sdc_launch_1uos_laag.xml | 7 ++-
.../whl-ipc-i5/sdc_launch_1uos_zephyr.xml | 4 +-
.../industry_launch_1uos_hardrt.xml | 4 +-
.../industry_launch_1uos_vxworks.xml | 4 +-
.../whl-ipc-i7/industry_launch_1uos_waag.xml | 4 +-
.../whl-ipc-i7/industry_launch_2uos.xml | 8 ++-
.../whl-ipc-i7/sdc_launch_1uos_laag.xml | 7 ++-
.../whl-ipc-i7/sdc_launch_1uos_zephyr.xml | 4 +-
42 files changed, 220 insertions(+), 207 deletions(-)

--
2.20.1


[PATCH 2/2] HV: Kconfig: remove MAX_VCPUS_PER_VM in Kconfig

Victor Sun
 

In current architecutre, the maximum vCPUs number per VM could not exceed
the pCPUs number. Given the CONFIG_MAX_PCPU_NUM macro is provided in board
configurations, so remove the MAX_VCPUS_PER_VM from Kconfig and add a macro
for CONFIG_MAX_VCPUS_PER_VM to reference CONFIG_MAX_PCPU_NUM directly.

Signed-off-by: Victor Sun <victor.sun@...>
---
hypervisor/arch/x86/Kconfig | 8 --------
hypervisor/include/arch/x86/vm_config.h | 2 ++
hypervisor/include/debug/profiling_internal.h | 1 +
3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/hypervisor/arch/x86/Kconfig b/hypervisor/arch/x86/Kconfig
index 8a3eb75..1d961e5 100644
--- a/hypervisor/arch/x86/Kconfig
+++ b/hypervisor/arch/x86/Kconfig
@@ -55,14 +55,6 @@ config RELEASE
console and hypervisor shell are available only in non-release
(i.e. debug) builds. Assertions are not effective in release builds.

-config MAX_VCPUS_PER_VM
- int "Maximum number of VCPUs per VM"
- range 1 48
- default 8
- help
- The maximum number of virtual CPUs the hypervisor can support in a
- single VM.
-
config MAX_EMULATED_MMIO_REGIONS
int "Maximum number of emulated MMIO regions"
range 0 128
diff --git a/hypervisor/include/arch/x86/vm_config.h b/hypervisor/include/arch/x86/vm_config.h
index f4a0672..798d891 100644
--- a/hypervisor/include/arch/x86/vm_config.h
+++ b/hypervisor/include/arch/x86/vm_config.h
@@ -14,6 +14,8 @@
#include <vm_configurations.h>
#include <sgx.h>

+#define CONFIG_MAX_VCPUS_PER_VM CONFIG_MAX_PCPU_NUM
+
#define AFFINITY_CPU(n) (1U << (n))
#define MAX_VUART_NUM_PER_VM 2U
#define MAX_VM_OS_NAME_LEN 32U
diff --git a/hypervisor/include/debug/profiling_internal.h b/hypervisor/include/debug/profiling_internal.h
index f90184b..218cd5a 100644
--- a/hypervisor/include/debug/profiling_internal.h
+++ b/hypervisor/include/debug/profiling_internal.h
@@ -10,6 +10,7 @@
#ifdef PROFILING_ON

#include <vcpu.h>
+#include <vm_config.h>
#include <vm_configurations.h>

#define MAX_MSR_LIST_NUM 15U
--
2.7.4


[PATCH 1/2] HV: Kconfig: set default Kata num to 1 in SDC

Victor Sun
 

Set default CONFIG_KATA_VM_NUM to 1 in SDC scenario to improve
user experience.

Please be aware that vcpu affinity of VM1 in CPU partition mode
would be impacted by this patch.

Signed-off-by: Victor Sun <victor.sun@...>
---
hypervisor/arch/x86/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hypervisor/arch/x86/Kconfig b/hypervisor/arch/x86/Kconfig
index e5d9332..8a3eb75 100644
--- a/hypervisor/arch/x86/Kconfig
+++ b/hypervisor/arch/x86/Kconfig
@@ -295,7 +295,8 @@ config L1D_FLUSH_VMENTRY_ENABLED
config MAX_KATA_VM_NUM
int "Maximum number of Kata Containers in SOS"
range 0 1
- default 0
+ default 1 if SDC
+ default 0 if !SDC

config UEFI_OS_LOADER_NAME
string "UEFI OS loader name"
--
2.7.4


Re: [PATCH 0/7] Use NMI to nofity vCPUs with lapic-pt

Kaige Fu
 

Hi Sainath,

-----Original Message-----
From: acrn-dev@... <acrn-dev@...> On
Behalf Of Kaige Fu
Sent: Sunday, December 8, 2019 7:39 PM
To: acrn-dev@...
Subject: Re: [acrn-dev] [PATCH 0/7] Use NMI to nofity vCPUs with lapic-pt

Hi Sainath,

Thanks for your review. Comment inline.

-----Original Message-----
From: acrn-dev@... <acrn-dev@...>
On Behalf Of Grandhi, Sainath
Sent: Friday, December 6, 2019 2:22 PM
To: acrn-dev@...
Subject: Re: [acrn-dev] [PATCH 0/7] Use NMI to nofity vCPUs with
lapic-pt



-----Original Message-----
From: acrn-dev@...
<acrn-dev@...> On Behalf Of Kaige Fu
Sent: Friday, December 06, 2019 5:48 AM
To: acrn-dev@...
Subject: [acrn-dev] [PATCH 0/7] Use NMI to nofity vCPUs with
lapic-pt

ACRN hypervisor needs to kick vCPU off VMX non-root mode to do some
operations in hypervisor, such as interrupt/exception injection, EPT
flush etc. For non lapic-pt vCPUs, we can use IPI to do so. But, it
doesn't work for lapic-pt vCPUs as the IPI will be injected to VMs
directly
without vmexit.

Consequently, there may be fatal errors triggered. 1). Certain
operation may not be carried out on time which may further lead to
fatal errors. Taking the EPT flush request as an example, once we
don't flush the EPT on time and the guest access the out-of-date
EPT, fatal error happens. 2). The IPI vector will be delivered to
VMs directly. If the guest can't handle it properly, further
interrupts might be
blocked which will cause the VMs hang.

The NMI can be used as the notification signal to kick the vCPU off
VMX non- root mode for lapic-pt vCPUs. This patchset does it by
enable NMI-exiting after passthroughing the lapic to vCPU.

TODOs:
- Filter out all NMI sources:
* Write ICR with deliver mode NMI
* Program the MSI data with deliver mode NMI
* Program the LVTs with deliver mode NMI
- Implement the smp_call for lapic-pt VMs to facilitate the debug
of lapic-pt VMs.

Kaige Fu (7):
HV: Push NMI vector on to the exception stack
HV: Add helper function send_single_nmi
HV: Use NMI to kick lapic-pt vCPU's thread
HV: ignore the NMI injection request for lapic-pt vCPUs
HV: Use NMI-window exiting to address req missing issue
Hi Kaige,
This patch " Use NMI-window exiting to address req missing issue"
has nothing to do LAPIC PT and "NMI being used for notification". Is that
right?

When we use the NMI signal to kick the vCPU thread, there is such kind of
issue that we may miss the request in current notification period. In this way,
this patch has something to do with LAPIC PT and "NMI being used for
notification".

However, there may be the same issue when we use IPI for non lapic-pt VMs
to kick the vCPU thread.
I will investigate it and see if there is such kind of issue in current code.
I checked the current code. There is no such kind of issue for non lapic-pt VMs.
For non lapic-pt VMs, we use IPI to notify vCPU thread and the interrupts is disabled
between acrn_handle_pending_request and vmentry.

HV: Use NMI to replace INIT signal for lapic-pt VMs S5
HV: Remove INIT signal notification related code

hypervisor/arch/x86/guest/virq.c | 76 ++++++++++++++++++++--------
hypervisor/arch/x86/guest/vmcs.c | 18 +++++--
hypervisor/arch/x86/guest/vmexit.c | 23 +--------
hypervisor/arch/x86/idt.S | 6 +--
hypervisor/arch/x86/irq.c | 55 ++++++++++++++++----
hypervisor/arch/x86/lapic.c | 9 +---
hypervisor/common/schedule.c | 24 ++++++---
hypervisor/include/arch/x86/irq.h | 1 +
hypervisor/include/arch/x86/lapic.h | 4 +-
hypervisor/include/common/schedule.h | 4 +-
10 files changed, 146 insertions(+), 74 deletions(-)

--
2.20.0





Re: [PATCH 0/7] Use NMI to nofity vCPUs with lapic-pt

Kaige Fu
 

Hi Sainath,

Thanks for your review. Comment inline.

-----Original Message-----
From: acrn-dev@... <acrn-dev@...> On
Behalf Of Grandhi, Sainath
Sent: Friday, December 6, 2019 2:22 PM
To: acrn-dev@...
Subject: Re: [acrn-dev] [PATCH 0/7] Use NMI to nofity vCPUs with lapic-pt



-----Original Message-----
From: acrn-dev@... <acrn-dev@...>
On Behalf Of Kaige Fu
Sent: Friday, December 06, 2019 5:48 AM
To: acrn-dev@...
Subject: [acrn-dev] [PATCH 0/7] Use NMI to nofity vCPUs with lapic-pt

ACRN hypervisor needs to kick vCPU off VMX non-root mode to do some
operations in hypervisor, such as interrupt/exception injection, EPT
flush etc. For non lapic-pt vCPUs, we can use IPI to do so. But, it
doesn't work for lapic-pt vCPUs as the IPI will be injected to VMs directly
without vmexit.

Consequently, there may be fatal errors triggered. 1). Certain
operation may not be carried out on time which may further lead to
fatal errors. Taking the EPT flush request as an example, once we
don't flush the EPT on time and the guest access the out-of-date EPT,
fatal error happens. 2). The IPI vector will be delivered to VMs
directly. If the guest can't handle it properly, further interrupts might be
blocked which will cause the VMs hang.

The NMI can be used as the notification signal to kick the vCPU off
VMX non- root mode for lapic-pt vCPUs. This patchset does it by enable
NMI-exiting after passthroughing the lapic to vCPU.

TODOs:
- Filter out all NMI sources:
* Write ICR with deliver mode NMI
* Program the MSI data with deliver mode NMI
* Program the LVTs with deliver mode NMI
- Implement the smp_call for lapic-pt VMs to facilitate the debug
of lapic-pt VMs.

Kaige Fu (7):
HV: Push NMI vector on to the exception stack
HV: Add helper function send_single_nmi
HV: Use NMI to kick lapic-pt vCPU's thread
HV: ignore the NMI injection request for lapic-pt vCPUs
HV: Use NMI-window exiting to address req missing issue
Hi Kaige,
This patch " Use NMI-window exiting to address req missing issue"
has nothing to do LAPIC PT and "NMI being used for notification". Is that right?
When we use the NMI signal to kick the vCPU thread, there is such kind of issue that
we may miss the request in current notification period. In this way, this patch has something
to do with LAPIC PT and "NMI being used for notification".

However, there may be the same issue when we use IPI for non lapic-pt VMs to kick the vCPU thread.
I will investigate it and see if there is such kind of issue in current code.

HV: Use NMI to replace INIT signal for lapic-pt VMs S5
HV: Remove INIT signal notification related code

hypervisor/arch/x86/guest/virq.c | 76 ++++++++++++++++++++--------
hypervisor/arch/x86/guest/vmcs.c | 18 +++++--
hypervisor/arch/x86/guest/vmexit.c | 23 +--------
hypervisor/arch/x86/idt.S | 6 +--
hypervisor/arch/x86/irq.c | 55 ++++++++++++++++----
hypervisor/arch/x86/lapic.c | 9 +---
hypervisor/common/schedule.c | 24 ++++++---
hypervisor/include/arch/x86/irq.h | 1 +
hypervisor/include/arch/x86/lapic.h | 4 +-
hypervisor/include/common/schedule.h | 4 +-
10 files changed, 146 insertions(+), 74 deletions(-)

--
2.20.0




Re: [PATCH] HV: Kconfig changes to support server platform.

Xu, Anthony
 

Acked-by: Anthony Xu <anthony.xu@...>

Please PR

-----Original Message-----
From: acrn-dev@... [mailto:acrn-dev@...] On Behalf Of Vijay Dhanraj
Sent: Thursday, December 5, 2019 4:19 PM
To: acrn-dev@...
Cc: Dhanraj, Vijay <vijay.dhanraj@...>
Subject: [acrn-dev] [PATCH] HV: Kconfig changes to support server platform.

This patch updates kconfig to support server platforms
for increased number of VCPUs per VM and PT IRQ number.

Signed-off-by: Vijay Dhanraj <vijay.dhanraj@...>
Tracked-On: #4196
---
hypervisor/arch/x86/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hypervisor/arch/x86/Kconfig b/hypervisor/arch/x86/Kconfig
index 84bc7a0e..e5d93322 100644
--- a/hypervisor/arch/x86/Kconfig
+++ b/hypervisor/arch/x86/Kconfig
@@ -57,7 +57,7 @@ config RELEASE

config MAX_VCPUS_PER_VM
int "Maximum number of VCPUs per VM"
- range 1 8
+ range 1 48
default 8
help
The maximum number of virtual CPUs the hypervisor can support in a
@@ -70,7 +70,7 @@ config MAX_EMULATED_MMIO_REGIONS

config MAX_PT_IRQ_ENTRIES
int "Maximum number of interrupt source for PT devices"
- range 0 128
+ range 0 256
default 64

config STACK_SIZE
--
2.17.2



Re: [PATCH 0/2]Non-contiguous HPA support for logical

Vijay Dhanraj
 

Hi Victor,

Regarding, "When start_hpa2 is initialized in prelaunched VM, we should filter the memory from SOS e820 when do create_sos_vm_e820()."

Yes, you are correct for hybrid scenario. But since I didn’t expose the start_hpa2 in the generic/hybrid.xml file, the user wouldn’t be able to see or configure hpa2. So I think there shouldn’t be an issue. Will add the changes for hybrid scenario and hpa2 and send another patch.

Thanks,
-Vijay

-----Original Message-----
From: Sun, Victor <victor.sun@...>
Sent: Friday, December 06, 2019 8:04 AM
To: acrn-dev@...
Cc: Dhanraj, Vijay <vijay.dhanraj@...>
Subject: Re: [acrn-dev] [PATCH 0/2]Non-contiguous HPA support for logical

Let user input start_hpa2 looks not friendly(of course also for start_hpa ), can we calculate start_hpa2 automatically according to native e820 layout?

When start_hpa2 is initialized in prelaunched VM, we should filter the memory from SOS e820 when do create_sos_vm_e820().

BR,

Victor

On 12/6/2019 6:26 AM, Vijay Dhanraj wrote:
On some platforms, HPA regions for Virtual Machine can not be
contiguous because of E820 reserved type or PCI hole. In such cases,
pre-launched VMs need to be assigned non-contiguous memory regions and
this patch series addresses it.

Vijay Dhanraj (2):
HV: Add support to assign non-contiguous HPA regions for pre-launched
VM
acrn-config: support non-contiguous HPA for pre-launched VM

hypervisor/arch/x86/guest/vm.c | 18 +-
hypervisor/include/arch/x86/vm_config.h | 2 +
misc/acrn-config/board_config/ve820_c.py | 191 ++++++++++++------
.../scenario_config/scenario_item.py | 8 +
.../scenario_config/vm_configurations_c.py | 4 +
.../scenario_config/vm_configurations_h.py | 11 +-
.../config-xmls/generic/logical_partition.xml | 6 +-
7 files changed, 173 insertions(+), 67 deletions(-)


Re: [PATCH 0/2]Non-contiguous HPA support for logical

Vijay Dhanraj
 

Yes the patch doesn’t enforce the user to input start_HPA2. If user doesn’t input it will default to 0x0.

Thanks,
-Vijay

-----Original Message-----
From: Xu, Anthony <anthony.xu@...>
Sent: Friday, December 06, 2019 9:55 AM
To: acrn-dev@...
Cc: Dhanraj, Vijay <vijay.dhanraj@...>
Subject: RE: [acrn-dev] [PATCH 0/2]Non-contiguous HPA support for logical

Start_hpa2 should be optional, don't force user input start_hpa2.
Eventually configuration tool should take care of start_hpa2.
I'm with this solution before the tool is ready.

Anthony

-----Original Message-----
From: acrn-dev@...
[mailto:acrn-dev@...] On Behalf Of Victor Sun
Sent: Friday, December 6, 2019 8:04 AM
To: acrn-dev@...
Cc: Dhanraj, Vijay <vijay.dhanraj@...>
Subject: Re: [acrn-dev] [PATCH 0/2]Non-contiguous HPA support for
logical

Let user input start_hpa2 looks not friendly(of course also for
start_hpa ), can we calculate start_hpa2 automatically according to
native e820 layout?

When start_hpa2 is initialized in prelaunched VM, we should filter the
memory from SOS e820 when do create_sos_vm_e820().

BR,

Victor

On 12/6/2019 6:26 AM, Vijay Dhanraj wrote:
On some platforms, HPA regions for Virtual Machine can not be
contiguous because of E820 reserved type or PCI hole. In such cases,
pre-launched VMs need to be assigned non-contiguous memory regions
and this patch series addresses it.

Vijay Dhanraj (2):
HV: Add support to assign non-contiguous HPA regions for pre-launched
VM
acrn-config: support non-contiguous HPA for pre-launched VM

hypervisor/arch/x86/guest/vm.c | 18 +-
hypervisor/include/arch/x86/vm_config.h | 2 +
misc/acrn-config/board_config/ve820_c.py | 191 ++++++++++++------
.../scenario_config/scenario_item.py | 8 +
.../scenario_config/vm_configurations_c.py | 4 +
.../scenario_config/vm_configurations_h.py | 11 +-
.../config-xmls/generic/logical_partition.xml | 6 +-
7 files changed, 173 insertions(+), 67 deletions(-)


Re: [PATCH 0/2]Non-contiguous HPA support for logical

Xu, Anthony
 

Acked-by: Anthony Xu <anthony.xu@...>

Anthony

-----Original Message-----
From: acrn-dev@... [mailto:acrn-dev@...] On Behalf Of Vijay Dhanraj
Sent: Thursday, December 5, 2019 2:26 PM
To: acrn-dev@...
Cc: Dhanraj, Vijay <vijay.dhanraj@...>
Subject: [acrn-dev] [PATCH 0/2]Non-contiguous HPA support for logical

On some platforms, HPA regions for Virtual Machine can not be
contiguous because of E820 reserved type or PCI hole. In such
cases, pre-launched VMs need to be assigned non-contiguous memory
regions and this patch series addresses it.

Vijay Dhanraj (2):
HV: Add support to assign non-contiguous HPA regions for pre-launched
VM
acrn-config: support non-contiguous HPA for pre-launched VM

hypervisor/arch/x86/guest/vm.c | 18 +-
hypervisor/include/arch/x86/vm_config.h | 2 +
misc/acrn-config/board_config/ve820_c.py | 191 ++++++++++++------
.../scenario_config/scenario_item.py | 8 +
.../scenario_config/vm_configurations_c.py | 4 +
.../scenario_config/vm_configurations_h.py | 11 +-
.../config-xmls/generic/logical_partition.xml | 6 +-
7 files changed, 173 insertions(+), 67 deletions(-)

--
2.17.2



Re: [PATCH 0/2]Non-contiguous HPA support for logical

Xu, Anthony
 

Start_hpa2 should be optional, don't force user input start_hpa2.
Eventually configuration tool should take care of start_hpa2.
I'm with this solution before the tool is ready.

Anthony

-----Original Message-----
From: acrn-dev@... [mailto:acrn-dev@...] On Behalf Of Victor Sun
Sent: Friday, December 6, 2019 8:04 AM
To: acrn-dev@...
Cc: Dhanraj, Vijay <vijay.dhanraj@...>
Subject: Re: [acrn-dev] [PATCH 0/2]Non-contiguous HPA support for logical

Let user input start_hpa2 looks not friendly(of course also for
start_hpa ), can we calculate start_hpa2 automatically according to
native e820 layout?

When start_hpa2 is initialized in prelaunched VM, we should filter the
memory from SOS e820 when do create_sos_vm_e820().

BR,

Victor

On 12/6/2019 6:26 AM, Vijay Dhanraj wrote:
On some platforms, HPA regions for Virtual Machine can not be
contiguous because of E820 reserved type or PCI hole. In such
cases, pre-launched VMs need to be assigned non-contiguous memory
regions and this patch series addresses it.

Vijay Dhanraj (2):
HV: Add support to assign non-contiguous HPA regions for pre-launched
VM
acrn-config: support non-contiguous HPA for pre-launched VM

hypervisor/arch/x86/guest/vm.c | 18 +-
hypervisor/include/arch/x86/vm_config.h | 2 +
misc/acrn-config/board_config/ve820_c.py | 191 ++++++++++++------
.../scenario_config/scenario_item.py | 8 +
.../scenario_config/vm_configurations_c.py | 4 +
.../scenario_config/vm_configurations_h.py | 11 +-
.../config-xmls/generic/logical_partition.xml | 6 +-
7 files changed, 173 insertions(+), 67 deletions(-)

11141 - 11160 of 37094