ANDROID: KVM: arm64: Expose puts and putx64 in pKVM ABI

Expose the hyp_puts() and hyp_putx64() helpers in the module_ops struct
to allow logging messages on the UART from pKVM modules.

Bug: 244543039
Bug: 244373730
Change-Id: Ica578667297e5a1f94c370603c29482be89982a9
Signed-off-by: Quentin Perret <qperret@google.com>
This commit is contained in:
Quentin Perret
2022-10-25 13:03:38 +00:00
parent b21ae4963d
commit 29dceaf3d5
2 changed files with 4 additions and 0 deletions

View File

@@ -11,6 +11,8 @@ struct pkvm_module_ops {
enum kvm_pgtable_prot prot,
unsigned long *haddr);
int (*register_serial_driver)(void (*hyp_putc_cb)(char));
void (*puts)(const char *str);
void (*putx64)(u64 num);
};
struct pkvm_module_section {

View File

@@ -12,6 +12,8 @@
const struct pkvm_module_ops module_ops = {
.create_private_mapping = __pkvm_create_private_mapping,
.register_serial_driver = __pkvm_register_serial_driver,
.puts = hyp_puts,
.putx64 = hyp_putx64,
};
int __pkvm_init_module(void *module_init)