Re: [PATCH v7 04/18] KVM: x86/mmu: Relax locking for kvm_test_age_gfn and kvm_age_gfn

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

 



On Wed, Sep 25, 2024 at 6:35 PM James Houghton <jthoughton@xxxxxxxxxx> wrote:
>
> Walk the TDP MMU in an RCU read-side critical section without holding
> mmu_lock when harvesting and potentially updating age information on
> sptes. This requires a way to do RCU-safe walking of the tdp_mmu_roots;
> do this with a new macro. The PTE modifications are now done atomically,
> and kvm_tdp_mmu_spte_need_atomic_write() has been updated to account for
> the fact that kvm_age_gfn can now lockless update the accessed bit and
> the W/R/X bits).
>
> If the cmpxchg for marking the spte for access tracking fails, leave it
> as is and treat it as if it were young, as if the spte is being actively
> modified, it is most likely young.
>
> Harvesting age information from the shadow MMU is still done while
> holding the MMU write lock.
>
> Suggested-by: Yu Zhao <yuzhao@xxxxxxxxxx>
> Signed-off-by: James Houghton <jthoughton@xxxxxxxxxx>

Oh no! I have left off David Matlack's Reviewed-bys[1, 2] from this
patch and from patch 2[3], and I failed to apply his comment
suggestion on this patch like I said I would. Sorry David, I have
fixed up my tree now.

[1]: https://lore.kernel.org/linux-mm/ZqJ_xANKf3bNcaHM@xxxxxxxxxx/
[2]: https://lore.kernel.org/linux-mm/ZqKUefN3HgBQQkuA@xxxxxxxxxx/
[3]: https://lore.kernel.org/kvm/20240926013506.860253-3-jthoughton@xxxxxxxxxx/





[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