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 and refine
software sram initializaion flow.

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-10 11:55:18 +08:00
committed by wenlingz
parent ea44bb6c4d
commit ae43b2a847
5 changed files with 43 additions and 7 deletions

View File

@@ -106,8 +106,9 @@ static void parse_rtct(void)
* Synchronization of AP and BSP is ensured, both inside and outside RTCM.
* BSP shall be the last to finish the call.
*/
void init_software_sram(bool is_bsp)
bool init_software_sram(bool is_bsp)
{
bool ret = true;
int32_t rtcm_ret_code;
struct rtcm_header *header;
rtcm_abi_func rtcm_command_func = NULL;
@@ -160,16 +161,19 @@ void init_software_sram(bool is_bsp)
pr_info("BSP Software SRAM has been initialized, base_hpa:0x%lx, top_hpa:0x%lx.\n",
software_sram_bottom_hpa, software_sram_top_hpa);
}
ret = disable_host_monitor_wait();
}
}
return ret;
}
#else
void set_rtct_tbl(__unused void *rtct_tbl_addr)
{
}
void init_software_sram(__unused bool is_bsp)
bool init_software_sram(__unused bool is_bsp)
{
return true;
}
#endif