Revert "ANDROID: KVM: arm64: Add __pkvm_hyp_donate_host()"

This reverts commit 394b00e804.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I2431d37b0e202fd38c5f7ffb84995d7aa6fccb9b
This commit is contained in:
Will Deacon
2022-07-07 15:51:42 +01:00
parent 168c93f276
commit 607636d2eb
2 changed files with 0 additions and 33 deletions

View File

@@ -57,7 +57,6 @@ int __pkvm_prot_finalize(void);
int __pkvm_host_share_hyp(u64 pfn);
int __pkvm_host_unshare_hyp(u64 pfn);
int __pkvm_host_donate_hyp(u64 pfn, u64 nr_pages);
int __pkvm_hyp_donate_host(u64 pfn, u64 nr_pages);
bool addr_is_memory(phys_addr_t phys);
int host_stage2_idmap_locked(phys_addr_t addr, u64 size, enum kvm_pgtable_prot prot);

View File

@@ -1069,35 +1069,3 @@ int __pkvm_host_donate_hyp(u64 pfn, u64 nr_pages)
return ret;
}
int __pkvm_hyp_donate_host(u64 pfn, u64 nr_pages)
{
int ret;
u64 host_addr = hyp_pfn_to_phys(pfn);
u64 hyp_addr = (u64)__hyp_va(host_addr);
struct pkvm_mem_donation donation = {
.tx = {
.nr_pages = nr_pages,
.initiator = {
.id = PKVM_ID_HYP,
.addr = hyp_addr,
.hyp = {
.completer_addr = host_addr,
},
},
.completer = {
.id = PKVM_ID_HOST,
},
},
};
host_lock_component();
hyp_lock_component();
ret = do_donate(&donation);
hyp_unlock_component();
host_unlock_component();
return ret;
}