ANDROID: KVM: arm64: Explicitely map kvm_vgic_global_state at EL2
The pkvm hypervisor may need to read the kvm_vgic_global_state variable at EL2. Make sure to explicitely map it in the its stage-1 page-table rather than relying on mapping all of .rodata. Signed-off-by: Quentin Perret <qperret@google.com> Bug: 225169428 Change-Id: I72d1eba78fb6b7593d236539cd81269480856fdf
This commit is contained in:
@@ -150,6 +150,10 @@ static int recreate_hyp_mappings(phys_addr_t phys, unsigned long size,
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
ret = pkvm_create_mappings(&kvm_vgic_global_state, &kvm_vgic_global_state + 1, prot);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
start = hyp_phys_to_virt(pvmfw_base);
|
start = hyp_phys_to_virt(pvmfw_base);
|
||||||
end = start + pvmfw_size;
|
end = start + pvmfw_size;
|
||||||
prot = pkvm_mkstate(PAGE_HYP, PKVM_PAGE_OWNED);
|
prot = pkvm_mkstate(PAGE_HYP, PKVM_PAGE_OWNED);
|
||||||
|
|||||||
Reference in New Issue
Block a user