Skip to content

Commit adc99a6

Browse files
committed
Merge tag 'kvm-x86-mmu-6.19' of https://github.com/kvm-x86/linux into HEAD
KVM x86 MMU changes for 6.19: - Skip the costly "zap all SPTEs" on an MMIO generation wrap if MMIO SPTE caching is disabled, as there can't be any relevant SPTEs to zap. - Relocate a misplace export.
2 parents b0bf3d6 + 6422060 commit adc99a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arch/x86/kvm/mmu/mmu.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6863,6 +6863,7 @@ void kvm_zap_gfn_range(struct kvm *kvm, gfn_t gfn_start, gfn_t gfn_end)
68636863

68646864
write_unlock(&kvm->mmu_lock);
68656865
}
6866+
EXPORT_SYMBOL_FOR_KVM_INTERNAL(kvm_zap_gfn_range);
68666867

68676868
static bool slot_rmap_write_protect(struct kvm *kvm,
68686869
struct kvm_rmap_head *rmap_head,
@@ -7204,7 +7205,6 @@ static bool kvm_mmu_zap_collapsible_spte(struct kvm *kvm,
72047205

72057206
return need_tlb_flush;
72067207
}
7207-
EXPORT_SYMBOL_FOR_KVM_INTERNAL(kvm_zap_gfn_range);
72087208

72097209
static void kvm_rmap_zap_collapsible_sptes(struct kvm *kvm,
72107210
const struct kvm_memory_slot *slot)
@@ -7364,6 +7364,9 @@ void kvm_mmu_invalidate_mmio_sptes(struct kvm *kvm, u64 gen)
73647364
{
73657365
WARN_ON_ONCE(gen & KVM_MEMSLOT_GEN_UPDATE_IN_PROGRESS);
73667366

7367+
if (!enable_mmio_caching)
7368+
return;
7369+
73677370
gen &= MMIO_SPTE_GEN_MASK;
73687371

73697372
/*

0 commit comments

Comments
 (0)