ANDROID: Revert "BACKPORT: FROMLIST: KVM: arm64: pkvm: Add __pkvm_host_add_remove_page()"

This reverts commit 61dced62ff.

This function is not used anymore.

Bug: 357781595
Bug: 384432312
Change-Id: Ib6a3202f8d3ebd57e325ff597a757bb0342e048a
Signed-off-by: Mostafa Saleh <smostafa@google.com>
This commit is contained in:
Mostafa Saleh
2024-12-20 13:59:49 +00:00
parent 5da8469f80
commit 87b9bddc64
2 changed files with 0 additions and 18 deletions
@@ -62,7 +62,6 @@ int __pkvm_guest_relinquish_to_host(struct pkvm_hyp_vcpu *vcpu,
u64 ipa, u64 *ppa);
int __pkvm_host_use_dma(u64 phys_addr, size_t size);
int __pkvm_host_unuse_dma(u64 phys_addr, size_t size);
int __pkvm_host_add_remove_page(u64 pfn, bool remove);
bool addr_is_memory(phys_addr_t phys);
int host_stage2_idmap_locked(phys_addr_t addr, u64 size, enum kvm_pgtable_prot prot);
-17
View File
@@ -2600,20 +2600,3 @@ int host_stage2_get_leaf(phys_addr_t phys, kvm_pte_t *ptep, s8 *level)
return ret;
}
/*
* Temporarily unmap a page from the host stage-2, if @remove is true, or put it
* back. After restoring the ownership to host, the page will be lazy-mapped.
*/
int __pkvm_host_add_remove_page(u64 pfn, bool remove)
{
int ret;
u64 host_addr = hyp_pfn_to_phys(pfn);
u8 owner = remove ? PKVM_ID_HYP : PKVM_ID_HOST;
host_lock_component();
ret = host_stage2_set_owner_locked(host_addr, PAGE_SIZE, owner);
host_unlock_component();
return ret;
}