hv: ept: store virtual address of EPT PML4 table

Most of the time, we use the virtual address of EPT PMl4 table,
not physical address.

Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Li, Fei1
2018-07-17 16:23:33 +08:00
committed by lijinxia
parent 23a5c74ac7
commit 1815a1bb01
8 changed files with 58 additions and 57 deletions

View File

@@ -25,7 +25,7 @@ int64_t hcall_world_switch(struct vcpu *vcpu)
return -EPERM;
}
if (vcpu->vm->arch_vm.sworld_eptp == 0U) {
if (vcpu->vm->arch_vm.sworld_eptp == NULL) {
pr_err("%s, Trusty is not initialized!\n", __func__);
return -EPERM;
}
@@ -44,7 +44,7 @@ int64_t hcall_initialize_trusty(struct vcpu *vcpu, uint64_t param)
return -EPERM;
}
if (vcpu->vm->arch_vm.sworld_eptp != 0U) {
if (vcpu->vm->arch_vm.sworld_eptp != NULL) {
pr_err("%s, Trusty already initialized!\n", __func__);
return -EPERM;
}