Skip to content

Commit e6b1a69

Browse files
committed
KVM: x86/mmu: Drop repeated add() of to-be-invalidated range
Use kvm_unmap_gfn_range() instead of kvm_mmu_unmap_gfn_range() when handling memory attribute ranges now that common KVM adds the target range to the invalidation set, i.e. calls kvm_mmu_invalidate_range_add() before invoking the arch callback. Fixes: dcde045 ("KVM: x86/mmu: Handle page fault for private memory") Link: https://lore.kernel.org/r/20230921203331.3746712-11-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 69c7916 commit e6b1a69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/mmu/mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7272,7 +7272,7 @@ bool kvm_arch_pre_set_memory_attributes(struct kvm *kvm,
72727272
if (WARN_ON_ONCE(!kvm_arch_has_private_mem(kvm)))
72737273
return false;
72747274

7275-
return kvm_mmu_unmap_gfn_range(kvm, range);
7275+
return kvm_unmap_gfn_range(kvm, range);
72767276
}
72777277

72787278
static bool hugepage_test_mixed(struct kvm_memory_slot *slot, gfn_t gfn,

0 commit comments

Comments
 (0)