acrn-hypervisor/hypervisor/arch/x86/guest
Mingqiang Chi 229bf32eb5 hv:Refine destroy_secure_world API
-- add clear trusty memory flag
  In some cases such as UOS power off or UOS full reset,
  need to clear trusty memory,no need to clear memory such as
  UOS S3 or UOS system reset,then add a flag to distinguish it
  when destroy secure world.
-- Restore trusty memory to guest normal world.
-- Moved free trusty EPT inside destroy_secure_world
  In some cases such as UOS S3 or UOS system reset,
  only need to free trusty EPT, this patch move free
  trusty EPT inside destroy_secure_world.
  Because PD/PT are shared in both secure world's EPT
  and normal world's EPT,before freeing trusty EPT,
  it will memset all PDPTEs except trusty memory,
  then call 'free_ept_mem', it can only free trusty EPT,
  and does't affect shared normal world EPT.

v2-->v3:
    -- Used new mmu api ept_mr_add when restore trusty memory
       to SOS and normal world
    -- Dropped this patch "Removed reverted page tables for trusty memory"
       because map_mem will be removed in future
       It will have a patch, need to update this api(ept_mr_add),
       it will not create inverted page tables for trusty memory.

v1-->v2:
   -- free trusty ept
       still use free_ept_mem, not add a new api,but need to
       memset pdptes except trusty memory
   -- Removed reverted page tables for trusty memory.

Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2018-08-10 10:17:09 +08:00
..
guest.c hv: treewide: fix 'inline function should be declared static' 2018-08-10 10:16:04 +08:00
instr_emul.c hv: remove push/pop instruction emulation. 2018-08-09 14:46:13 +08:00
instr_emul.h HV: instr_emul: Remove dead code 2018-08-07 12:09:22 +08:00
mptable.c HV: Adding mptable support for partition mode ACRN 2018-08-03 13:36:40 +08:00
pm.c hv:cleanup vmid related code 2018-08-06 12:27:53 +08:00
ucode.c hv: get correct fault address for copy_to/from_gva 2018-08-09 14:46:13 +08:00
vcpu.c hv: init: rm the code of creating guest init page table 2018-08-09 16:43:58 +08:00
vioapic.c hv: treewide: fix 'Switch empty default has no comment' 2018-08-08 16:01:57 +08:00
vlapic_priv.h HV:VLAPIC:add suffix "_fn" for function pointer 2018-07-31 10:33:22 +08:00
vlapic.c hv: treewide: fix 'Switch empty default has no comment' 2018-08-08 16:01:57 +08:00
vm.c hv:Refine destroy_secure_world API 2018-08-10 10:17:09 +08:00
vmcall.c HV: trusty: new hypercall to save/restore context of secure world 2018-08-09 15:09:15 +08:00
vmsr.c vcpu: add get/set register APIs 2018-08-07 09:55:13 +08:00
vpic.c hv:cleanup vmid related code 2018-08-06 12:27:53 +08:00