hv: copy cr0/4 value when init secure world
Copy CR0 / CR4 value from normal world context to secure world context when init secure world. Signed-off-by: Binbin Wu <binbin.wu@intel.com> Acked-by: Wang Kai <kai.z.wang@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
e5d7d2db1c
commit
b55b808bfc
|
@ -351,6 +351,11 @@ static bool init_secure_world_env(struct vcpu *vcpu,
|
|||
TRUSTY_EPT_REBASE_GPA + size;
|
||||
vcpu->arch_vcpu.contexts[SECURE_WORLD].tsc_offset = 0;
|
||||
|
||||
vcpu->arch_vcpu.contexts[SECURE_WORLD].cr0 =
|
||||
vcpu->arch_vcpu.contexts[NORMAL_WORLD].cr0;
|
||||
vcpu->arch_vcpu.contexts[SECURE_WORLD].cr4 =
|
||||
vcpu->arch_vcpu.contexts[NORMAL_WORLD].cr4;
|
||||
|
||||
exec_vmwrite(VMX_GUEST_RSP,
|
||||
TRUSTY_EPT_REBASE_GPA + size);
|
||||
exec_vmwrite(VMX_TSC_OFFSET_FULL,
|
||||
|
|
Loading…
Reference in New Issue