hv: refine the address used in sbl multiboot code

Update the structure definition to define the address type
(HVA vs HPA vs GPA) explicitly.

Convert address to HVA before access the GPA/HPA type of address.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
Yin Fengwei
2018-06-20 16:42:56 +08:00
committed by lijinxia
parent 437ed88588
commit 3892bd0455
4 changed files with 30 additions and 24 deletions

View File

@@ -34,6 +34,7 @@
#define HVA2HPA(x) ((uint64_t)(x))
/* gpa --> hpa -->hva */
#define GPA2HVA(vm, x) HPA2HVA(gpa2hpa(vm, x))
#define HVA2GPA(vm, x) hpa2gpa(vm, HVA2HPA(x))
#endif /* !ASSEMBLER */
#endif /* HYPERVISOR_H */