On 04/24/2012 05:47 PM, Avi Kivity wrote:
> static void kvm_mmu_commit_zap_page(struct kvm *kvm,
> struct list_head *invalid_list)
> {
> @@ -2021,17 +2006,17 @@ static void kvm_mmu_commit_zap_page(struct kvm *kvm,
> if (list_empty(invalid_list))
> return;
>
> - kvm_flush_remote_tlbs(kvm);
> -
> - if (atomic_read(&kvm->arch.reader_counter)) {
> - kvm_mmu_isolate_pages(invalid_list);
> - sp = list_first_entry(invalid_list, struct kvm_mmu_page, link);
> - list_del_init(invalid_list);
> + /*
> + * wmb: make sure everyone sees our modifications to the page tables
Other lockless vcpu can see a old-copy of a spte, but it is ok since all page
tables is valid to be used. (kvm_flush_remote_tlbs can stop page table to be
freed)
> + * rmb: make sure we see changes to vcpu->mode
It is the responsibility of kvm_flush_remote_tlbs to see changes to vcpu->mode.
No?
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html