Date   

[PATCH v5 5/5] HV: Remove INIT signal notification related code

Kaige Fu
 

We don't use INIT signal notification method now. This patch
removes them.

Signed-off-by: Kaige Fu <kaige.fu@...>
---
hypervisor/arch/x86/guest/vmexit.c | 21 +--------------------
hypervisor/arch/x86/lapic.c | 20 --------------------
hypervisor/common/schedule.c | 5 +----
hypervisor/include/arch/x86/lapic.h | 9 ---------
hypervisor/include/common/schedule.h | 4 +---
5 files changed, 3 insertions(+), 56 deletions(-)

diff --git a/hypervisor/arch/x86/guest/vmexit.c b/hypervisor/arch/x86/guest/vmexit.c
index 0f09741c..9c25f2f9 100644
--- a/hypervisor/arch/x86/guest/vmexit.c
+++ b/hypervisor/arch/x86/guest/vmexit.c
@@ -30,7 +30,6 @@ static int32_t unhandled_vmexit_handler(struct acrn_vcpu *vcpu);
static int32_t xsetbv_vmexit_handler(struct acrn_vcpu *vcpu);
static int32_t wbinvd_vmexit_handler(struct acrn_vcpu *vcpu);
static int32_t undefined_vmexit_handler(struct acrn_vcpu *vcpu);
-static int32_t init_signal_vmexit_handler(__unused struct acrn_vcpu *vcpu);

/* VM Dispatch table for Exit condition handling */
static const struct vm_exit_dispatch dispatch_table[NR_VMX_EXIT_REASONS] = {
@@ -41,7 +40,7 @@ static const struct vm_exit_dispatch dispatch_table[NR_VMX_EXIT_REASONS] = {
[VMX_EXIT_REASON_TRIPLE_FAULT] = {
.handler = triple_fault_vmexit_handler},
[VMX_EXIT_REASON_INIT_SIGNAL] = {
- .handler = init_signal_vmexit_handler},
+ .handler = undefined_vmexit_handler},
[VMX_EXIT_REASON_STARTUP_IPI] = {
.handler = unhandled_vmexit_handler},
[VMX_EXIT_REASON_IO_SMI] = {
@@ -377,21 +376,3 @@ static int32_t undefined_vmexit_handler(struct acrn_vcpu *vcpu)
vcpu_inject_ud(vcpu);
return 0;
}
-
-/*
- * This handler is only triggered by INIT signal when poweroff from inside of RTVM
- */
-static int32_t init_signal_vmexit_handler(__unused struct acrn_vcpu *vcpu)
-{
- /*
- * Intel SDM Volume 3, 25.2:
- * INIT signals. INIT signals cause VM exits. A logical processer performs none
- * of the operations normally associated with these events. Such exits do not modify
- * register state or clear pending events as they would outside of VMX operation (If
- * a logical processor is the wait-for-SIPI state, INIT signals are blocked. They do
- * not cause VM exits in this case).
- *
- * So, it is safe to ignore the signal and reture here.
- */
- return 0;
-}
diff --git a/hypervisor/arch/x86/lapic.c b/hypervisor/arch/x86/lapic.c
index 732036ec..bf680f84 100644
--- a/hypervisor/arch/x86/lapic.c
+++ b/hypervisor/arch/x86/lapic.c
@@ -274,26 +274,6 @@ void send_single_ipi(uint16_t pcpu_id, uint32_t vector)
*
* @return None
*/
-void send_single_init(uint16_t pcpu_id)
-{
- union apic_icr icr;
-
- /*
- * Intel SDM Vol3 23.8:
- * The INIT signal is blocked whenever a logical processor is in VMX root operation.
- * It is not blocked in VMX nonroot operation. Instead, INITs cause VM exits
- */
- icr.value_32.hi_32 = per_cpu(lapic_id, pcpu_id);
- icr.value_32.lo_32 = (INTR_LAPIC_ICR_PHYSICAL << 11U) | (INTR_LAPIC_ICR_INIT << 8U);
-
- 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;
diff --git a/hypervisor/common/schedule.c b/hypervisor/common/schedule.c
index 73a6eda0..3ce6a411 100644
--- a/hypervisor/common/schedule.c
+++ b/hypervisor/common/schedule.c
@@ -123,7 +123,7 @@ struct thread_object *sched_get_current(uint16_t pcpu_id)
}

/**
- * @pre delmode == DEL_MODE_IPI || delmode == DEL_MODE_INIT || delmode == DEL_MODE_NMI
+ * @pre delmode == DEL_MODE_IPI || delmode == DEL_MODE_NMI
*/
void make_reschedule_request(uint16_t pcpu_id, uint16_t delmode)
{
@@ -135,9 +135,6 @@ void make_reschedule_request(uint16_t pcpu_id, uint16_t delmode)
case DEL_MODE_IPI:
send_single_ipi(pcpu_id, VECTOR_NOTIFY_VCPU);
break;
- case DEL_MODE_INIT:
- send_single_init(pcpu_id);
- break;
case DEL_MODE_NMI:
send_single_nmi(pcpu_id);
break;
diff --git a/hypervisor/include/arch/x86/lapic.h b/hypervisor/include/arch/x86/lapic.h
index 9b59c21d..b345ff6b 100644
--- a/hypervisor/include/arch/x86/lapic.h
+++ b/hypervisor/include/arch/x86/lapic.h
@@ -174,15 +174,6 @@ void send_single_ipi(uint16_t pcpu_id, uint32_t vector);
*/
/* End of ipi_ext_apis */

-/**
- * @brief Send an INIT signal to a single pCPU
- *
- * @param[in] pcpu_id The id of destination physical cpu
- *
- * @return None
- */
-void send_single_init(uint16_t pcpu_id);
-
/**
* @brief Send an NMI signal to a single pCPU
*
diff --git a/hypervisor/include/common/schedule.h b/hypervisor/include/common/schedule.h
index 809be686..15268658 100644
--- a/hypervisor/include/common/schedule.h
+++ b/hypervisor/include/common/schedule.h
@@ -12,9 +12,8 @@

#define NEED_RESCHEDULE (1U)

-#define DEL_MODE_INIT (1U)
+#define DEL_MODE_NMI (1U)
#define DEL_MODE_IPI (2U)
-#define DEL_MODE_NMI (3U)

#define THREAD_DATA_SIZE (256U)

@@ -25,7 +24,6 @@ enum thread_object_state {
};

enum sched_notify_mode {
- SCHED_NOTIFY_INIT,
SCHED_NOTIFY_NMI,
SCHED_NOTIFY_IPI
};
--
2.20.0


[PATCH v5 4/5] HV: Use NMI to replace INIT signal for lapic-pt VMs S5

Kaige Fu
 

We have implemented a new notification method using NMI.
So replace the INIT notification method with the NMI one.
Then we can remove INIT notification related code later.

Signed-off-by: Kaige Fu <kaige.fu@...>
---
hypervisor/arch/x86/guest/vmcs.c | 7 ++++---
hypervisor/common/schedule.c | 4 ++--
hypervisor/include/common/schedule.h | 1 +
3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/hypervisor/arch/x86/guest/vmcs.c b/hypervisor/arch/x86/guest/vmcs.c
index 7dd2d806..a125e2de 100644
--- a/hypervisor/arch/x86/guest/vmcs.c
+++ b/hypervisor/arch/x86/guest/vmcs.c
@@ -606,10 +606,11 @@ void switch_apicv_mode_x2apic(struct acrn_vcpu *vcpu)
update_msr_bitmap_x2apic_passthru(vcpu);

/*
- * After passthroughing lapic to guest, we should use INIT signal to
- * notify vcpu thread instead of IPI
+ * After passthroughing lapic to guest, we should use NMI signal to
+ * notify vcpu thread instead of IPI. Because the IPI will be delivered
+ * the guest directly without vmexit.
*/
- vcpu->thread_obj.notify_mode = SCHED_NOTIFY_INIT;
+ vcpu->thread_obj.notify_mode = SCHED_NOTIFY_NMI;
} else {
value32 = exec_vmread32(VMX_PROC_VM_EXEC_CONTROLS2);
value32 &= ~VMX_PROCBASED_CTLS2_VAPIC;
diff --git a/hypervisor/common/schedule.c b/hypervisor/common/schedule.c
index da6c785b..73a6eda0 100644
--- a/hypervisor/common/schedule.c
+++ b/hypervisor/common/schedule.c
@@ -202,8 +202,8 @@ void sleep_thread(struct thread_object *obj)
scheduler->sleep(obj);
}
if (is_running(obj)) {
- if (obj->notify_mode == SCHED_NOTIFY_INIT) {
- make_reschedule_request(pcpu_id, DEL_MODE_INIT);
+ if (obj->notify_mode == SCHED_NOTIFY_NMI) {
+ make_reschedule_request(pcpu_id, DEL_MODE_NMI);
} else {
make_reschedule_request(pcpu_id, DEL_MODE_IPI);
}
diff --git a/hypervisor/include/common/schedule.h b/hypervisor/include/common/schedule.h
index 164e3441..809be686 100644
--- a/hypervisor/include/common/schedule.h
+++ b/hypervisor/include/common/schedule.h
@@ -26,6 +26,7 @@ enum thread_object_state {

enum sched_notify_mode {
SCHED_NOTIFY_INIT,
+ SCHED_NOTIFY_NMI,
SCHED_NOTIFY_IPI
};

--
2.20.0


[PATCH v5 3/5] HV: Use NMI-window exiting to address req missing issue

Kaige Fu
 

There is a window where we may miss the current request in the
notification period when the work flow is as the following:

CPUx + + CPUr
| |
| +--+
| | | Handle pending req
| <--+
+--+ |
| | Set req flag |
<--+ |
+------------------>---+
| Send NMI | | Handle NMI
| <--+
| |
| |
| +--> vCPU enter
| |
+ +

So, this patch enables the NMI-window exiting to trigger the next vmexit
once there is no "virtual-NMI blocking" after vCPU enter into VMX non-root
mode. Then we can process the pending request on time.

Signed-off-by: Kaige Fu <kaige.fu@...>
---
hypervisor/arch/x86/guest/virq.c | 17 ++++++++++++++++
hypervisor/arch/x86/guest/vmcs.c | 2 +-
hypervisor/arch/x86/guest/vmexit.c | 2 +-
hypervisor/arch/x86/irq.c | 31 ++++++++++++++++++++++++++++--
hypervisor/include/arch/x86/irq.h | 1 +
5 files changed, 49 insertions(+), 4 deletions(-)

diff --git a/hypervisor/arch/x86/guest/virq.c b/hypervisor/arch/x86/guest/virq.c
index 8e4658e4..79210717 100644
--- a/hypervisor/arch/x86/guest/virq.c
+++ b/hypervisor/arch/x86/guest/virq.c
@@ -524,3 +524,20 @@ int32_t exception_vmexit_handler(struct acrn_vcpu *vcpu)

return status;
}
+
+int nmi_window_vmexit_handler(__unused struct acrn_vcpu *vcpu)
+{
+ uint32_t value32;
+
+ /*
+ * Disable NMI-window exiting here. We will process
+ * the pending request in acrn_handle_pending_request later
+ */
+ value32 = exec_vmread32(VMX_PROC_VM_EXEC_CONTROLS);
+ value32 &= ~VMX_PROCBASED_CTLS_NMI_WINEXIT;
+ exec_vmwrite32(VMX_PROC_VM_EXEC_CONTROLS, value32);
+
+ vcpu_retain_rip(vcpu);
+
+ return 0;
+}
diff --git a/hypervisor/arch/x86/guest/vmcs.c b/hypervisor/arch/x86/guest/vmcs.c
index 1efa37db..7dd2d806 100644
--- a/hypervisor/arch/x86/guest/vmcs.c
+++ b/hypervisor/arch/x86/guest/vmcs.c
@@ -582,7 +582,7 @@ void switch_apicv_mode_x2apic(struct acrn_vcpu *vcpu)
* directly without vmexit. So, here we enable NMI-exiting and use NMI
* as notification signal after passthroughing the lapic to vCPU.
*/
- value32 |= VMX_PINBASED_CTLS_NMI_EXIT;
+ value32 |= VMX_PINBASED_CTLS_NMI_EXIT | VMX_PINBASED_CTLS_VIRT_NMI;
exec_vmwrite32(VMX_PIN_VM_EXEC_CONTROLS, value32);

value32 = exec_vmread32(VMX_EXIT_CONTROLS);
diff --git a/hypervisor/arch/x86/guest/vmexit.c b/hypervisor/arch/x86/guest/vmexit.c
index 23528c2f..0f09741c 100644
--- a/hypervisor/arch/x86/guest/vmexit.c
+++ b/hypervisor/arch/x86/guest/vmexit.c
@@ -51,7 +51,7 @@ static const struct vm_exit_dispatch dispatch_table[NR_VMX_EXIT_REASONS] = {
[VMX_EXIT_REASON_INTERRUPT_WINDOW] = {
.handler = interrupt_window_vmexit_handler},
[VMX_EXIT_REASON_NMI_WINDOW] = {
- .handler = unhandled_vmexit_handler},
+ .handler = nmi_window_vmexit_handler},
[VMX_EXIT_REASON_TASK_SWITCH] = {
.handler = unhandled_vmexit_handler},
[VMX_EXIT_REASON_CPUID] = {
diff --git a/hypervisor/arch/x86/irq.c b/hypervisor/arch/x86/irq.c
index 158165d6..b0ba0351 100644
--- a/hypervisor/arch/x86/irq.c
+++ b/hypervisor/arch/x86/irq.c
@@ -18,6 +18,7 @@
#include <vboot.h>
#include <dump.h>
#include <logmsg.h>
+#include <vmx.h>

static spinlock_t exception_spinlock = { .head = 0U, .tail = 0U, };
static spinlock_t irq_alloc_spinlock = { .head = 0U, .tail = 0U, };
@@ -384,10 +385,36 @@ void dispatch_exception(struct intr_excp_ctx *ctx)

void handle_nmi(__unused struct intr_excp_ctx *ctx)
{
+ uint32_t value32;
+
/*
- * Just ignore the NMI here for now.
- * TODO: implement specific NMI handling function.
+ * There is a window where we may miss the current request in this
+ * notification period when the work flow is as the following:
+ *
+ * CPUx + + CPUr
+ * | |
+ * | +--+
+ * | | | Handle pending req
+ * | <--+
+ * +--+ |
+ * | | Set req flag |
+ * <--+ |
+ * +------------------>---+
+ * | Send NMI | | Handle NMI
+ * | <--+
+ * | |
+ * | |
+ * | +--> vCPU enter
+ * | |
+ * + +
+ *
+ * So, here we enable the NMI-window exiting to trigger the next vmexit
+ * once there is no "virtual-NMI blocking" after vCPU enter into VMX non-root
+ * mode. Then we can process the pending request on time.
*/
+ value32 = exec_vmread32(VMX_PROC_VM_EXEC_CONTROLS);
+ value32 |= VMX_PROCBASED_CTLS_NMI_WINEXIT;
+ exec_vmwrite32(VMX_PROC_VM_EXEC_CONTROLS, value32);
}

static void init_irq_descs(void)
diff --git a/hypervisor/include/arch/x86/irq.h b/hypervisor/include/arch/x86/irq.h
index 5673d910..42a1055f 100644
--- a/hypervisor/include/arch/x86/irq.h
+++ b/hypervisor/include/arch/x86/irq.h
@@ -209,6 +209,7 @@ void vcpu_make_request(struct acrn_vcpu *vcpu, uint16_t eventid);
* @pre vcpu != NULL
*/
int32_t exception_vmexit_handler(struct acrn_vcpu *vcpu);
+int32_t nmi_window_vmexit_handler(struct acrn_vcpu *vcpu);
int32_t interrupt_window_vmexit_handler(struct acrn_vcpu *vcpu);
int32_t external_interrupt_vmexit_handler(struct acrn_vcpu *vcpu);
int32_t acrn_handle_pending_request(struct acrn_vcpu *vcpu);
--
2.20.0


[PATCH v5 2/5] HV: Don't make NMI injection req when notifying vCPU

Kaige Fu
 

The NMI for notification should not be inject to guest. So,
this patch drops NMI injection request when we use NMI
to notify vCPUs. Meanwhile, ACRN doesn't support vNMI well
and there is no well-designed way to check if the NMI is
for notification or for guest now. So, we take all the NMIs as
notificaton NMI for hard rtvm temporarily. It means that the
hard rtvm will never receive NMI with this patch applied.

TODO: Add vNMI support.

Signed-off-by: Kaige Fu <kaige.fu@...>
---
hypervisor/arch/x86/guest/virq.c | 8 +++++++-
hypervisor/arch/x86/guest/vmexit.c | 9 +++++++--
hypervisor/arch/x86/notify.c | 24 ++++++++++++++++++++++++
hypervisor/include/arch/x86/irq.h | 2 ++
4 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/hypervisor/arch/x86/guest/virq.c b/hypervisor/arch/x86/guest/virq.c
index a0be3c3d..8e4658e4 100644
--- a/hypervisor/arch/x86/guest/virq.c
+++ b/hypervisor/arch/x86/guest/virq.c
@@ -202,7 +202,13 @@ int32_t vcpu_queue_exception(struct acrn_vcpu *vcpu, uint32_t vector_arg, uint32
} else {
arch->exception_info.error = 0U;
}
- vcpu_make_request(vcpu, ACRN_REQUEST_EXCP);
+
+ if ((vector == IDT_NMI) && is_notification_nmi_triggered(vcpu->vm)) {
+ /* This NMI is used as notification signal, we will not inject back to the guest */
+ pr_dbg("This NMI is used as notification signal. So ignore it.");
+ } else {
+ vcpu_make_request(vcpu, ACRN_REQUEST_EXCP);
+ }
}
}

diff --git a/hypervisor/arch/x86/guest/vmexit.c b/hypervisor/arch/x86/guest/vmexit.c
index 43c979f8..23528c2f 100644
--- a/hypervisor/arch/x86/guest/vmexit.c
+++ b/hypervisor/arch/x86/guest/vmexit.c
@@ -194,8 +194,13 @@ int32_t vmexit_handler(struct acrn_vcpu *vcpu)
(void)vcpu_queue_exception(vcpu, vector, err_code);
vcpu->arch.idt_vectoring_info = 0U;
} else if (type == VMX_INT_TYPE_NMI) {
- vcpu_make_request(vcpu, ACRN_REQUEST_NMI);
- vcpu->arch.idt_vectoring_info = 0U;
+ /* This NMI is used as notification signal, we will not inject back to the guest */
+ if (is_notification_nmi_triggered(vcpu->vm)) {
+ pr_dbg("This NMI is used as notification signal. So ignore it.");
+ } else {
+ vcpu_make_request(vcpu, ACRN_REQUEST_NMI);
+ vcpu->arch.idt_vectoring_info = 0U;
+ }
} else {
/* No action on EXT_INT or SW exception. */
}
diff --git a/hypervisor/arch/x86/notify.c b/hypervisor/arch/x86/notify.c
index 6c8aafd0..e8d9bc7e 100644
--- a/hypervisor/arch/x86/notify.c
+++ b/hypervisor/arch/x86/notify.c
@@ -12,6 +12,7 @@
#include <cpu.h>
#include <per_cpu.h>
#include <lapic.h>
+#include <vm.h>

static uint32_t notification_irq = IRQ_INVALID;

@@ -114,3 +115,26 @@ void setup_posted_intr_notification(void)
pr_err("Failed to setup posted-intr notification");
}
}
+
+/**
+ * @brief Check if notification NMI is triggered
+ *
+ * @return true, if the NMI is triggered for notifying vCPU
+ * @return false, if the NMI is triggered for other purpose
+ */
+bool is_notification_nmi_triggered(struct acrn_vm *vm)
+{
+ bool ret;
+
+ /*
+ * Currently, acrn doesn't support vNMI well. Here, we take all
+ * the NMIs as notificaton NMI for hard rtvm. It means that we
+ * will drop all the NMI injection request to hard rtvm.
+ *
+ * TODO: Add code to check if the NMI is triggered for notification
+ * purpose in order to support vNMI.
+ */
+ ret = is_lapic_pt_configured(vm);
+
+ return ret;
+}
diff --git a/hypervisor/include/arch/x86/irq.h b/hypervisor/include/arch/x86/irq.h
index cb8a7c61..5673d910 100644
--- a/hypervisor/include/arch/x86/irq.h
+++ b/hypervisor/include/arch/x86/irq.h
@@ -65,6 +65,7 @@
#define IRQF_PT (1U << 2U) /* 1: for passthrough dev */

