linux/arch/arm64/kvm/hyp
Quentin Perret 66c57edd3b KVM: arm64: Restrict EL2 stage-1 changes in protected mode
The host kernel is currently able to change EL2 stage-1 mappings without
restrictions thanks to the __pkvm_create_mappings() hypercall. But in a
world where the host is no longer part of the TCB, this clearly poses a
problem.

To fix this, introduce a new hypercall to allow the host to share a
physical memory page with the hypervisor, and remove the
__pkvm_create_mappings() variant. The new hypercall implements
ownership and permission checks before allowing the sharing operation,
and it annotates the shared page in the hypervisor stage-1 and host
stage-2 page-tables.

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-21-qperret@google.com
2021-08-11 11:39:52 +01:00
..
include KVM: arm64: Restrict EL2 stage-1 changes in protected mode 2021-08-11 11:39:52 +01:00
nvhe KVM: arm64: Restrict EL2 stage-1 changes in protected mode 2021-08-11 11:39:52 +01:00
vhe KVM: arm64: Move __adjust_pc out of line 2021-05-15 10:27:59 +01:00
aarch32.c KVM: arm64: Move kvm_vcpu_trap_il_is32bit into kvm_skip_instr32() 2020-11-10 08:34:24 +00:00
entry.S KVM: arm64: Save/restore MTE registers 2021-06-22 14:08:05 +01:00
exception.c KVM: arm64: Introduce MTE VM feature 2021-06-22 14:08:05 +01:00
fpsimd.S KVM: arm64: Rework SVE host-save/guest-restore 2021-03-18 13:57:37 +00:00
hyp-entry.S KVM: arm64: Handle physical FIQ as an IRQ while running a guest 2021-06-01 10:45:58 +01:00
Makefile KVM: arm64: Prepare the creation of s1 mappings at EL2 2021-03-19 12:01:21 +00:00
pgtable.c KVM: arm64: Enable retrieving protections attributes of PTEs 2021-08-11 11:39:51 +01:00
reserved_mem.c KVM: arm64: Unify MMIO and mem host stage-2 pools 2021-06-11 13:24:11 +01:00
vgic-v2-cpuif-proxy.c KVM: arm64: Remove hyp_symbol_addr 2021-01-23 14:01:00 +00:00
vgic-v3-sr.c KVM: arm64: Fix CPU interface MMIO compatibility detection 2021-03-24 17:26:38 +00:00