mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
hv:add destroy Secure world API
This patch added API destroy_secure_world, which will do: -- clear trusty memory space -- restore memory to SOS ept mapping It will be called when VM is destroyed, furthermore, ept of Secure world will be destroyed as well. Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Reviewed-by: Anthony Xu <anthony.xu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -208,6 +208,9 @@ int shutdown_vm(struct vm *vm)
|
||||
/* cleanup and free vioapic */
|
||||
vioapic_cleanup(vm->arch_vm.virt_ioapic);
|
||||
|
||||
/* Destroy secure world */
|
||||
if (vm->sworld_control.sworld_enabled)
|
||||
destroy_secure_world(vm);
|
||||
/* Free EPT allocated resources assigned to VM */
|
||||
destroy_ept(vm);
|
||||
|
||||
|
Reference in New Issue
Block a user