mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
ANDROID: KVM: arm64: Expose __pkvm_create_private_mapping to pKVM modules
pKVM has an internal API allowing to create mappings in the 'private' range of the hypervisor VA space for which there are no rules constraining the VA-PA relation (hence comparable to the vmalloc area in the kernel). This will be a useful API for hypervisor modules, so expose it in the recently introduced module ops struct. Bug: 244543039 Bug: 244373730 Change-Id: I2a8f958a02c3c3b9871224b65b00b207820a507a Signed-off-by: Quentin Perret <qperret@google.com>
This commit is contained in:
@@ -3,9 +3,13 @@
|
||||
#ifndef __ARM64_KVM_PKVM_MODULE_H__
|
||||
#define __ARM64_KVM_PKVM_MODULE_H__
|
||||
|
||||
#include <asm/kvm_pgtable.h>
|
||||
#include <linux/export.h>
|
||||
|
||||
struct pkvm_module_ops {
|
||||
int (*create_private_mapping)(phys_addr_t phys, size_t size,
|
||||
enum kvm_pgtable_prot prot,
|
||||
unsigned long *haddr);
|
||||
};
|
||||
|
||||
struct pkvm_module_section {
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
#include <asm/kvm_pkvm_module.h>
|
||||
|
||||
#include <nvhe/modules.h>
|
||||
#include <nvhe/mm.h>
|
||||
|
||||
const struct pkvm_module_ops module_ops = {
|
||||
.create_private_mapping = __pkvm_create_private_mapping,
|
||||
};
|
||||
|
||||
int __pkvm_init_module(void *module_init)
|
||||
|
||||
Reference in New Issue
Block a user