Re: [PATCH v2] KVM: MMU: Don't use RCU for lockless shadow walking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux