mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
ANDROID: KVM: arm64: Expose kvm_flush_dcache_to_poc() in module_ops
Expose kvm_flush_dcache_to_poc() in the module_ops struct to allow CMOs from pKVM modules. Bug: 244543039 Bug: 244373730 Change-Id: I91d57a94effd2710d868591c6baf4a5672d149a4 Signed-off-by: Quentin Perret <qperret@google.com>
This commit is contained in:
@@ -15,6 +15,7 @@ struct pkvm_module_ops {
|
||||
void (*putx64)(u64 num);
|
||||
void *(*fixmap_map)(phys_addr_t phys);
|
||||
void (*fixmap_unmap)(void);
|
||||
void (*flush_dcache_to_poc)(void *addr, size_t size);
|
||||
};
|
||||
|
||||
struct pkvm_module_section {
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
#include <nvhe/mm.h>
|
||||
#include <nvhe/serial.h>
|
||||
|
||||
static void __kvm_flush_dcache_to_poc(void *addr, size_t size)
|
||||
{
|
||||
kvm_flush_dcache_to_poc((unsigned long)addr, (unsigned long)size);
|
||||
}
|
||||
|
||||
const struct pkvm_module_ops module_ops = {
|
||||
.create_private_mapping = __pkvm_create_private_mapping,
|
||||
.register_serial_driver = __pkvm_register_serial_driver,
|
||||
@@ -16,6 +21,7 @@ const struct pkvm_module_ops module_ops = {
|
||||
.putx64 = hyp_putx64,
|
||||
.fixmap_map = hyp_fixmap_map,
|
||||
.fixmap_unmap = hyp_fixmap_unmap,
|
||||
.flush_dcache_to_poc = __kvm_flush_dcache_to_poc,
|
||||
};
|
||||
|
||||
int __pkvm_init_module(void *module_init)
|
||||
|
||||
Reference in New Issue
Block a user