mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-25 15:02:13 +00:00
hv: Add initialize pm.c
Now, we only add native msr save/restore functions. The native power related functions will be put to this file. Signed-off-by: Zheng Gen <gen.zheng@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
feed38f5ae
commit
74dfa425e0
@ -113,6 +113,7 @@ C_SRCS += arch/x86/assign.c
|
|||||||
C_SRCS += arch/x86/trusty.c
|
C_SRCS += arch/x86/trusty.c
|
||||||
C_SRCS += arch/x86/cpu_state_tbl.c
|
C_SRCS += arch/x86/cpu_state_tbl.c
|
||||||
C_SRCS += arch/x86/mtrr.c
|
C_SRCS += arch/x86/mtrr.c
|
||||||
|
C_SRCS += arch/x86/pm.c
|
||||||
C_SRCS += arch/x86/guest/vcpu.c
|
C_SRCS += arch/x86/guest/vcpu.c
|
||||||
C_SRCS += arch/x86/guest/vm.c
|
C_SRCS += arch/x86/guest/vm.c
|
||||||
C_SRCS += arch/x86/guest/instr_emul_wrapper.c
|
C_SRCS += arch/x86/guest/instr_emul_wrapper.c
|
||||||
|
14
hypervisor/arch/x86/pm.c
Normal file
14
hypervisor/arch/x86/pm.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) <2018> Intel Corporation
|
||||||
|
* SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
*/
|
||||||
|
#include <hypervisor.h>
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user