struct acrn_vcpu;
+struct acrn_vm;

/*
* Definition of the stack frame layout
@@ -87,6 +88,7 @@ struct smp_call_info_data {
};

void smp_call_function(uint64_t mask, smp_call_func_t func, void *data);
+bool is_notification_nmi_triggered(struct acrn_vm *vm);

void init_default_irqs(uint16_t cpu_id);

--
2.20.0


[PATCH v5 1/5] HV: Use NMI to kick lapic-pt vCPU's thread

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.

Without the way to kick the vCPU off VMX non-root mode to handle pending
request on time, 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). ACRN now will send an IPI with vector 0xF0 to target vCPU to kick the vCPU
off VMX non-root mode if it wants to do some operations on target vCPU.
However, this way doesn't work for lapic-pt vCPUs. The IPI will be delivered
to the guest directly without vmexit and the guest will receive a unexpected
interrupt. Consequently, if the guest can't handle this interrupt properly,
fatal error may happen.

The NMI can be used as the notification signal to kick the vCPU off VMX
non-root mode for lapic-pt vCPUs. So, this patch uses NMI as notification signal
to address the above issues for lapic-pt vCPUs.

Signed-off-by: Kaige Fu <kaige.fu@...>
---
hypervisor/arch/x86/guest/vmcs.c | 11 +++++++++++
hypervisor/common/schedule.c | 19 ++++++++++++++++---
hypervisor/include/common/schedule.h | 1 +
3 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/hypervisor/arch/x86/guest/vmcs.c b/hypervisor/arch/x86/guest/vmcs.c
index 6e2d7669..1efa37db 100644
--- a/hypervisor/arch/x86/guest/vmcs.c
+++ b/hypervisor/arch/x86/guest/vmcs.c
@@ -562,6 +562,7 @@ void switch_apicv_mode_x2apic(struct acrn_vcpu *vcpu)
* Disable posted interrupt processing
* update x2apic msr bitmap for pass-thru
* enable inteception only for ICR
+ * enable NMI exit as we will use NMI to kick vCPU thread
* disable pre-emption for TSC DEADLINE MSR
* Disable Register Virtualization and virtual interrupt delivery
* Disable "use TPR shadow"
@@ -572,6 +573,16 @@ void switch_apicv_mode_x2apic(struct acrn_vcpu *vcpu)
if (is_apicv_advanced_feature_supported()) {
value32 &= ~VMX_PINBASED_CTLS_POST_IRQ;
}
+
+ /*
+ * 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. So, here we enable NMI-exiting and use NMI
+ * as notification signal after passthroughing the lapic to vCPU.
+ */
+ value32 |= VMX_PINBASED_CTLS_NMI_EXIT;
exec_vmwrite32(VMX_PIN_VM_EXEC_CONTROLS, value32);

