mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-23 05:57:33 +00:00
hv:unmap AP trampoline region from service VM's EPT
AP trampoline code should be accessile to hypervisor only, Unmap this memory region from service VM's EPT mapping for security reason.. Tracked-On: #4112 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
parent
52a968db2f
commit
66d824d677
@ -9,6 +9,7 @@
|
||||
#include <multiboot.h>
|
||||
#include <reloc.h>
|
||||
#include <e820.h>
|
||||
#include <trampoline.h>
|
||||
|
||||
#define ACRN_DBG_GUEST 6U
|
||||
|
||||
@ -507,5 +508,14 @@ int32_t prepare_vm0_memmap(struct acrn_vm *vm)
|
||||
*/
|
||||
hv_hpa = get_hv_image_base();
|
||||
ept_mr_del(vm, pml4_page, hv_hpa, CONFIG_HV_RAM_SIZE);
|
||||
|
||||
/* unmap AP trampoline code for security reason.
|
||||
* 'allocate_pages()' in efi boot mode or
|
||||
* 'e820_alloc_low_memory()' in direct boot
|
||||
* mode will ensure the base address of tramploline
|
||||
* code be page-aligned.
|
||||
*/
|
||||
ept_mr_del(vm, pml4_page, trampoline_start16_paddr, CONFIG_LOW_RAM_SIZE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user