Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1343011
| From | Xiao Guangrong <guangrong.xiao@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 09/12] KVM: MMU: coalesce zapping page after mmu_sync_children |
| Date | 2016-02-25 10:20 +0100 |
| Message-ID | <r60fw-1DX-13@gated-at.bofh.it> (permalink) |
| References | <r5Hwe-543-5@gated-at.bofh.it> <r5Hwe-543-21@gated-at.bofh.it> <r5TH5-5ok-53@gated-at.bofh.it> <r5YGK-qv-17@gated-at.bofh.it> <r5ZMv-1aJ-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 02/25/2016 04:49 PM, Paolo Bonzini wrote: > > > On 25/02/2016 08:35, Xiao Guangrong wrote: >>> This may release the mmu_lock before committing the zapping. >>> Is it safe? If so, we may want to see the reason in the changelog. >> >> It is unsafe indeed, please do not do it. > > Can you explain why? kvm_zap_obsolete_pages does the same. It's not the same, please see the comment in kvm_mmu_invalidate_zap_all_pages: /* * Notify all vcpus to reload its shadow page table * and flush TLB. Then all vcpus will switch to new * shadow page table with the new mmu_valid_gen. * * Note: we should do this under the protection of * mmu-lock, otherwise, vcpu would purge shadow page * but miss tlb flush. */ kvm_reload_remote_mmus(kvm); That means the tlb is flushed before releasing mmu-lock. A example is in rmap_write_protect(), when KVM creates a shadow page table for the the guest, it detects no spte pointing to the gfn, so tlb is not flushed so that guest can freely updates its pte.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 09/12] KVM: MMU: coalesce zapping page after mmu_sync_children Paolo Bonzini <pbonzini@redhat.com> - 2016-02-24 14:20 +0100
Re: [PATCH 09/12] KVM: MMU: coalesce zapping page after mmu_sync_children Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> - 2016-02-25 03:20 +0100
Re: [PATCH 09/12] KVM: MMU: coalesce zapping page after mmu_sync_children Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-02-25 08:40 +0100
Re: [PATCH 09/12] KVM: MMU: coalesce zapping page after mmu_sync_children Paolo Bonzini <pbonzini@redhat.com> - 2016-02-25 09:50 +0100
Re: [PATCH 09/12] KVM: MMU: coalesce zapping page after mmu_sync_children Xiao Guangrong <guangrong.xiao@linux.intel.com> - 2016-02-25 10:20 +0100
Re: [PATCH 09/12] KVM: MMU: coalesce zapping page after mmu_sync_children Paolo Bonzini <pbonzini@redhat.com> - 2016-02-25 11:00 +0100
Re: [PATCH 09/12] KVM: MMU: coalesce zapping page after mmu_sync_children Paolo Bonzini <pbonzini@redhat.com> - 2016-02-25 09:50 +0100
csiph-web