ANDROID: KVM: arm64: Expose hyp_va to modules

Modules will need to convert physical addresses in EL2 linear map
addresses, so expose hyp_va to modules.

Bug: 264070847
Change-Id: I641ab3943a029072c351f5a422e2d9d2cbb240be
Signed-off-by: Quentin Perret <qperret@google.com>
This commit is contained in:
Quentin Perret
2023-01-17 07:57:22 +00:00
parent 5d606fda6d
commit fc4c55e592
2 changed files with 2 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ struct pkvm_module_ops {
void* (*memcpy)(void *to, const void *from, size_t count);
void* (*memset)(void *dst, int c, size_t count);
phys_addr_t (*hyp_pa)(void *x);
void* (*hyp_va)(phys_addr_t phys);
unsigned long (*kern_hyp_va)(unsigned long x);
};

View File

@@ -115,6 +115,7 @@ const struct pkvm_module_ops module_ops = {
.memcpy = memcpy,
.memset = memset,
.hyp_pa = hyp_virt_to_phys,
.hyp_va = hyp_phys_to_virt,
.kern_hyp_va = __kern_hyp_va,
};