On Tue, 2021-11-16 at 11:21 +0100, Paolo Bonzini wrote: > > Queued patches 2-8 as well. Thanks. These finally made it out to git.kernel.org and I see one of them has been afflicted by mojibake. commit d79f9da821fda5cbc5383a2d9b16a12c962cb772 Author: David Woodhouse <dwmw@xxxxxxxxxxxx> Date: Mon Nov 15 16:50:27 2021 +0000 KVM: Kill kvm_map_gfn() / kvm_unmap_gfn() and gfn_to_pfn_cache In commit 7e2175ebd695 ("KVM: x86: Fix recording of guest steal time / preempted status") I removed the only user of these functions because it was basically impossible to use them safely. There are two stages to the GFN → PFN mapping; first through the KVM memslots to a userspace HVA and then through the page tables to translate that HVA to an underlying PFN. Invalidations of the former were being handled correctly, but no attempt was made to use the MMU notifiers to invalidate the cache when the HVA→GFN mapping changed. As a prelude to reinventing the gfn_to_pfn_cache with more usable semantics, rip it out entirely and untangle the implementation of the unsafe kvm_vcpu_map()/kvm_vcpu_unmap() functions from it. All current users of kvm_vcpu_map() also look broken right now, and will be dealt with separately. They broadly fall into two classes: • Those which map, access the data and immediately unmap. This is mostly gratuitous and could just as well use the existing user HVA, and could probably benefit from a gfn_to_hva_cache as they do so. • Those which keep the mapping around for a longer time, perhaps even using the PFN directly from the guest. These will need to be converted to the new gfn_to_pfn_cache and then kvm_vcpu_map() can be removed too. Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx> Message-Id: <20211115165030.7422-8-dwmw2@xxxxxxxxxxxxx> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Attachment:
smime.p7s
Description: S/MIME cryptographic signature