diff --git a/hypervisor/Makefile b/hypervisor/Makefile index 26dc5b148..a94db62e9 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -113,6 +113,7 @@ C_SRCS += arch/x86/assign.c C_SRCS += arch/x86/trusty.c C_SRCS += arch/x86/cpu_state_tbl.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/vm.c C_SRCS += arch/x86/guest/instr_emul_wrapper.c diff --git a/hypervisor/arch/x86/pm.c b/hypervisor/arch/x86/pm.c new file mode 100644 index 000000000..4ee6ec2fe --- /dev/null +++ b/hypervisor/arch/x86/pm.c @@ -0,0 +1,14 @@ +/* + * Copyright (C) <2018> Intel Corporation + * SPDX-License-Identifier: BSD-3-Clause + */ +#include + +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 +}