hv: disable guest MONITOR-WAIT support when SW SRAM is configured

Per-core software SRAM L2 cache may be flushed by 'mwait'
extension instruction, which guest VM may execute to enter
core deep sleep. Such kind of flushing is not expected when
software SRAM is enabled for RTVM.

Hypervisor disables MONITOR-WAIT support on both hypervisor
and VMs sides to protect above software SRAM from being flushed.

This patch disable ACRN guest MONITOR-WAIT support if software
SRAM is configured.

Tracked-On: #5649
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Yonghua Huang
2021-03-03 15:51:10 +08:00
committed by wenlingz
parent ae43b2a847
commit 1a011bd91b
4 changed files with 18 additions and 19 deletions

View File

@@ -130,6 +130,7 @@ struct vm_arch {
struct iwkey iwkey_backup;
/* reference to virtual platform to come here (as needed) */
bool vm_mwait_cap;
} __aligned(PAGE_SIZE);
struct acrn_vm {