value32 = exec_vmread32(VMX_EXIT_CONTROLS);
diff --git a/hypervisor/common/schedule.c b/hypervisor/common/schedule.c
index 2f0cd154..da6c785b 100644
--- a/hypervisor/common/schedule.c
+++ b/hypervisor/common/schedule.c
@@ -123,7 +123,7 @@ struct thread_object *sched_get_current(uint16_t pcpu_id)
}

/**
- * @pre delmode == DEL_MODE_IPI || delmode == DEL_MODE_INIT
+ * @pre delmode == DEL_MODE_IPI || delmode == DEL_MODE_INIT || delmode == DEL_MODE_NMI
*/
void make_reschedule_request(uint16_t pcpu_id, uint16_t delmode)
{
@@ -138,6 +138,9 @@ void make_reschedule_request(uint16_t pcpu_id, uint16_t delmode)
case DEL_MODE_INIT:
send_single_init(pcpu_id);
break;
+ case DEL_MODE_NMI:
+ send_single_nmi(pcpu_id);
+ break;
default:
ASSERT(false, "Unknown delivery mode %u for pCPU%u", delmode, pcpu_id);
break;
@@ -235,10 +238,20 @@ void kick_thread(const struct thread_object *obj)
obtain_schedule_lock(pcpu_id, &rflag);
if (is_running(obj)) {
if (get_pcpu_id() != pcpu_id) {
- send_single_ipi(pcpu_id, VECTOR_NOTIFY_VCPU);
+ if (obj->notify_mode == SCHED_NOTIFY_IPI) {
+ send_single_ipi(pcpu_id, VECTOR_NOTIFY_VCPU);
+ } else {
+ /* For lapic-pt vCPUs */
+ send_single_nmi(pcpu_id);
+ }
}
} else if (is_runnable(obj)) {
- make_reschedule_request(pcpu_id, DEL_MODE_IPI);
+ if (obj->notify_mode == SCHED_NOTIFY_IPI) {
+ make_reschedule_request(pcpu_id, DEL_MODE_IPI);
+ } else {
+ /* For lapic-pt vCPUs */
+ make_reschedule_request(pcpu_id, DEL_MODE_NMI);
+ }
} else {
/* do nothing */
}
diff --git a/hypervisor/include/common/schedule.h b/hypervisor/include/common/schedule.h
index 9d7c9d39..164e3441 100644
--- a/hypervisor/include/common/schedule.h
+++ b/hypervisor/include/common/schedule.h
@@ -14,6 +14,7 @@

#define DEL_MODE_INIT (1U)
#define DEL_MODE_IPI (2U)
+#define DEL_MODE_NMI (3U)

#define THREAD_DATA_SIZE (256U)

--
2.20.0


[PATCH v5 0/5] Use NMI to notify 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.

Without the way to kick the vCPU off VMX non-root mode to handle pending
request on time, 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). ACRN now will send an IPI with vector 0xF0 to target vCPU to kick the vCPU
off VMX non-root mode if it wants to do some operations on target vCPU.
However, this way doesn't work for lapic-pt vCPUs. The IPI will be delivered
to the guest directly without vmexit and the guest will receive a unexpected
interrupt. Consequently, if the guest can't handle this interrupt properly,
fatal error may happen.

The NMI can be used as the notification signal to kick the vCPU off VMX
non-root mode for lapic-pt vCPUs. So, this patchset uses NMI as notification signal
to address the above issues for lapic-pt vCPUs.

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.

--
v4 -> v5:
- PRed first 3 of v4 patchset
[1/8] https://lists.projectacrn.org/g/acrn-dev/message/26067?p=,,,20,0,0,0::Created,,posterid%3A967719,20,2,0,68149225
[2/8] https://lists.projectacrn.org/g/acrn-dev/message/26069?p=,,,20,0,0,0::Created,,posterid%3A967719,20,2,0,68149227
[3/8] https://lists.projectacrn.org/g/acrn-dev/message/26070?p=,,,20,0,0,0::Created,,posterid%3A967719,20,2,0,68149228

v3 -> v4:
- Add a nmi handler instead of handling it in dispatch_exception.
- Refine commit message in "Use NMI to kick lapic-pt vCPU's thread" to describe the
#2 issue more clearly.
- Don't make the NMI injection request when using NMI to notify vCPU instead of ignoring
NMI injection request in acrn_handle_pending_request.

v2 -> v3:
- Address Like's comment on 4/7: use is_lapic_pt_configured instead of is_lapic_pt_enabled.
- Collect Acks from Eddie.

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 (5):
HV: Use NMI to kick lapic-pt vCPU's thread
HV: Don't make NMI injection req when notifying vCPU
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 | 25 +++++++++++++++++++++-
hypervisor/arch/x86/guest/vmcs.c | 18 +++++++++++++---
hypervisor/arch/x86/guest/vmexit.c | 32 ++++++++--------------------
hypervisor/arch/x86/irq.c | 31 +++++++++++++++++++++++++--
hypervisor/arch/x86/lapic.c | 20 -----------------
hypervisor/arch/x86/notify.c | 24 +++++++++++++++++++++
hypervisor/common/schedule.c | 24 +++++++++++++++------
hypervisor/include/arch/x86/irq.h | 3 +++
hypervisor/include/arch/x86/lapic.h | 9 --------
hypervisor/include/common/schedule.h | 4 ++--
10 files changed, 123 insertions(+), 67 deletions(-)

--
2.20.0


[PATCH 1/2] reset: detect highest severity guest dynamically

Yin, Fengwei <fengwei.yin@...>
 

For guest reset, if the highest severity guest reset will reset
system. There is vm flag to call out the highest severity guest
in specific scenario which is a static guest severity assignment.

There is case that the static highest severity guest is shutdown
and the highest severity guest should be transfer to other guest.
For example, in ISD scenario, if RTVM (static highest severity
guest) is shutdown, SOS should be highest severity guest instead.

The is_highest_severity_vm() is updated to detect highest severity
guest dynamically. And promote the highest severity guest reset
to system reset.

Signed-off-by: Yin Fengwei <fengwei.yin@...>
---
hypervisor/arch/x86/guest/vm.c | 26 +++++++++++++++++-
hypervisor/arch/x86/guest/vm_reset.c | 40 ++++++++++++++--------------
2 files changed, 45 insertions(+), 21 deletions(-)

diff --git a/hypervisor/arch/x86/guest/vm.c b/hypervisor/arch/x86/guest/vm.c
index 0be4d12a..138c4d85 100644
--- a/hypervisor/arch/x86/guest/vm.c
+++ b/hypervisor/arch/x86/guest/vm.c
@@ -122,9 +122,33 @@ bool is_rt_vm(const struct acrn_vm *vm)
*/
bool is_highest_severity_vm(const struct acrn_vm *vm)
{
+ int ret;
struct acrn_vm_config *vm_config = get_vm_config(vm->vm_id);

- return ((vm_config->guest_flags & GUEST_FLAG_HIGHEST_SEVERITY) != 0U);
+ if ((vm_config->guest_flags & GUEST_FLAG_HIGHEST_SEVERITY) != 0U) {
+ ret = true;
+ } else if (is_postlaunched_vm(vm)) {
+ /*
+ * currently, post launched rtvm always has GUEST_FLAG_HIGHEST_SEVERITY
+ * set. So vm is not rtvm here.
+ */
+ ret = false;
+ } else {
+ /* vm is SOS here */
+ uint16_t vm_id;
+ struct acrn_vm *vm;
+
+ ret = true;
+ for (vm_id = 0U; vm_id < CONFIG_MAX_VM_NUM; vm_id++) {
+ vm = get_vm_from_vmid(vm_id);
+ if (!is_poweroff_vm(vm) && is_rt_vm(vm)) {
+ ret = false;
+ break;
+ }
+ }
+ }
+
+ return ret;
}

