mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
ANDROID: KVM: arm64: Avoid unnecessary unmap walk in MEM_RELINQUISH hypercall
If the mapping is determined to be not present in an earlier walk, attempting the unmap is pointless. Bug: 259217067 Change-Id: I6fd939556b80d7a9a0731cab36166a652f7a7c6d Signed-off-by: Keir Fraser <keirf@google.com>
This commit is contained in:
@@ -372,7 +372,7 @@ int __pkvm_guest_relinquish_to_host(struct pkvm_hyp_vcpu *vcpu,
|
||||
ret = kvm_pgtable_walk(&vm->pgt, ipa, PAGE_SIZE, &walker);
|
||||
|
||||
/* Zap the guest stage2 pte. */
|
||||
if (!ret)
|
||||
if (!ret && data.pa)
|
||||
kvm_pgtable_stage2_unmap(&vm->pgt, ipa, PAGE_SIZE);
|
||||
|
||||
guest_unlock_component(vm);
|
||||
|
||||
Reference in New Issue
Block a user