On 04/27/2012 01:00 AM, Marcelo Tosatti wrote:
> >
> > static void walk_shadow_page_lockless_end(struct kvm_vcpu *vcpu)
> > {
> > - /* Decrease the counter after walking shadow page table finished */
> > - smp_mb__before_atomic_dec();
> > - atomic_dec(&vcpu->kvm->arch.reader_counter);
> > - rcu_read_unlock();
> > + /*
> > + * Make our reads and writes to shadow page tables globally visible
> > + * before leaving READING_SHADOW_PAGE_TABLES mode.
> > + */
>
> This comment is misleading. Writes to shadow page tables must be
> performed with locked instructions outside the mmu_lock.
You are correct with respect to writes. I guess reads are immaterial
because they will be either protected by a write, or discarded.
--
error compiling committee.c: too many arguments to function
--
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