UPSTREAM: KVM: arm64: Expose pkvm_hyp_id

Allow references to the hypervisor's owner id from outside
mem_protect.c.

Signed-off-by: Quentin Perret <qperret@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210809152448.1810400-15-qperret@google.com
(cherry picked from commit 2d77e238ba)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 198418208
Change-Id: I7b61c5f9a86de802c740be12d93befa280d84e18
This commit is contained in:
Quentin Perret
2021-08-09 16:24:41 +01:00
committed by Will Deacon
parent ee7f981451
commit 08d3caa584
2 changed files with 3 additions and 1 deletions

View File

@@ -46,6 +46,8 @@ struct host_kvm {
};
extern struct host_kvm host_kvm;
extern const u8 pkvm_hyp_id;
int __pkvm_prot_finalize(void);
int __pkvm_mark_hyp(phys_addr_t start, phys_addr_t end);

View File

@@ -31,7 +31,7 @@ static struct hyp_pool host_s2_pool;
u64 id_aa64mmfr0_el1_sys_val;
u64 id_aa64mmfr1_el1_sys_val;
static const u8 pkvm_hyp_id = 1;
const u8 pkvm_hyp_id = 1;
static void *host_s2_zalloc_pages_exact(size_t size)
{