summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/hyp/nvhe/mem_protect.c
diff options
context:
space:
mode:
authorQuentin Perret <qperret@google.com>2021-08-09 16:24:45 +0100
committerMarc Zyngier <maz@kernel.org>2021-08-11 11:39:51 +0100
commitad0e0139a8e163245d8f44ab4f6ec3bc9b08034d (patch)
treeece620a6dc97ce83679fa4a12a8d283f7d70cf30 /arch/arm64/kvm/hyp/nvhe/mem_protect.c
parent2c50166c62ba7f3c23c1bbdbb9324db462ddc97b (diff)
downloadlinux-stable-ad0e0139a8e163245d8f44ab4f6ec3bc9b08034d.tar.gz
linux-stable-ad0e0139a8e163245d8f44ab4f6ec3bc9b08034d.tar.bz2
linux-stable-ad0e0139a8e163245d8f44ab4f6ec3bc9b08034d.zip
KVM: arm64: Remove __pkvm_mark_hyp
Now that we mark memory owned by the hypervisor in the host stage-2 during __pkvm_init(), we no longer need to rely on the host to explicitly mark the hyp sections later on. Remove the __pkvm_mark_hyp() hypercall altogether. 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-19-qperret@google.com
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/mem_protect.c')
-rw-r--r--arch/arm64/kvm/hyp/nvhe/mem_protect.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/arch/arm64/kvm/hyp/nvhe/mem_protect.c b/arch/arm64/kvm/hyp/nvhe/mem_protect.c
index cb023d31666e..2991dc6996b9 100644
--- a/arch/arm64/kvm/hyp/nvhe/mem_protect.c
+++ b/arch/arm64/kvm/hyp/nvhe/mem_protect.c
@@ -339,25 +339,6 @@ unlock:
return ret;
}
-int __pkvm_mark_hyp(phys_addr_t start, phys_addr_t end)
-{
- int ret;
-
- /*
- * host_stage2_unmap_dev_all() currently relies on MMIO mappings being
- * non-persistent, so don't allow changing page ownership in MMIO range.
- */
- if (!range_is_memory(start, end))
- return -EINVAL;
-
- hyp_spin_lock(&host_kvm.lock);
- ret = host_stage2_try(kvm_pgtable_stage2_set_owner, &host_kvm.pgt,
- start, end - start, &host_s2_pool, pkvm_hyp_id);
- hyp_spin_unlock(&host_kvm.lock);
-
- return ret != -EAGAIN ? ret : 0;
-}
-
void handle_host_mem_abort(struct kvm_cpu_context *host_ctxt)
{
struct kvm_vcpu_fault_info fault;