ANDROID: KVM: arm64: Expose hyp fixmap helpers in module_ops

Expose the hyp_fixmap helpers in the module_ops struct to allow dynamic
mapping and unmapping of pages from pKVM modules.

Bug: 244543039
Bug: 244373730
Change-Id: I201db6044ed5eb4c2821a64a6b650b931dd2e389
Signed-off-by: Quentin Perret <qperret@google.com>
This commit is contained in:
Quentin Perret
2022-10-26 08:44:34 +00:00
parent 29dceaf3d5
commit 4d4c9f9829
2 changed files with 4 additions and 0 deletions

View File

@@ -13,6 +13,8 @@ struct pkvm_module_ops {
int (*register_serial_driver)(void (*hyp_putc_cb)(char));
void (*puts)(const char *str);
void (*putx64)(u64 num);
void *(*fixmap_map)(phys_addr_t phys);
void (*fixmap_unmap)(void);
};
struct pkvm_module_section {

View File

@@ -14,6 +14,8 @@ const struct pkvm_module_ops module_ops = {
.register_serial_driver = __pkvm_register_serial_driver,
.puts = hyp_puts,
.putx64 = hyp_putx64,
.fixmap_map = hyp_fixmap_map,
.fixmap_unmap = hyp_fixmap_unmap,
};
int __pkvm_init_module(void *module_init)