On 30/10/21 09:58, David Woodhouse wrote:
Absolutely! The fixed version of kvm_map_gfn should not do any map/unmap, it should do it eagerly on MMU notifier operations.Staring at this some more... what*currently* protects a gfn_to_pfn_cache when the page tables change — either because userspace either mmaps something else over the same HVA, or the underlying page is just swapped out and restored?
kvm_cache_gfn_to_pfn calls gfn_to_pfn_memslot, which pins the page. Paolo