mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-06 08:04:55 +00:00
hv: mmu: add pre-assumption for hpa2gpa
They're: (a) only SOS would use hpa2gpa and (b) the GPA and HPA in SOS is identical mapping. Rename hpa2gpa to vm0_hpa2gpa then. Tracked-On: #1124 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -45,7 +45,7 @@ static inline void *gpa2hva(struct vm *vm, uint64_t x)
|
||||
|
||||
static inline uint64_t hva2gpa(struct vm *vm, void *x)
|
||||
{
|
||||
return hpa2gpa(vm, hva2hpa(x));
|
||||
return (is_vm0(vm)) ? vm0_hpa2gpa(hva2hpa(x)) : INVALID_GPA;
|
||||
}
|
||||
|
||||
#endif /* !ASSEMBLER */
|
||||
|
||||
Reference in New Issue
Block a user