mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-13 11:33:58 +00:00
HV: trusty: refine secure_world_control
Define Bitmap flag to indicate secure world's state:
supported: 0(not supported), 1(supported)
active: 0(inactive), 1(active)
Refine secure_world_memory:
base_gpa_in_sos: base_gpa from SOS's view
base_gpa_in_uos: base_gpa from UOS's view, this is the original base_gpa
allocated by bootloader.
Recording above GPA is for usage of trusty EPT destroy and re-create.
There is an assumption: the secure world's memory address is contiguous
in both SOS and physical side.
Signed-off-by: Qi Yadong <yadong.qi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -175,8 +175,7 @@ void invept(struct vcpu *vcpu)
|
||||
desc.eptp = HVA2HPA(vcpu->vm->arch_vm.nworld_eptp) |
|
||||
(3UL << 3U) | 6UL;
|
||||
local_invept(INVEPT_TYPE_SINGLE_CONTEXT, desc);
|
||||
if (vcpu->vm->sworld_control.sworld_enabled &&
|
||||
vcpu->vm->arch_vm.sworld_eptp != NULL) {
|
||||
if (vcpu->vm->sworld_control.flag.active) {
|
||||
desc.eptp = HVA2HPA(vcpu->vm->arch_vm.sworld_eptp)
|
||||
| (3UL << 3U) | 6UL;
|
||||
local_invept(INVEPT_TYPE_SINGLE_CONTEXT, desc);
|
||||
|
||||
Reference in New Issue
Block a user