On Mon, Aug 27, 2012 at 04:04:44PM +0800, Xiao Guangrong wrote: > On 08/25/2012 02:54 AM, Marcelo Tosatti wrote: > > Other arches do not need this. > > > > Signed-off-by: Marcelo Tosatti <mtosa...@redhat.com> > > > > Index: kvm/arch/x86/kvm/x86.c > > =================================================================== > > --- kvm.orig/arch/x86/kvm/x86.c > > +++ kvm/arch/x86/kvm/x86.c > > @@ -6455,6 +6455,14 @@ void kvm_arch_commit_memory_region(struc > > kvm_mmu_change_mmu_pages(kvm, nr_mmu_pages); > > kvm_mmu_slot_remove_write_access(kvm, mem->slot); > > spin_unlock(&kvm->mmu_lock); > > + /* > > + * If the new memory slot is created, we need to clear all > > + * mmio sptes. > > + */ > > + if (old.npages == 0 && npages) { > > + kvm_mmu_zap_all(kvm); > > + kvm_reload_remote_mmus(kvm); > > + } > > Can not use kvm_arch_flush_shadow_all()?
Better reduce it to necessary cases only. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html