hv: pause all other vCPUs in same VM when do wbinvd emulation

Invalidate cache by scanning and flushing the whole guest memory is
inefficient which might cause long execution time for WBINVD emulation.
A long execution in hypervisor might cause a vCPU stuck phenomenon what
impact Windows Guest booting.

This patch introduce a workaround method that pausing all other vCPUs in
the same VM when do wbinvd emulation.

Tracked-On: #4703
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Shuo A Liu
2020-04-16 13:45:43 +08:00
committed by wenlingz
parent a335679ce9
commit 9a15ea82ee
4 changed files with 42 additions and 2 deletions

View File

@@ -93,6 +93,11 @@
*/
#define ACRN_REQUEST_INIT_VMCS 8U
/**
* @brief Request for sync waiting WBINVD
*/
#define ACRN_REQUEST_WAIT_WBINVD 9U
/**
* @}
*/
@@ -148,7 +153,8 @@ enum vm_cpu_mode {
#define VCPU_EVENT_IOREQ 0
#define VCPU_EVENT_VIRTUAL_INTERRUPT 1
#define VCPU_EVENT_NUM 2
#define VCPU_EVENT_SYNC_WBINVD 2
#define VCPU_EVENT_NUM 3
enum reset_mode;