From: Avi Kivity Date: Wed, 4 Jun 2008 15:42:24 +0000 (+0300) Subject: KVM: MMU: reschedule during shadow teardown X-Git-Tag: v2.6.26-rc6~11^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8d2d73b9a5c35f2c6abf427afba7888cfc4cc65d;p=linux-2.6-omap-h63xx.git KVM: MMU: reschedule during shadow teardown Shadows for large guests can take a long time to tear down, so reschedule occasionally to avoid softlockup warnings. Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 7246b60afb9..c2fd6a4a58c 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -1858,6 +1858,7 @@ static void free_mmu_pages(struct kvm_vcpu *vcpu) sp = container_of(vcpu->kvm->arch.active_mmu_pages.next, struct kvm_mmu_page, link); kvm_mmu_zap_page(vcpu->kvm, sp); + cond_resched(); } free_page((unsigned long)vcpu->arch.mmu.pae_root); }