/**
diff --git a/hypervisor/arch/x86/guest/vm_reset.c b/hypervisor/arch/x86/guest/vm_reset.c
index 9e26f0b3..d3c4ccee 100644
--- a/hypervisor/arch/x86/guest/vm_reset.c
+++ b/hypervisor/arch/x86/guest/vm_reset.c
@@ -82,24 +82,28 @@ static bool handle_common_reset_reg_write(struct acrn_vm *vm, bool reset)
{
bool ret = true;

- if (is_highest_severity_vm(vm)) {
- if (reset) {
+ if (reset) {
+ if (is_highest_severity_vm(vm)) {
reset_host();
- }
- } else if (is_postlaunched_vm(vm)) {
- /* re-inject to DM */
- ret = false;
+ } else if (is_postlaunched_vm(vm)) {
+ /* re-inject to DM */
+ ret = false;

- if (reset && is_rt_vm(vm)) {
- vm->state = VM_POWERING_OFF;
- }
- } else if (is_prelaunched_vm(vm)) {
- /* Don't support re-launch for now, just shutdown the guest */
- pause_vm(vm);
+ if (reset && is_rt_vm(vm)) {
+ vm->state = VM_POWERING_OFF;
+ }
+ } else {
+ /*
+ * If it's SOS reset while RTVM is still alive
+ * or pre-launched VM reset,
+ * ACRN doesn't support re-launch, just shutdown the guest.
+ */
+ struct acrn_vcpu *bsp = vcpu_from_vid(vm, BOOT_CPU_ID);

- struct acrn_vcpu *bsp = vcpu_from_vid(vm, BOOT_CPU_ID);
- per_cpu(shutdown_vm_id, pcpuid_from_vcpu(bsp)) = vm->vm_id;
- make_shutdown_vm_request(pcpuid_from_vcpu(bsp));
+ pause_vm(vm);
+ per_cpu(shutdown_vm_id, pcpuid_from_vcpu(bsp)) = vm->vm_id;
+ make_shutdown_vm_request(pcpuid_from_vcpu(bsp));
+ }
} else {
/*
* ignore writes from SOS.
@@ -162,11 +166,7 @@ static bool handle_reset_reg_write(struct acrn_vcpu *vcpu, uint16_t addr, size_t
struct acpi_reset_reg *reset_reg = get_host_reset_reg_data();

if (val == reset_reg->val) {
- if (is_highest_severity_vm(vcpu->vm)) {
- reset_host();
- } else {
- /* ignore reset request */
- }
+ handle_common_reset_reg_write(vcpu->vm, true);
} else {
/*
* ACPI defines the reset value but doesn't specify the meaning of other values.
--
2.19.1


[PATCH 2/2] pm: S5: update the system shutdown logical in ACRN

Yin, Fengwei <fengwei.yin@...>
 

For system S5, ACRN had assumption that SOS shutdown will trigger
system shutdown. So the system shutdown logical is:
1. Trap SOS shutdown
2. Wait for all other guest shutdown
3. Shutdown system

The new logical is refined as:
If all guest is shutdown, shutdown whole system

Signed-off-by: Yin Fengwei <fengwei.yin@...>
---
hypervisor/arch/x86/guest/pm.c | 43 ++++-----------------------
hypervisor/arch/x86/guest/vm.c | 23 ++++++++++++++
hypervisor/arch/x86/pm.c | 12 ++++++--
hypervisor/include/arch/x86/host_pm.h | 3 +-
4 files changed, 40 insertions(+), 41 deletions(-)

diff --git a/hypervisor/arch/x86/guest/pm.c b/hypervisor/arch/x86/guest/pm.c
index dd8f64dc..74769475 100644
--- a/hypervisor/arch/x86/guest/pm.c
+++ b/hypervisor/arch/x86/guest/pm.c
@@ -11,6 +11,7 @@
#include <logmsg.h>
#include <platform_acpi_info.h>
#include <guest_pm.h>
+#include <per_cpu.h>

int32_t validate_pstate(const struct acrn_vm *vm, uint64_t perf_ctl)
{
@@ -149,45 +150,11 @@ static bool pm1ab_io_read(struct acrn_vcpu *vcpu, uint16_t addr, size_t width)
return true;
}

-#define POWEROFF_TIMEOUT (300U) /* default poweroff timeout is 5 minutes */
-/* wait for other vm shutdown done. If POWEROFF_TIMEOUT passed and there are
- * still some VMs active, we will force platform power off.
- *
- * TODO:
- * - Let user configure whether we wait for ever till all VMs powered off or
- * force shutdown once pre-defined timeout hit.
- */
-static inline void wait_for_other_vm_shutdown(const struct acrn_vm *self_vm)
-{
- uint16_t vm_id;
- bool ready_for_s5;
- uint32_t timeout = (uint32_t)POWEROFF_TIMEOUT;
- struct acrn_vm *vm;
-
- while (timeout != 0U) {
- ready_for_s5 = true;
- for (vm_id = 0U; vm_id < CONFIG_MAX_VM_NUM; vm_id++) {
- vm = get_vm_from_vmid(vm_id);
-
- if ((vm != self_vm) && (!is_poweroff_vm(vm))) {
- ready_for_s5 = false;
- }
- }
-
- if (ready_for_s5) {
- break;
- } else {
- udelay(1000U * 1000U); /* delay 1s in each loop */
- }
-
- timeout--;
- }
-}
-
-static inline void enter_s5(const struct acrn_vm *vm, uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val)
+static inline void enter_s5(struct acrn_vm *vm, uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val)
{
- wait_for_other_vm_shutdown(vm);
- host_enter_s5(vm->pm.sx_state_data, pm1a_cnt_val, pm1b_cnt_val);
+ /* Only shutdown vm */
+ host_save_s5_reg_val(pm1a_cnt_val, pm1b_cnt_val);
+ shutdown_vm(vm);
}

static inline void enter_s3(struct acrn_vm *vm, uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val)
diff --git a/hypervisor/arch/x86/guest/vm.c b/hypervisor/arch/x86/guest/vm.c
index 138c4d85..3b324c92 100644
--- a/hypervisor/arch/x86/guest/vm.c
+++ b/hypervisor/arch/x86/guest/vm.c
@@ -604,6 +604,24 @@ int32_t create_vm(uint16_t vm_id, struct acrn_vm_config *vm_config, struct acrn_
return status;
}

+static bool is_ready_for_system_shutdown(void)
+{
+ bool ret = true;
+ uint16_t vm_id;
+ struct acrn_vm *vm;
+
+ for (vm_id = 0U; vm_id < CONFIG_MAX_VM_NUM; vm_id++) {
+ vm = get_vm_from_vmid(vm_id);
+ /* TODO: Update code to cover hybrid mode */
+ if (!is_poweroff_vm(vm)) {
+ ret = false;
+ break;
+ }
+ }
+
+ return ret;
+}
+
/*
* @pre vm != NULL
*/
@@ -672,6 +690,11 @@ int32_t shutdown_vm(struct acrn_vm *vm)
ret = -EINVAL;
}

+ if (is_ready_for_system_shutdown()) {
+ /* If no any guest running, shutdown system */
+ host_enter_s5();
+ }
+
/* Return status to caller */
return ret;
}
diff --git a/hypervisor/arch/x86/pm.c b/hypervisor/arch/x86/pm.c
index bbce3c89..5b22ed3a 100644
--- a/hypervisor/arch/x86/pm.c
+++ b/hypervisor/arch/x86/pm.c
@@ -148,9 +148,17 @@ void do_acpi_sx(const struct pm_s_state_data *sstate_data, uint32_t pm1a_cnt_val
} while ((s1 & (1U << BIT_WAK_STS)) == 0U);
}

-void host_enter_s5(const struct pm_s_state_data *sstate_data, uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val)
+static uint32_t host_pm1a_cnt_val, host_pm1b_cnt_val;
+void host_save_s5_reg_val(uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val)
{
- do_acpi_sx(sstate_data, pm1a_cnt_val, pm1b_cnt_val);
+ host_pm1a_cnt_val = pm1a_cnt_val;
+ host_pm1b_cnt_val = pm1b_cnt_val;
+}
+
+void host_enter_s5(void)
+{
+ struct pm_s_state_data *sx_data = get_host_sstate_data();
+ do_acpi_sx(sx_data, host_pm1a_cnt_val, host_pm1b_cnt_val);
}

