ANDROID: KVM: arm64: Use unmap for pKVM guests memory relinquish
Previously, annotate was used when a guest relinquishes memory. The intension was to allow splitting an existing block. However we are moving away from this mechanism (which came with a list of serious issues). Relinquish will now on only happen on level-3 mappings and therefore we can restore the unmap. Bug: 419518210 Bug: 419548963 Bug: 278011447 Change-Id: I4e7d2af3683cf2b189b1580f39d543d83cac644f Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
This commit is contained in:
@@ -437,8 +437,7 @@ int __pkvm_guest_relinquish_to_host(struct pkvm_hyp_vcpu *vcpu,
|
||||
goto end;
|
||||
|
||||
/* Zap the guest stage2 pte and return ownership to the host */
|
||||
ret = kvm_pgtable_stage2_annotate(&vm->pgt, ipa, PAGE_SIZE,
|
||||
&vcpu->vcpu.arch.stage2_mc, 0);
|
||||
ret = kvm_pgtable_stage2_unmap(&vm->pgt, ipa, PAGE_SIZE);
|
||||
if (ret)
|
||||
goto end;
|
||||
|
||||
|
Reference in New Issue
Block a user