Re: [PATCH 1/2] KVM: x86/mmu: Don't check old SPTE permissions when trying to unsync

From: Sean Christopherson

Date: Fri Apr 03 2026 - 11:25:19 EST


On Fri, 23 Jan 2026 17:03:02 +0800, Lai Jiangshan wrote:
> Commit ecc5589f19a5 ("KVM: MMU: optimize set_spte for page sync") added
> a writable permission check on the old SPTE to avoid unnecessary calls
> to mmu_try_to_unsync_pages() when syncing SPTEs.
>
> Later, commit e6722d9211b2 ("KVM: x86/mmu: Reduce the update to the spte
> in FNAME(sync_spte)") indirectly achieves it by avoiding some SPTE
> updates altogether, which makes the writable permission check in
> make_spte() much less useful.
>
> [...]

Applied patch 2 to kvm-x86 mmu, with my proposed tweaks.

[1/2] KVM: x86/mmu: Don't check old SPTE permissions when trying to unsync
SKIP, for now.
[2/2] KVM: x86/mmu: KVM: x86/mmu: Skip unsync when large pages are allowed
https://github.com/kvm-x86/linux/commit/b3ae3ceb5569

--
https://github.com/kvm-x86/linux/tree/next