static void suspend_tsc(__unused void *data)
diff --git a/hypervisor/include/arch/x86/host_pm.h b/hypervisor/include/arch/x86/host_pm.h
index 40422b3a..67391541 100644
--- a/hypervisor/include/arch/x86/host_pm.h
+++ b/hypervisor/include/arch/x86/host_pm.h
@@ -31,7 +31,8 @@ struct acpi_reset_reg {

struct pm_s_state_data *get_host_sstate_data(void);
void host_enter_s3(const struct pm_s_state_data *sstate_data, uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val);
-void host_enter_s5(const struct pm_s_state_data *sstate_data, uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val);
+void host_enter_s5(void);
+void host_save_s5_reg_val(uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val);
void do_acpi_sx(const struct pm_s_state_data *sstate_data, uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val);
extern void asm_enter_s3(const struct pm_s_state_data *sstate_data, uint32_t pm1a_cnt_val, uint32_t pm1b_cnt_val);
extern void restore_s3_context(void);
--
2.19.1


[PATCH 0/2] update reset/shutdown logic

Yin, Fengwei <fengwei.yin@...>
 

Update S5 in ACRN hypervisor from:
1. Trap SOS shutdown
2. Wait for all other guest shutdown
3. Shutdown system
to:
If all guest is shutdown, shutdown whole system

For reset, detect highest severity guest dynamically and promote
highest severity guest reset to system reset.

Yin Fengwei (2):
reset: detect highest severity guest dynamically
pm: S5: update the system shutdown logical in ACRN

hypervisor/arch/x86/guest/pm.c | 43 +++--------------------
hypervisor/arch/x86/guest/vm.c | 49 ++++++++++++++++++++++++++-
hypervisor/arch/x86/guest/vm_reset.c | 40 +++++++++++-----------
hypervisor/arch/x86/pm.c | 12 +++++--
hypervisor/include/arch/x86/host_pm.h | 3 +-
5 files changed, 85 insertions(+), 62 deletions(-)

--
2.19.1


Re: [PATCH v2 1/2] HV: correct apic lvt reset value

Li, Fei1
 

On Thu, Dec 12, 2019 at 04:56:51PM +0800, Victor Sun wrote:
Per SDM 10.4.7.1 vol3, the LVT register is reset to 0s except for the
mask bits are set to 1s;

Signed-off-by: Victor Sun <victor.sun@...>
---
hypervisor/arch/x86/guest/vlapic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hypervisor/arch/x86/guest/vlapic.c b/hypervisor/arch/x86/guest/vlapic.c
index 8c79a4d..2ac8485 100644
--- a/hypervisor/arch/x86/guest/vlapic.c
+++ b/hypervisor/arch/x86/guest/vlapic.c
@@ -1675,7 +1675,7 @@ vlapic_reset(struct acrn_vlapic *vlapic, const struct acrn_apicv_ops *ops)
vlapic->svr_last = lapic->svr.v;

for (i = 0U; i < (VLAPIC_MAXLVT_INDEX + 1U); i++) {
- vlapic->lvt_last[i] = 0U;
+ vlapic->lvt_last[i] = 0U | APIC_LVT_M;
}
Shall we remove these lines ? I think vlapic_mask_lvts already did this.

vlapic->isrv = 0U;
--
2.7.4




Re: [PATCH v2 2/2] HV: restore lapic state and apic id upon INIT

Li, Fei1
 

On Fri, Dec 13, 2019 at 01:18:00PM +0800, Victor Sun wrote:

On 12/13/2019 9:13 PM, Li Fei1 wrote:
On Fri, Dec 13, 2019 at 02:51:50AM +0000, Eddie Dong wrote:
Reviewed-by: Eddie Dong <eddie.dong@...>
Can Lifei have a check too?
LGTM. It would be better if we could do this in vlapic_reset.
vlapic_reset() just do reset, if we do init in vlapic_reset(), then the api
need a param to know the request operation is from INIT.
"10.4.7.3 Local APIC State After an INIT Reset"

-----Original Message-----
From: acrn-dev@... <acrn-dev@...> On
Behalf Of Victor Sun
Sent: Thursday, December 12, 2019 4:57 PM
To: acrn-dev@...
Subject: [acrn-dev] [PATCH v2 2/2] HV: restore lapic state and apic id upon
INIT

Per SDM 10.12.5.1 vol.3, local APIC should keep LAPIC state after receiving
INIT.
The local APIC ID register should also be preserved.
This is described in SDM 10.4.7.3 vol 3.
Signed-off-by: Victor Sun <victor.sun@...>
---
hypervisor/arch/x86/guest/vlapic.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/hypervisor/arch/x86/guest/vlapic.c
b/hypervisor/arch/x86/guest/vlapic.c
index 2ac8485..4a8d80f 100644
--- a/hypervisor/arch/x86/guest/vlapic.c
+++ b/hypervisor/arch/x86/guest/vlapic.c
@@ -55,8 +55,8 @@ static inline uint32_t prio(uint32_t x)

#define VLAPIC_VERSION (16U)
#define APICBASE_BSP 0x00000100UL
-#define APICBASE_X2APIC 0x00000400U
-#define APICBASE_XAPIC 0x00000800U
+#define APICBASE_X2APIC 0x00000400UL
+#define APICBASE_XAPIC 0x00000800UL
#define APICBASE_LAPIC_MODE (APICBASE_XAPIC | APICBASE_X2APIC)
#define APICBASE_ENABLED 0x00000800UL
#define LOGICAL_ID_MASK 0xFU
@@ -1156,6 +1156,9 @@ vlapic_process_init_sipi(struct acrn_vcpu*
target_vcpu, uint32_t mode, uint32_t {
if (mode == APIC_DELMODE_INIT) {
if ((icr_low & APIC_LEVEL_MASK) != APIC_LEVEL_DEASSERT) {
+ struct acrn_vlapic *target_vlapic = &target_vcpu->arch.vlapic;
+ uint64_t lapic_mode = vlapic_get_apicbase(target_vlapic) &
APICBASE_LAPIC_MODE;
+ uint32_t apic_id = target_vlapic->apic_page.id.v;

dev_dbg(ACRN_DBG_LAPIC,
"Sending INIT to %hu",
@@ -1164,6 +1167,13 @@ vlapic_process_init_sipi(struct acrn_vcpu*
target_vcpu, uint32_t mode, uint32_t
/* put target vcpu to INIT state and wait for SIPI */
pause_vcpu(target_vcpu, VCPU_PAUSED);
reset_vcpu(target_vcpu);
+ /* Per SDM 10.12.5.1 vol.3, need to preserve lapic mode after
INIT */
+ target_vlapic->msr_apicbase &= ~APICBASE_LAPIC_MODE;
+ target_vlapic->msr_apicbase |= lapic_mode;
+ if ((lapic_mode == APICBASE_XAPIC) || (lapic_mode ==
(APICBASE_XAPIC | APICBASE_X2APIC))) {
+ /* the local APIC ID register should be preserved in XAPIC
or X2APIC mode */
+ target_vlapic->apic_page.id.v = apic_id;
+ }
/* new cpu model only need one SIPI to kick AP run,
* the second SIPI will be ignored as it move out of
* wait-for-SIPI state.
--
2.7.4





Re: [PATCH] hv:fix crash issue when handling HC_NOTIFY_REQUEST_FINISH

Eddie Dong
 

Acked-by: Eddie Dong <eddie.dong@...>

-----Original Message-----
From: acrn-dev@... <acrn-dev@...> On
Behalf Of Yonghua Huang
Sent: Friday, December 13, 2019 1:43 PM
To: acrn-dev@...
Cc: Huang, Yonghua <yonghua.huang@...>
Subject: [acrn-dev] [PATCH] hv:fix crash issue when handling
HC_NOTIFY_REQUEST_FINISH

- 'vcpu_id' shall be less than 'vm->hw.created_vcpus' instead
of 'MAX_VCPUS_PER_VM'.
- The state of target vCPU should be "VCPU_PAUSED", and reject
all other states.

Signed-off-by: Yonghua Huang <yonghua.huang@...>
---
hypervisor/common/hypercall.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hypervisor/common/hypercall.c b/hypervisor/common/hypercall.c
index e8dbb9fb..c1140408 100644
--- a/hypervisor/common/hypercall.c
+++ b/hypervisor/common/hypercall.c
@@ -548,12 +548,12 @@ int32_t hcall_notify_ioreq_finish(uint16_t vmid,
uint16_t vcpu_id)
dev_dbg(ACRN_DBG_HYCALL, "[%d] NOTIFY_FINISH for vcpu %d",
vmid, vcpu_id);

- if (vcpu_id >= MAX_VCPUS_PER_VM) {
+ if (vcpu_id >= target_vm->hw.created_vcpus) {
pr_err("%s, failed to get VCPU %d context from VM %d\n",
__func__, vcpu_id, target_vm->vm_id);
} else {
vcpu = vcpu_from_vid(target_vm, vcpu_id);
- if (vcpu->state != VCPU_OFFLINE) {
+ if (vcpu->state == VCPU_PAUSED) {
if (!vcpu->vm->sw.is_completion_polling) {
resume_vcpu(vcpu);
}
--
2.17.1



[PATCH] hv:fix crash issue when handling HC_NOTIFY_REQUEST_FINISH

Yonghua Huang
 

- 'vcpu_id' shall be less than 'vm->hw.created_vcpus' instead
of 'MAX_VCPUS_PER_VM'.
- The state of target vCPU should be "VCPU_PAUSED", and reject
all other states.

Signed-off-by: Yonghua Huang <yonghua.huang@...>
---
hypervisor/common/hypercall.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hypervisor/common/hypercall.c b/hypervisor/common/hypercall.c
index e8dbb9fb..c1140408 100644
--- a/hypervisor/common/hypercall.c
+++ b/hypervisor/common/hypercall.c
@@ -548,12 +548,12 @@ int32_t hcall_notify_ioreq_finish(uint16_t vmid, uint16_t vcpu_id)
dev_dbg(ACRN_DBG_HYCALL, "[%d] NOTIFY_FINISH for vcpu %d",
vmid, vcpu_id);

- if (vcpu_id >= MAX_VCPUS_PER_VM) {
+ if (vcpu_id >= target_vm->hw.created_vcpus) {
pr_err("%s, failed to get VCPU %d context from VM %d\n",
__func__, vcpu_id, target_vm->vm_id);
} else {
vcpu = vcpu_from_vid(target_vm, vcpu_id);
- if (vcpu->state != VCPU_OFFLINE) {
+ if (vcpu->state == VCPU_PAUSED) {
if (!vcpu->vm->sw.is_completion_polling) {
resume_vcpu(vcpu);
}
--
2.17.1


Re: [PATCH v2 2/2] HV: restore lapic state and apic id upon INIT

Victor Sun
 

On 12/13/2019 9:13 PM, Li Fei1 wrote:
On Fri, Dec 13, 2019 at 02:51:50AM +0000, Eddie Dong wrote:
Reviewed-by: Eddie Dong <eddie.dong@...>
Can Lifei have a check too?
LGTM. It would be better if we could do this in vlapic_reset.
vlapic_reset() just do reset, if we do init in vlapic_reset(), then the api need a param to know the request operation is from INIT.
-----Original Message-----
From: acrn-dev@... <acrn-dev@...> On
Behalf Of Victor Sun
Sent: Thursday, December 12, 2019 4:57 PM
To: acrn-dev@...
Subject: [acrn-dev] [PATCH v2 2/2] HV: restore lapic state and apic id upon
INIT

Per SDM 10.12.5.1 vol.3, local APIC should keep LAPIC state after receiving
INIT.
The local APIC ID register should also be preserved.
This is described in SDM 10.4.7.3 vol 3.
Signed-off-by: Victor Sun <victor.sun@...>
---
hypervisor/arch/x86/guest/vlapic.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/hypervisor/arch/x86/guest/vlapic.c
b/hypervisor/arch/x86/guest/vlapic.c
index 2ac8485..4a8d80f 100644
--- a/hypervisor/arch/x86/guest/vlapic.c
+++ b/hypervisor/arch/x86/guest/vlapic.c
@@ -55,8 +55,8 @@ static inline uint32_t prio(uint32_t x)

#define VLAPIC_VERSION (16U)
#define APICBASE_BSP 0x00000100UL
-#define APICBASE_X2APIC 0x00000400U
-#define APICBASE_XAPIC 0x00000800U
+#define APICBASE_X2APIC 0x00000400UL
+#define APICBASE_XAPIC 0x00000800UL
#define APICBASE_LAPIC_MODE (APICBASE_XAPIC | APICBASE_X2APIC)
#define APICBASE_ENABLED 0x00000800UL
#define LOGICAL_ID_MASK 0xFU
@@ -1156,6 +1156,9 @@ vlapic_process_init_sipi(struct acrn_vcpu*
target_vcpu, uint32_t mode, uint32_t {
if (mode == APIC_DELMODE_INIT) {
if ((icr_low & APIC_LEVEL_MASK) != APIC_LEVEL_DEASSERT) {
+ struct acrn_vlapic *target_vlapic = &target_vcpu->arch.vlapic;
+ uint64_t lapic_mode = vlapic_get_apicbase(target_vlapic) &
APICBASE_LAPIC_MODE;
+ uint32_t apic_id = target_vlapic->apic_page.id.v;

dev_dbg(ACRN_DBG_LAPIC,
"Sending INIT to %hu",
@@ -1164,6 +1167,13 @@ vlapic_process_init_sipi(struct acrn_vcpu*
target_vcpu, uint32_t mode, uint32_t
/* put target vcpu to INIT state and wait for SIPI */
pause_vcpu(target_vcpu, VCPU_PAUSED);
reset_vcpu(target_vcpu);
+ /* Per SDM 10.12.5.1 vol.3, need to preserve lapic mode after
INIT */
+ target_vlapic->msr_apicbase &= ~APICBASE_LAPIC_MODE;
+ target_vlapic->msr_apicbase |= lapic_mode;
+ if ((lapic_mode == APICBASE_XAPIC) || (lapic_mode ==
(APICBASE_XAPIC | APICBASE_X2APIC))) {
+ /* the local APIC ID register should be preserved in XAPIC
or X2APIC mode */
+ target_vlapic->apic_page.id.v = apic_id;
+ }
/* new cpu model only need one SIPI to kick AP run,
* the second SIPI will be ignored as it move out of
* wait-for-SIPI state.
--
2.7.4



Re: [PATCH v2 2/2] HV: restore lapic state and apic id upon INIT

Li, Fei1
 

On Fri, Dec 13, 2019 at 02:51:50AM +0000, Eddie Dong wrote:
Reviewed-by: Eddie Dong <eddie.dong@...>
Can Lifei have a check too?
LGTM. It would be better if we could do this in vlapic_reset.

-----Original Message-----
From: acrn-dev@... <acrn-dev@...> On
Behalf Of Victor Sun
Sent: Thursday, December 12, 2019 4:57 PM
To: acrn-dev@...
Subject: [acrn-dev] [PATCH v2 2/2] HV: restore lapic state and apic id upon
INIT

Per SDM 10.12.5.1 vol.3, local APIC should keep LAPIC state after receiving
INIT.
The local APIC ID register should also be preserved.
This is described in SDM 10.4.7.3 vol 3.

Signed-off-by: Victor Sun <victor.sun@...>
---
hypervisor/arch/x86/guest/vlapic.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/hypervisor/arch/x86/guest/vlapic.c
b/hypervisor/arch/x86/guest/vlapic.c
index 2ac8485..4a8d80f 100644
--- a/hypervisor/arch/x86/guest/vlapic.c
+++ b/hypervisor/arch/x86/guest/vlapic.c
@@ -55,8 +55,8 @@ static inline uint32_t prio(uint32_t x)

#define VLAPIC_VERSION (16U)
#define APICBASE_BSP 0x00000100UL
-#define APICBASE_X2APIC 0x00000400U
-#define APICBASE_XAPIC 0x00000800U
+#define APICBASE_X2APIC 0x00000400UL
+#define APICBASE_XAPIC 0x00000800UL
#define APICBASE_LAPIC_MODE (APICBASE_XAPIC | APICBASE_X2APIC)
#define APICBASE_ENABLED 0x00000800UL
#define LOGICAL_ID_MASK 0xFU
@@ -1156,6 +1156,9 @@ vlapic_process_init_sipi(struct acrn_vcpu*
target_vcpu, uint32_t mode, uint32_t {
if (mode == APIC_DELMODE_INIT) {
if ((icr_low & APIC_LEVEL_MASK) != APIC_LEVEL_DEASSERT) {
+ struct acrn_vlapic *target_vlapic = &target_vcpu->arch.vlapic;
+ uint64_t lapic_mode = vlapic_get_apicbase(target_vlapic) &
APICBASE_LAPIC_MODE;
+ uint32_t apic_id = target_vlapic->apic_page.id.v;

dev_dbg(ACRN_DBG_LAPIC,
"Sending INIT to %hu",
@@ -1164,6 +1167,13 @@ vlapic_process_init_sipi(struct acrn_vcpu*
target_vcpu, uint32_t mode, uint32_t
/* put target vcpu to INIT state and wait for SIPI */
pause_vcpu(target_vcpu, VCPU_PAUSED);
reset_vcpu(target_vcpu);
+ /* Per SDM 10.12.5.1 vol.3, need to preserve lapic mode after
INIT */
+ target_vlapic->msr_apicbase &= ~APICBASE_LAPIC_MODE;
+ target_vlapic->msr_apicbase |= lapic_mode;
+ if ((lapic_mode == APICBASE_XAPIC) || (lapic_mode ==
(APICBASE_XAPIC | APICBASE_X2APIC))) {
+ /* the local APIC ID register should be preserved in XAPIC
or X2APIC mode */
+ target_vlapic->apic_page.id.v = apic_id;
+ }
/* new cpu model only need one SIPI to kick AP run,
* the second SIPI will be ignored as it move out of
* wait-for-SIPI state.
--
2.7.4





Re: [PATCH v2 2/2] HV: restore lapic state and apic id upon INIT

Eddie Dong
 

Reviewed-by: Eddie Dong <eddie.dong@...>
Can Lifei have a check too?

-----Original Message-----
From: acrn-dev@... <acrn-dev@...> On
Behalf Of Victor Sun
Sent: Thursday, December 12, 2019 4:57 PM
To: acrn-dev@...
Subject: [acrn-dev] [PATCH v2 2/2] HV: restore lapic state and apic id upon
INIT

Per SDM 10.12.5.1 vol.3, local APIC should keep LAPIC state after receiving
INIT. The local APIC ID register should also be preserved.

Signed-off-by: Victor Sun <victor.sun@...>
---
hypervisor/arch/x86/guest/vlapic.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/hypervisor/arch/x86/guest/vlapic.c
b/hypervisor/arch/x86/guest/vlapic.c
index 2ac8485..4a8d80f 100644
--- a/hypervisor/arch/x86/guest/vlapic.c
+++ b/hypervisor/arch/x86/guest/vlapic.c
@@ -55,8 +55,8 @@ static inline uint32_t prio(uint32_t x)

#define VLAPIC_VERSION (16U)
#define APICBASE_BSP 0x00000100UL
-#define APICBASE_X2APIC 0x00000400U
-#define APICBASE_XAPIC 0x00000800U
+#define APICBASE_X2APIC 0x00000400UL
+#define APICBASE_XAPIC 0x00000800UL
#define APICBASE_LAPIC_MODE (APICBASE_XAPIC | APICBASE_X2APIC)
#define APICBASE_ENABLED 0x00000800UL
#define LOGICAL_ID_MASK 0xFU
@@ -1156,6 +1156,9 @@ vlapic_process_init_sipi(struct acrn_vcpu*
target_vcpu, uint32_t mode, uint32_t {
if (mode == APIC_DELMODE_INIT) {
if ((icr_low & APIC_LEVEL_MASK) != APIC_LEVEL_DEASSERT) {
+ struct acrn_vlapic *target_vlapic = &target_vcpu->arch.vlapic;
+ uint64_t lapic_mode = vlapic_get_apicbase(target_vlapic) &
APICBASE_LAPIC_MODE;
+ uint32_t apic_id = target_vlapic->apic_page.id.v;

dev_dbg(ACRN_DBG_LAPIC,
"Sending INIT to %hu",
@@ -1164,6 +1167,13 @@ vlapic_process_init_sipi(struct acrn_vcpu*
target_vcpu, uint32_t mode, uint32_t
/* put target vcpu to INIT state and wait for SIPI */
pause_vcpu(target_vcpu, VCPU_PAUSED);
reset_vcpu(target_vcpu);
+ /* Per SDM 10.12.5.1 vol.3, need to preserve lapic mode after
INIT */
+ target_vlapic->msr_apicbase &= ~APICBASE_LAPIC_MODE;
+ target_vlapic->msr_apicbase |= lapic_mode;
+ if ((lapic_mode == APICBASE_XAPIC) || (lapic_mode ==
(APICBASE_XAPIC | APICBASE_X2APIC))) {
+ /* the local APIC ID register should be preserved in XAPIC
or X2APIC mode */
+ target_vlapic->apic_page.id.v = apic_id;
+ }
/* new cpu model only need one SIPI to kick AP run,
* the second SIPI will be ignored as it move out of
* wait-for-SIPI state.
--
2.7.4



Re: [PATCH v2 1/2] HV: correct apic lvt reset value

Eddie Dong
 

./include/arch/x86/apicreg.h:#define APIC_LVT_M 0x00010000U
./include/arch/x86/lapic.h:#define LAPIC_LVT_MASK 0x00010000U

Can we use one MACRO?

The rest is fine.

-----Original Message-----
From: acrn-dev@... <acrn-dev@...> On
Behalf Of Victor Sun
Sent: Thursday, December 12, 2019 4:57 PM
To: acrn-dev@...
Subject: [acrn-dev] [PATCH v2 1/2] HV: correct apic lvt reset value

Per SDM 10.4.7.1 vol3, the LVT register is reset to 0s except for the mask bits
are set to 1s;

Signed-off-by: Victor Sun <victor.sun@...>
---
hypervisor/arch/x86/guest/vlapic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hypervisor/arch/x86/guest/vlapic.c
b/hypervisor/arch/x86/guest/vlapic.c
index 8c79a4d..2ac8485 100644
--- a/hypervisor/arch/x86/guest/vlapic.c
+++ b/hypervisor/arch/x86/guest/vlapic.c
@@ -1675,7 +1675,7 @@ vlapic_reset(struct acrn_vlapic *vlapic, const
struct acrn_apicv_ops *ops)
vlapic->svr_last = lapic->svr.v;

for (i = 0U; i < (VLAPIC_MAXLVT_INDEX + 1U); i++) {
- vlapic->lvt_last[i] = 0U;
+ vlapic->lvt_last[i] = 0U | APIC_LVT_M;
}

vlapic->isrv = 0U;
--
2.7.4



Re: [PATCH 1/5] acrn-config: change from selectable behavior to editable for 'gvt_args'

Liu, WeiX W
 

OK, got it. I will modify it in PR.

Thanks,
Liu,wei

-----Original Message-----
From: acrn-dev@... [mailto:acrn-dev@...] On Behalf Of Victor Sun
Sent: Thursday, December 12, 2019 10:21 PM
To: acrn-dev@...
Cc: Wu, Binbin <binbin.wu@...>; Zou, Terry <terry.zou@...>
Subject: Re: [acrn-dev] [PATCH 1/5] acrn-config: change from selectable behavior to editable for 'gvt_args'

subject change to: acrn-config: change gvt_args from selectbox to editbox

On 12/12/2019 6:42 PM, Liu, WeiX W wrote:
1. In some vms does not need pci-gvt args or need specify
configuration for 'gvt_args' item tag, this patch change from
selectable behavior to editable for 'gvt_args' item from webUI.

2. Modify the description for gvt_args item tag from launch config xmls.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@...>
Acked-by: Victor Sun <victor.sun@...>
---
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 +--
.../xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml | 2 +-
.../xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml | 2 +-
.../xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml | 2 +-
.../config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml | 2 +-
.../xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml | 2 +-
.../xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml | 2 +-
.../xmls/config-xmls/generic/hybrid_launch_1uos.xml | 2 +-
.../xmls/config-xmls/generic/industry_launch_1uos.xml | 2 +-
.../xmls/config-xmls/generic/industry_launch_2uos.xml | 4 ++--
.../xmls/config-xmls/generic/sdc_launch_1uos.xml | 2 +-
.../config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml | 2 +-
.../config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml | 2 +-
.../config-xmls/nuc6cayh/industry_launch_1uos_waag.xml | 2 +-
.../xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml | 4 ++--
.../xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml | 2 +-
.../xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml | 2 +-
.../config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml | 2 +-
.../nuc7i7dnb/industry_launch_1uos_vxworks.xml | 2 +-
.../config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml | 2 +-
.../xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml | 4 ++--
.../xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml | 2 +-
.../xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml | 2 +-
.../xmls/config-xmls/tgl-rvp/industry_launch_1uos.xml | 2 +-
.../whl-ipc-i5/industry_launch_1uos_hardrt.xml | 2 +-
.../whl-ipc-i5/industry_launch_1uos_vxworks.xml | 2 +-
.../config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml | 2 +-
.../xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml | 4 ++--
.../xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml | 2 +-
.../config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml | 2 +-
.../whl-ipc-i7/industry_launch_1uos_hardrt.xml | 2 +-
.../whl-ipc-i7/industry_launch_1uos_vxworks.xml | 2 +-
.../config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml | 2 +-
.../xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml | 4 ++--
.../xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml | 2 +-
.../config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml | 2 +-
39 files changed, 46 insertions(+), 47 deletions(-)

diff --git a/misc/acrn-config/launch_config/com.py
b/misc/acrn-config/launch_config/com.py
index 246d13ee0dd6..420ab656f3bc 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):
@@ -546,7 +548,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 3349761e5090..8229664c8b5b 100644
--- a/misc/acrn-config/launch_config/launch_cfg_gen.py
+++ b/misc/acrn-config/launch_config/launch_cfg_gen.py
@@ -47,7 +47,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,poweroff_channel'] = launch_cfg_lib.PM_CHANNEL
- 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 215e6a20cef7..2c7a25f03e95 100644
--- a/misc/acrn-config/launch_config/launch_item.py
+++ b/misc/acrn-config/launch_config/launch_item.py
@@ -29,7 +29,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 dd7650dc015f..08fb8e2ce073 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'] @@ -464,7 +463,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

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 66a421b4618c..2b22cef4d69b 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.x
+++ ml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ANDROID</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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">IOC</poweroff_channel> 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 b43ad2b282c5..d8a7e61b6d9b 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ALIOS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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">IOC</poweroff_channel> 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 90511685f01f..139d89885b07 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.x
+++ ml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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">IOC</poweroff_channel> 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 528afb1e9f5e..84967fc6a09a 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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">PowerButton</poweroff_channel>
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 0859a9de80da..d94c476ede0e 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.x
+++ ml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ANDROID</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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">PowerButton</poweroff_channel>
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 206407e5d42d..ef16dd2b6246 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.x
+++ ml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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">PowerButton</poweroff_channel>
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 d55f351e4e98..1964f0535053 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type"></uos_type>
<rtos_type desc="UOS Realtime capability"></rtos_type>
<mem_size desc="UOS memory size in MByte"></mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT."></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> 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 d0015e3c4c26..c48ec8127414 100644
---
a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_1uos.x
+++ ml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type"></uos_type>
<rtos_type desc="UOS Realtime capability"></rtos_type>
<mem_size desc="UOS memory size in MByte"></mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT."></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> 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 0dfec70b4bbc..ca95f4ed5c5f 100644
---
a/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/generic/industry_launch_2uos.x
+++ ml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type"></uos_type>
<rtos_type desc="UOS Realtime capability"></rtos_type>
<mem_size desc="UOS memory size in MByte"></mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT."></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> @@ -35,7 +35,7 @@
<uos_type desc="UOS type"></uos_type>
<rtos_type desc="UOS Realtime capability"></rtos_type>
<mem_size desc="UOS memory size in MByte"></mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT."></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> 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 00d2728a0206..67203e341f34 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type"></uos_type>
<rtos_type desc="UOS Realtime capability"></rtos_type>
<mem_size desc="UOS memory size in MByte"></mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT."></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> diff --git
a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hard
rt.xml
b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hard
rt.xml index d4b6eabd4259..06aca8ff775c 100644
---
a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_hard
rt.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_
+++ hardrt.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64
+448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
diff --git
a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxwo
rks.xml
b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxwo
rks.xml index a7ba20295455..e6aae79e5a87 100644
---
a/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_vxwo
rks.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/industry_launch_1uos_
+++ vxworks.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">VXWORKS</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT."></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> 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 7be03f13bab3..21980572c44e 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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> 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 b85345af341f..0f16f322f990 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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> @@ -36,7 +36,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64
+448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
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 8c88640749cc..b73337a2917d 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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">vuart1(pty)</poweroff_channel>
diff --git
a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xm
l
b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xm
l index de7b2238f61e..01262c2d8384 100644
---
a/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xm
l
+++ b/misc/acrn-config/xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephy
+++ r.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ZEPHYR</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">128</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT."></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> diff --git
a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_har
drt.xml
b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_har
drt.xml index a4cdacfc6688..5db7a02d0824 100644
---
a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_har
drt.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos
+++ _hardrt.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64
+448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
diff --git
a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxw
orks.xml
b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxw
orks.xml index cc4e6dd74c46..e34f70ac5d7c 100644
---
a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_vxw
orks.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos
+++ _vxworks.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">VXWORKS</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT."></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> diff --git
a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waa
g.xml
b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waa
g.xml index fef692a25c25..ce231d88b829 100644
---
a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos_waa
g.xml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/industry_launch_1uos
+++ _waag.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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> 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 441be21d8f3e..25730610a29f 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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> @@ -36,7 +36,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64
+448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
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 f4db6d8cd8f9..15080f7aaf65 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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">vuart1(pty)</poweroff_channel>
diff --git
a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.x
ml
b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.x
ml index 9600f0b63e29..3e1d537df013 100644
---
a/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.x
ml
+++ b/misc/acrn-config/xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zeph
+++ yr.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ZEPHYR</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">128</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT."></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> diff --git
a/misc/acrn-config/xmls/config-xmls/tgl-rvp/industry_launch_1uos.xml
b/misc/acrn-config/xmls/config-xmls/tgl-rvp/industry_launch_1uos.xml
index 7b0e6f19eb80..8be0d639243e 100644
---
a/misc/acrn-config/xmls/config-xmls/tgl-rvp/industry_launch_1uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/tgl-rvp/industry_launch_1uos.x
+++ ml
@@ -4,7 +4,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2000</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8.
+ Leave it blank to disable GVT.">64 448 8</gvt_args>
<vbootloader desc="">ovmf</vbootloader>
<rootfs_dev desc="">/dev/nvme0n1p3</rootfs_dev>
<rootfs_img desc="">/root/uos/uos.img</rootfs_img>
diff --git
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_ha
rdrt.xml
b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_ha
rdrt.xml index cc37940b0cb8..20e9d5a84114 100644
---
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_ha
rdrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uo
+++ s_hardrt.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64
+448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
diff --git
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vx
works.xml
b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vx
works.xml index 4804ff4ae703..d10ee1411dee 100644
---
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_vx
works.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uo
+++ s_vxworks.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">VXWORKS</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT."></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> diff --git
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_wa
ag.xml
b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_wa
ag.xml index be255422c815..34b3853ca1d3 100644
---
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uos_wa
ag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_1uo
+++ s_waag.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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> diff --git
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xm
l
b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xm
l index 51796d27972a..c40e1bd2df16 100644
---
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xm
l
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry_launch_2uo
+++ s.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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> @@ -36,7 +36,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64
+448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
diff --git
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xm
l
b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xm
l index 58ae645e2947..05e8f6af7469 100644
---
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xm
l
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laa
+++ g.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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">vuart1(pty)</poweroff_channel>
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 f0bf954020f2..3990dfbd6527 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_zep
+++ hyr.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ZEPHYR</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">128</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT."></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> diff --git
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_ha
rdrt.xml
b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_ha
rdrt.xml index daa4413b8d29..5fafaf1bc38a 100644
---
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_ha
rdrt.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uo
+++ s_hardrt.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64
+448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
diff --git
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vx
works.xml
b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vx
works.xml index b25165e0a54f..123e89c5c158 100644
---
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_vx
works.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uo
+++ s_vxworks.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">VXWORKS</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT."></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> diff --git
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_wa
ag.xml
b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_wa
ag.xml index eb68fe778f1d..03500086e3dc 100644
---
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uos_wa
ag.xml
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_1uo
+++ s_waag.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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> diff --git
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xm
l
b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xm
l index bf2220f76fb3..8a21c2b8ccef 100644
---
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xm
l
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry_launch_2uo
+++ s.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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> @@ -36,7 +36,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64
+448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
diff --git
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xm
l
b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xm
l index 4b05481d95a6..f0e93f80d61e 100644
---
a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xm
l
+++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laa
+++ g.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT.">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">vuart1(pty)</poweroff_channel>
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 07016fe3e13a..4e2434460bea 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_zep
+++ hyr.xml
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ZEPHYR</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">128</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it
+blank to disable GVT."></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>


Re: [PATCH 1/5] acrn-config: change from selectable behavior to editable for 'gvt_args'

Victor Sun
 

subject change to: acrn-config: change gvt_args from selectbox to editbox

On 12/12/2019 6:42 PM, Liu, WeiX W wrote:
1. In some vms does not need pci-gvt args or need specify configuration
for 'gvt_args' item tag, this patch change from selectable behavior to
editable for 'gvt_args' item from webUI.

2. Modify the description for gvt_args item tag from launch config xmls.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@...>
Acked-by: Victor Sun <victor.sun@...>
---
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 +--
.../xmls/config-xmls/apl-mrb/sdc_launch_1uos_aaag.xml | 2 +-
.../xmls/config-xmls/apl-mrb/sdc_launch_1uos_aliaag.xml | 2 +-
.../xmls/config-xmls/apl-mrb/sdc_launch_1uos_laag.xml | 2 +-
.../config-xmls/apl-up2-n3350/sdc_launch_1uos_laag.xml | 2 +-
.../xmls/config-xmls/apl-up2/sdc_launch_1uos_aaag.xml | 2 +-
.../xmls/config-xmls/apl-up2/sdc_launch_1uos_laag.xml | 2 +-
.../xmls/config-xmls/generic/hybrid_launch_1uos.xml | 2 +-
.../xmls/config-xmls/generic/industry_launch_1uos.xml | 2 +-
.../xmls/config-xmls/generic/industry_launch_2uos.xml | 4 ++--
.../xmls/config-xmls/generic/sdc_launch_1uos.xml | 2 +-
.../config-xmls/nuc6cayh/industry_launch_1uos_hardrt.xml | 2 +-
.../config-xmls/nuc6cayh/industry_launch_1uos_vxworks.xml | 2 +-
.../config-xmls/nuc6cayh/industry_launch_1uos_waag.xml | 2 +-
.../xmls/config-xmls/nuc6cayh/industry_launch_2uos.xml | 4 ++--
.../xmls/config-xmls/nuc6cayh/sdc_launch_1uos_laag.xml | 2 +-
.../xmls/config-xmls/nuc6cayh/sdc_launch_1uos_zephyr.xml | 2 +-
.../config-xmls/nuc7i7dnb/industry_launch_1uos_hardrt.xml | 2 +-
.../nuc7i7dnb/industry_launch_1uos_vxworks.xml | 2 +-
.../config-xmls/nuc7i7dnb/industry_launch_1uos_waag.xml | 2 +-
.../xmls/config-xmls/nuc7i7dnb/industry_launch_2uos.xml | 4 ++--
.../xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_laag.xml | 2 +-
.../xmls/config-xmls/nuc7i7dnb/sdc_launch_1uos_zephyr.xml | 2 +-
.../xmls/config-xmls/tgl-rvp/industry_launch_1uos.xml | 2 +-
.../whl-ipc-i5/industry_launch_1uos_hardrt.xml | 2 +-
.../whl-ipc-i5/industry_launch_1uos_vxworks.xml | 2 +-
.../config-xmls/whl-ipc-i5/industry_launch_1uos_waag.xml | 2 +-
.../xmls/config-xmls/whl-ipc-i5/industry_launch_2uos.xml | 4 ++--
.../xmls/config-xmls/whl-ipc-i5/sdc_launch_1uos_laag.xml | 2 +-
.../config-xmls/whl-ipc-i5/sdc_launch_1uos_zephyr.xml | 2 +-
.../whl-ipc-i7/industry_launch_1uos_hardrt.xml | 2 +-
.../whl-ipc-i7/industry_launch_1uos_vxworks.xml | 2 +-
.../config-xmls/whl-ipc-i7/industry_launch_1uos_waag.xml | 2 +-
.../xmls/config-xmls/whl-ipc-i7/industry_launch_2uos.xml | 4 ++--
.../xmls/config-xmls/whl-ipc-i7/sdc_launch_1uos_laag.xml | 2 +-
.../config-xmls/whl-ipc-i7/sdc_launch_1uos_zephyr.xml | 2 +-
39 files changed, 46 insertions(+), 47 deletions(-)

diff --git a/misc/acrn-config/launch_config/com.py b/misc/acrn-config/launch_config/com.py
index 246d13ee0dd6..420ab656f3bc 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):
@@ -546,7 +548,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 3349761e5090..8229664c8b5b 100644
--- a/misc/acrn-config/launch_config/launch_cfg_gen.py
+++ b/misc/acrn-config/launch_config/launch_cfg_gen.py
@@ -47,7 +47,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,poweroff_channel'] = launch_cfg_lib.PM_CHANNEL
- 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 215e6a20cef7..2c7a25f03e95 100644
--- a/misc/acrn-config/launch_config/launch_item.py
+++ b/misc/acrn-config/launch_config/launch_item.py
@@ -29,7 +29,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 dd7650dc015f..08fb8e2ce073 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']
@@ -464,7 +463,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
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 66a421b4618c..2b22cef4d69b 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ANDROID</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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">IOC</poweroff_channel>
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 b43ad2b282c5..d8a7e61b6d9b 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ALIOS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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">IOC</poweroff_channel>
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 90511685f01f..139d89885b07 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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">IOC</poweroff_channel>
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 528afb1e9f5e..84967fc6a09a 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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">PowerButton</poweroff_channel>
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 0859a9de80da..d94c476ede0e 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ANDROID</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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">PowerButton</poweroff_channel>
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 206407e5d42d..ef16dd2b6246 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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">PowerButton</poweroff_channel>
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 d55f351e4e98..1964f0535053 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type"></uos_type>
<rtos_type desc="UOS Realtime capability"></rtos_type>
<mem_size desc="UOS memory size in MByte"></mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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>
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 d0015e3c4c26..c48ec8127414 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type"></uos_type>
<rtos_type desc="UOS Realtime capability"></rtos_type>
<mem_size desc="UOS memory size in MByte"></mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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>
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 0dfec70b4bbc..ca95f4ed5c5f 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type"></uos_type>
<rtos_type desc="UOS Realtime capability"></rtos_type>
<mem_size desc="UOS memory size in MByte"></mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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>
@@ -35,7 +35,7 @@
<uos_type desc="UOS type"></uos_type>
<rtos_type desc="UOS Realtime capability"></rtos_type>
<mem_size desc="UOS memory size in MByte"></mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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>
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 00d2728a0206..67203e341f34 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type"></uos_type>
<rtos_type desc="UOS Realtime capability"></rtos_type>
<mem_size desc="UOS memory size in MByte"></mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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>
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 d4b6eabd4259..06aca8ff775c 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
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 a7ba20295455..e6aae79e5a87 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">VXWORKS</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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>
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 7be03f13bab3..21980572c44e 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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>
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 b85345af341f..0f16f322f990 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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>
@@ -36,7 +36,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
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 8c88640749cc..b73337a2917d 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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">vuart1(pty)</poweroff_channel>
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 de7b2238f61e..01262c2d8384 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ZEPHYR</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">128</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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>
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 a4cdacfc6688..5db7a02d0824 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
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 cc4e6dd74c46..e34f70ac5d7c 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">VXWORKS</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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>
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 fef692a25c25..ce231d88b829 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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>
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 441be21d8f3e..25730610a29f 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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>
@@ -36,7 +36,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
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 f4db6d8cd8f9..15080f7aaf65 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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">vuart1(pty)</poweroff_channel>
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 9600f0b63e29..3e1d537df013 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ZEPHYR</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">128</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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>
diff --git a/misc/acrn-config/xmls/config-xmls/tgl-rvp/industry_launch_1uos.xml b/misc/acrn-config/xmls/config-xmls/tgl-rvp/industry_launch_1uos.xml
index 7b0e6f19eb80..8be0d639243e 100644
--- a/misc/acrn-config/xmls/config-xmls/tgl-rvp/industry_launch_1uos.xml
+++ b/misc/acrn-config/xmls/config-xmls/tgl-rvp/industry_launch_1uos.xml
@@ -4,7 +4,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2000</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">64 448 8</gvt_args>
<vbootloader desc="">ovmf</vbootloader>
<rootfs_dev desc="">/dev/nvme0n1p3</rootfs_dev>
<rootfs_img desc="">/root/uos/uos.img</rootfs_img>
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 cc37940b0cb8..20e9d5a84114 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
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 4804ff4ae703..d10ee1411dee 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">VXWORKS</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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>
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 be255422c815..34b3853ca1d3 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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>
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 51796d27972a..c40e1bd2df16 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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>
@@ -36,7 +36,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
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 58ae645e2947..05e8f6af7469 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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">vuart1(pty)</poweroff_channel>
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 f0bf954020f2..3990dfbd6527 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ZEPHYR</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">128</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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>
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 daa4413b8d29..5fafaf1bc38a 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
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 b25165e0a54f..123e89c5c158 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">VXWORKS</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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>
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 eb68fe778f1d..03500086e3dc 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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>
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 bf2220f76fb3..8a21c2b8ccef 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">WINDOWS</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">4096</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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>
@@ -36,7 +36,7 @@
<uos_type desc="UOS type">PREEMPT-RT LINUX</uos_type>
<rtos_type desc="UOS Realtime capability">Hard RT</rtos_type>
<mem_size desc="UOS memory size in MByte">1024</mem_size>
- <gvt_args configurable="0" desc="GVT argument for the vm"></gvt_args>
+ <gvt_args configurable="0" desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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">vuart1(tty)</poweroff_channel>
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 4b05481d95a6..f0e93f80d61e 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">CLEARLINUX</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">2048</mem_size>
- <gvt_args desc="GVT argument for the vm">64 448 8</gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT.">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">vuart1(pty)</poweroff_channel>
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 07016fe3e13a..4e2434460bea 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
@@ -3,7 +3,7 @@
<uos_type desc="UOS type">ZEPHYR</uos_type>
<rtos_type desc="UOS Realtime capability">no</rtos_type>
<mem_size desc="UOS memory size in MByte">128</mem_size>
- <gvt_args desc="GVT argument for the vm"></gvt_args>
+ <gvt_args desc="GVT arguments. Recommendation is 64 448 8. Leave it blank to disable GVT."></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>


Re: [PATCH 2/5] acrn-config: add CONFIG_SERIAL_x for new board

Victor Sun
 

Acked-by: Victor Sun <victor.sun@...>

On 12/12/2019 6:42 PM, Wei Liu wrote:
Add CONFIG_SERIAL_x in $(borad).config, this will help to output
console log and help new board debug.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@...>
---
.../board_config/new_board_kconfig.py | 13 ++++++---
misc/acrn-config/library/board_cfg_lib.py | 4 ++-
misc/acrn-config/target/misc.py | 27 ++++++++++++++++++-
misc/acrn-config/xmls/board-xmls/apl-mrb.xml | 6 ++---
.../xmls/board-xmls/apl-up2-n3350.xml | 4 +--
misc/acrn-config/xmls/board-xmls/apl-up2.xml | 4 +--
6 files changed, 46 insertions(+), 12 deletions(-)

diff --git a/misc/acrn-config/board_config/new_board_kconfig.py b/misc/acrn-config/board_config/new_board_kconfig.py
index 75fecaaf1e00..bb431a67ea37 100644
--- a/misc/acrn-config/board_config/new_board_kconfig.py
+++ b/misc/acrn-config/board_config/new_board_kconfig.py
@@ -67,6 +67,7 @@ def get_ram_range():
def get_serial_type():
""" Get the serial type of consle which set by user """
ttys_type = ''
+ ttys_value = ''
# Get ttySx information from board config file
ttys_lines = board_cfg_lib.get_info(board_cfg_lib.BOARD_INFO_FILE, "<TTYS_INFO>", "</TTYS_INFO>")
@@ -85,11 +86,15 @@ def get_serial_type():
if ttyn in line:
# line format:
# seri:/dev/ttyS0 type:portio base:0x3F8 irq:4
- # seri:/dev/ttyS0 type:mmio base:0xB3640000 irq:4
+ # seri:/dev/ttyS0 type:mmio base:0xB3640000 irq:4 bdf:"0:x.y"
ttys_type = line.split()[1].split(':')[1]
+ if ttys_type == "portio":
+ ttys_value = line.split()[2].split(':')[1]
+ elif ttys_type == "mmio":
+ ttys_value = line.split()[-1].split(':')[1]
break
- return ttys_type
+ return (ttys_type, ttys_value)
def generate_file(config):
@@ -118,12 +123,14 @@ def generate_file(config):
print("{}".format(DESC), file=config)
print('CONFIG_BOARD="{}"'.format(board_cfg_lib.BOARD_NAME), file=config)
- serial_type = get_serial_type()
+ (serial_type, serial_value) = get_serial_type()
if serial_type == "portio":
print("CONFIG_SERIAL_LEGACY=y", file=config)
+ print("CONFIG_SERIAL_PIO_BASE={}".format(serial_value), file=config)
if serial_type == "mmio":
print("CONFIG_SERIAL_PCI=y", file=config)
+ print("CONFIG_SERIAL_PCI_BDF={}".format(serial_value), file=config)
print("CONFIG_HV_RAM_START={}".format(hex(hv_start_addr)), file=config)
print("CONFIG_HV_RAM_SIZE={}".format(hex(hv_ram_size)), file=config)
diff --git a/misc/acrn-config/library/board_cfg_lib.py b/misc/acrn-config/library/board_cfg_lib.py
index 02d745c93b4b..c31204001192 100644
--- a/misc/acrn-config/library/board_cfg_lib.py
+++ b/misc/acrn-config/library/board_cfg_lib.py
@@ -284,8 +284,10 @@ def get_valid_console():
if used_console_lines:
vuart0_valid_console.clear()
for console in used_console_lines:
+ #seri:/dev/ttySx type:mmio base:0x91526000 irq:4 bdf:"00:18.0"
+ #seri:/dev/ttySy type:portio base:0x2f8 irq:5
tty = console.split('/')[2].split()[0]
- ttys_irq = console.split(':')[-1].strip()
+ ttys_irq = console.split()[3].split(':')[1].strip()
NATIVE_CONSOLE_DIC[tty] = ttys_irq
vuart0_valid_console.append(tty)
if tty:
diff --git a/misc/acrn-config/target/misc.py b/misc/acrn-config/target/misc.py
index 396a05228049..f75b2869bddf 100644
--- a/misc/acrn-config/target/misc.py
+++ b/misc/acrn-config/target/misc.py
@@ -48,6 +48,30 @@ def detected_ttys():
return tty_used_list
+def irq2bdf(irq_n):
+ cmd = 'lspci -vv'
+ res = parser_lib.cmd_execute(cmd)
+ bdf = ''
+ irq = 0
+ while True:
+ line = res.stdout.readline().decode('ascii')
+ if not line:
+ break
+
+ if ':' not in line:
+ continue
+
+ if '.' in line.split()[0]:
+ bdf = line.split()[0]
+
+ if "Interrupt:" in line.strip():
+ irq = line.split()[-1]
+ if irq == irq_n and bdf:
+ break
+
+ return bdf
+
+
def dump_ttys_info(ttys_list, config):
for ttys in ttys_list:
ttys_n = ttys.split('/')[-1]
@@ -65,7 +89,8 @@ def dump_ttys_info(ttys_list, config):
elif ttys_type[serial_type] == 'MMIO':
base_path = '{}{}/iomem_base'.format(TTY_PATH, ttys_n)
base = read_ttys_node(base_path)
- print("\tseri:{} type:mmio base:{} irq:{}".format(ttys, base, irq), file=config)
+ bdf = irq2bdf(irq)
+ print('\tseri:{} type:mmio base:{} irq:{} bdf:"{}"'.format(ttys, base, irq, bdf), file=config)
def dump_ttys(config):
diff --git a/misc/acrn-config/xmls/board-xmls/apl-mrb.xml b/misc/acrn-config/xmls/board-xmls/apl-mrb.xml
index 336928fa406a..897a4a8d2d7c 100644
--- a/misc/acrn-config/xmls/board-xmls/apl-mrb.xml
+++ b/misc/acrn-config/xmls/board-xmls/apl-mrb.xml
@@ -278,9 +278,9 @@
</BLOCK_DEVICE_INFO>
<TTYS_INFO>
- seri:/dev/ttyS0 type:mmio base:0xB3640000 irq:4
- seri:/dev/ttyS2 type:mmio base:0x80E00000 irq:6
- seri:/dev/ttyS3 type:mmio base:0xB363A000 irq:7
+ seri:/dev/ttyS0 type:mmio base:0xB3640000 irq:4 bdf:"00:18.0"
+ seri:/dev/ttyS2 type:mmio base:0x80E00000 irq:6 bdf:"00:18.2"
+ seri:/dev/ttyS3 type:mmio base:0xB363A000 irq:7 bdf:"00:18.2"
</TTYS_INFO>
<AVAILABLE_IRQ_INFO>
diff --git a/misc/acrn-config/xmls/board-xmls/apl-up2-n3350.xml b/misc/acrn-config/xmls/board-xmls/apl-up2-n3350.xml
index 84bd32d1ae7a..7bc572a07cbf 100644
--- a/misc/acrn-config/xmls/board-xmls/apl-up2-n3350.xml
+++ b/misc/acrn-config/xmls/board-xmls/apl-up2-n3350.xml
@@ -257,8 +257,8 @@
</BLOCK_DEVICE_INFO>
<TTYS_INFO>
- seri:/dev/ttyS0 type:mmio base:0x91526000 irq:4
- seri:/dev/ttyS1 type:mmio base:0x91524000 irq:5
+ seri:/dev/ttyS0 type:mmio base:0x91526000 irq:4 bdf:"00:18.0"
+ seri:/dev/ttyS1 type:mmio base:0x91524000 irq:5 bdf:"00:18.1"
</TTYS_INFO>
<AVAILABLE_IRQ_INFO>
diff --git a/misc/acrn-config/xmls/board-xmls/apl-up2.xml b/misc/acrn-config/xmls/board-xmls/apl-up2.xml
index b955863fe428..a07c2467b6d4 100644
--- a/misc/acrn-config/xmls/board-xmls/apl-up2.xml
+++ b/misc/acrn-config/xmls/board-xmls/apl-up2.xml
@@ -257,8 +257,8 @@
</BLOCK_DEVICE_INFO>
<TTYS_INFO>
- seri:/dev/ttyS0 type:mmio base:0x91526000 irq:4
- seri:/dev/ttyS1 type:mmio base:0x91524000 irq:5
+ seri:/dev/ttyS0 type:mmio base:0x91526000 irq:4 bdf:"00:18.0"
+ seri:/dev/ttyS1 type:mmio base:0x91524000 irq:5 bdf:"00:18.1"
</TTYS_INFO>
<AVAILABLE_IRQ_INFO>

10541 - 10560 of 36656