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:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user