]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: pfncache: Move invalidation to invalidate_range_end hook
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 21 Aug 2024 20:18:14 +0000 (21:18 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 21 Aug 2024 20:18:14 +0000 (21:18 +0100)
commitb03f63695df098f961af0310f7da4622b1c098cd
tree5facb4468adf06d57f2919a465b47b411a2bb17c
parent1f86d94cd45d4ea1bbf2e2173995c75187599d52
KVM: pfncache: Move invalidation to invalidate_range_end hook

By performing the invalidation from the 'end' hook, the process is a lot
cleaner and simpler because it is guaranteed that ->needs_invalidation
will be cleared after hva_to_pfn() has been called, so the only thing
that hva_to_pfn_retry() needs to do is *wait* for there to be no pending
invalidations.

Another false positive on the range based checks is thus removed as well.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
virt/kvm/kvm_main.c
virt/kvm/kvm_mm.h
virt/kvm/pfncache.c