Files
acrn-hypervisor/hypervisor/arch/x86/pm.c
Yin Fengwei c2be7fdedb hv: implement lowlevel S3 enter/wakeup
The S3 enter lowlevel routine saves the cpu context to memory
and enter S3 state

The S3 wakeup lowlevel routine restore cpu context and return.

Signed-off-by: Zheng Gen <gen.zheng@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-06-26 15:59:04 +08:00

17 lines
304 B
C

/*
* Copyright (C) <2018> Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <hypervisor.h>
struct run_context cpu_ctx;
void restore_msrs(void)
{
#ifdef STACK_PROTECTOR
struct stack_canary *psc = &get_cpu_var(stack_canary);
msr_write(MSR_IA32_FS_BASE, (uint64_t)psc);
#endif
}