Revert "ANDROID: KVM: arm64: Add hyp_memcache helpers for the kernel"

This reverts commit 16dd5fd0d4.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I483dd849964b690b9da1a17b784b3d1499ccf5c1
This commit is contained in:
Will Deacon
2022-07-07 15:51:32 +01:00
parent f325ce29e3
commit f41c4dd64b

View File

@@ -776,33 +776,6 @@ void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu)
}
}
static void hyp_mc_free_fn(void *addr, void *unused)
{
free_page((unsigned long)addr);
}
static void *hyp_mc_alloc_fn(void *unused)
{
return (void *)__get_free_page(GFP_KERNEL_ACCOUNT);
}
void free_hyp_memcache(struct kvm_hyp_memcache *mc)
{
if (is_protected_kvm_enabled())
__free_hyp_memcache(mc, hyp_mc_free_fn,
kvm_host_va, NULL);
}
static int topup_hyp_memcache(struct kvm_hyp_memcache *mc,
unsigned long min_pages)
{
if (!is_protected_kvm_enabled())
return 0;
return __topup_hyp_memcache(mc, min_pages, hyp_mc_alloc_fn,
kvm_host_pa, NULL);
}
/**
* kvm_phys_addr_ioremap - map a device range to guest IPA
*