Skip to content

Commit 8aaf3f7

Browse files
willdeaconoupton
authored andcommitted
KVM: arm64: Don't map 'kvm_vgic_global_state' at EL2 with pKVM
Now that 'kvm_vgic_global_state' is no longer needed for ICC_CTLR_EL1 emulation on machines with a broken SEIS implementation, drop the pKVM hypervisor mapping of the page. Note that kvm_vgic_global_state is still mapped in non-protected hypervisor configurations (i.e. {n,h}VHE) through the rodata section mapping. Cc: Marc Zyngier <[email protected]> Cc: Oliver Upton <[email protected]> Signed-off-by: Will Deacon <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent ad361ed commit 8aaf3f7

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

arch/arm64/kvm/hyp/nvhe/setup.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ static int recreate_hyp_mappings(phys_addr_t phys, unsigned long size,
9595
{
9696
void *start, *end, *virt = hyp_phys_to_virt(phys);
9797
unsigned long pgt_size = hyp_s1_pgtable_pages() << PAGE_SHIFT;
98-
enum kvm_pgtable_prot prot;
9998
int ret, i;
10099

101100
/* Recreate the hyp page-table using the early page allocator */
@@ -148,22 +147,6 @@ static int recreate_hyp_mappings(phys_addr_t phys, unsigned long size,
148147
}
149148

150149
pkvm_create_host_sve_mappings();
151-
152-
/*
153-
* Map the host sections RO in the hypervisor, but transfer the
154-
* ownership from the host to the hypervisor itself to make sure they
155-
* can't be donated or shared with another entity.
156-
*
157-
* The ownership transition requires matching changes in the host
158-
* stage-2. This will be done later (see finalize_host_mappings()) once
159-
* the hyp_vmemmap is addressable.
160-
*/
161-
prot = pkvm_mkstate(PAGE_HYP_RO, PKVM_PAGE_SHARED_OWNED);
162-
ret = pkvm_create_mappings(&kvm_vgic_global_state,
163-
&kvm_vgic_global_state + 1, prot);
164-
if (ret)
165-
return ret;
166-
167150
return 0;
168151
}
169152

0 commit comments

Comments
 (0)