Re: [RFC PATCH 0/4] KVM: x86/mmu: Rework marking folios dirty/accessed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 4/5/24 15:59, Sean Christopherson wrote:
Ya, from commit c13fda237f08 ("KVM: Assert that notifier count is elevated in

     x86 and MIPS are clearcut nops if the old SPTE is not-present, and that
     is guaranteed due to the prior invalidation.  PPC simply unmaps the SPTE,
     which again should be a nop due to the invalidation.  arm64 is a bit
     murky, but it's also likely a nop because kvm_pgtable_stage2_map() is
     called without a cache pointer, which means it will map an entry if and
     only if an existing PTE was found.

I'm 100% in favor of removing .change_pte().  As I've said multiple times, the
only reason I haven't sent a patch is because I didn't want it to prompt someone
into resurrecting the original behavior. 🙂

Ah, this indeed reminded me of discussions we had in the past. Patches sent now:

and I don't think anyone would try to resurrect the original behavior. It made some sense when there was an .invalidate_page() callback as well, but the whole thing started to crumble when .invalidate_page() was made sleepable, plus as David noticed it's very poorly documented where to use set_pte_at_notify() vs. set_pte_at().

As I wrote in the cover letter above, the only reason why it has never caused a bug is because it was doing nothing...


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux