diff --git a/hypervisor/arch/x86/trusty.c b/hypervisor/arch/x86/trusty.c index b767a9c4b..01e21c6bf 100644 --- a/hypervisor/arch/x86/trusty.c +++ b/hypervisor/arch/x86/trusty.c @@ -387,8 +387,12 @@ static bool init_secure_world_env(struct vcpu *vcpu, vcpu->arch_vcpu.contexts[SECURE_WORLD].rip = entry_gpa; vcpu->arch_vcpu.contexts[SECURE_WORLD].rsp = TRUSTY_EPT_REBASE_GPA + size; + vcpu->arch_vcpu.contexts[SECURE_WORLD].tsc_offset = 0; + exec_vmwrite(VMX_GUEST_RSP, TRUSTY_EPT_REBASE_GPA + size); + exec_vmwrite(VMX_TSC_OFFSET_FULL, + vcpu->arch_vcpu.contexts[SECURE_WORLD].tsc_offset); return setup_trusty_info(vcpu, size, base_hpa); }