hv: disable host MONITOR-WAIT support when SW SRAM is enabled

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 hypervisor(host) MONITOR-WAIT support.

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-08 09:13:35 +08:00
committed by wenlingz
parent fdc2903d5e
commit 92bbd3ff48
5 changed files with 48 additions and 7 deletions

View File

@@ -46,6 +46,7 @@ struct cpuinfo_x86 {
};
bool has_monitor_cap(void);
bool disable_host_monitor_wait(void);
bool is_apl_platform(void);
bool is_apicv_advanced_feature_supported(void);
bool pcpu_has_cap(uint32_t bit);

View File

@@ -26,7 +26,7 @@ struct rtcm_header {
uint64_t command_offset;
} __packed;
void init_software_sram(bool is_bsp);
bool init_software_sram(bool is_bsp);
void set_rtct_tbl(void *rtct_tbl_addr);
bool is_software_sram_enabled(void);
#endif /* RTCM_H */