On Tue, May 28, 2024 at 06:22:34PM +0800, Tao Su wrote: >Drop the second snapshot of mmu_invalidate_seq in kvm_faultin_pfn(). >Before checking the mismatch of private vs. shared, mmu_invalidate_seq is >saved to fault->mmu_seq, which can be used to detect an invalidation >related to the gfn occurred, i.e. KVM will not install a mapping in page >table if fault->mmu_seq != mmu_invalidate_seq. > >Currently there is a second snapshot of mmu_invalidate_seq, which may not >be same as the first snapshot in kvm_faultin_pfn(), i.e. the gfn attribute >may be changed between the two snapshots, but the gfn may be mapped in >page table without hindrance. Therefore, drop the second snapshot as it >has no obvious benefits. > >Fixes: f6adeae81f35 ("KVM: x86/mmu: Handle no-slot faults at the beginning of kvm_faultin_pfn()") >Signed-off-by: Tao Su <tao1.su@xxxxxxxxxxxxxxx> Reviewed-by: Chao Gao <chao.gao@xxxxxxxxx>