Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit f67eff4

Browse files
eberman-quicQuentin Perret
authored andcommitted
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: 162a447 ("FROMLIST: virt: gunyah: Add interfaces to map memory into guest address space") Change-Id: I7848754bba92cf6e9ed6525141955a9626b20228 Signed-off-by: Elliot Berman <[email protected]>
1 parent 14bff9b commit f67eff4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/virt/gunyah/vm_mgr_mem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ int gunyah_vm_reclaim_range(struct gunyah_vm *ghvm, u64 gfn, u64 nr)
329329
mt_for_each(&ghvm->mm, entry, next, gfn + nr) {
330330
folio = xa_untag_pointer(entry);
331331
g = next;
332-
sync = !!mt_find_after(&ghvm->mm, &g, gfn + nr);
332+
sync = !mt_find_after(&ghvm->mm, &g, gfn + nr);
333333

334334
g = next - folio_nr_pages(folio);
335335
folio_get(folio);

0 commit comments

Comments
 (0)