diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 4b93fcdf08397429b4e7c1be1be0862d7af7ee39..81618070367b0678f9d63ff5465be43d38b9fda6 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -5871,8 +5871,11 @@ static void kvm_mmu_zap_mmio_sptes(struct kvm *kvm) list_for_each_entry_safe(sp, node, &kvm->arch.active_mmu_pages, link) { if (!sp->mmio_cached) continue; - if (__kvm_mmu_prepare_zap_page(kvm, sp, &invalid_list, &ign) || - cond_resched_lock(&kvm->mmu_lock)) + if (__kvm_mmu_prepare_zap_page(kvm, sp, &invalid_list, &ign)) { + WARN_ON_ONCE(1); + goto restart; + } + if (cond_resched_lock(&kvm->mmu_lock)) goto restart; }