ANDROID: virt: gunyah: Sync on last folio in reclaim
When reclaiming multiple folios, Gunyah allows the host to skip sync
operation to speed up the reclaim. The sync can occur on the last folio
to be reclaimed. The logic was flipped, correct it.
Fixes: 162a44744e7e ("FROMLIST: virt: gunyah: Add interfaces to map memory into guest address space")
Change-Id: I7848754bba92cf6e9ed6525141955a9626b20228
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Signed-off-by: Elliot Berman <elliot.berman@oss.qualcomm.com>
This commit is contained in:
committed by
Treehugger Robot
parent
324fcc6bc0
commit
1f2b2e3455
@@ -329,7 +329,7 @@ int gunyah_vm_reclaim_range(struct gunyah_vm *ghvm, u64 gfn, u64 nr)
|
||||
mt_for_each(&ghvm->mm, entry, next, gfn + nr) {
|
||||
folio = xa_untag_pointer(entry);
|
||||
g = next;
|
||||
sync = !!mt_find_after(&ghvm->mm, &g, gfn + nr);
|
||||
sync = !mt_find_after(&ghvm->mm, &g, gfn + nr);
|
||||
|
||||
g = next - folio_nr_pages(folio);
|
||||
folio_get(folio);
|
||||
|
||||
Reference in New Issue
Block a user