mmu:create temporary page tables for guest at run time

Before this patch, guest temporary page tables were generated by hardcode
at compile time, HV will copy this page tables to guest before guest
launch.

This patch creates temporary page tables at runtime for the range of 0~4G,
and create page tables to cover new range(511G~511G+16M) with trusty
requirement.

Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Mingqiang Chi
2018-04-03 18:45:29 +08:00
committed by Jack Ren
parent 4d0f26d0e1
commit 9aa9a77457
11 changed files with 143 additions and 56 deletions

View File

@@ -124,7 +124,7 @@ int load_guest(struct vm *vm, struct vcpu *vcpu)
pr_info("VCPU%d Entry: 0x%llx, RSI: 0x%016llx, cr3: 0x%016llx",
vcpu->vcpu_id, vcpu->entry_addr,
cur_context->guest_cpu_regs.regs.rsi,
vm->arch_vm.guest_pml4);
vm->arch_vm.guest_init_pml4);
return ret;
}