[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2 of 4] xenpaging: use wait queues
Hi, Is there a more recent version of this patch? I see a newer version of the wait-queues-for-mem-events one but not of this. At 12:09 +0100 on 01 Dec (1322741358), Olaf Hering wrote: > # HG changeset patch > # User Olaf Hering <olaf@xxxxxxxxx> > # Date 1322737507 -3600 > # Node ID 8147822efdee65d1f5b94656ab2032aedb76979f > # Parent 612f69531fd15cf59c58404f6e4762733a9a268c > xenpaging: use wait queues > > Use a wait queue to put a guest vcpu to sleep while the requested gfn is > in paging state. This adds missing p2m_mem_paging_populate() calls to > some callers of the new get_gfn* variants, which would crash now > because they get an invalid mfn. It also fixes guest crashes due to > unexpected returns from do_memory_op because copy_to/from_guest ran into > a paged gfn. Now those places will always get a valid mfn. > > Since each gfn could be requested by several guest vcpus at the same > time a queue of paged gfns is maintained. Each vcpu will be attached to > that queue. Once p2m_mem_paging_resume restored the gfn the waiting > vcpus will resume execution. > > There is untested code in p2m_mem_paging_init_queue() to allow cpu > hotplug. Since each vcpu may wait on a different gfn there have to be as > many queues as vcpus. But xl vcpu-set does not seem to work right now, > so this code path cant be excercised right now. > > > Signed-off-by: Olaf Hering <olaf@xxxxxxxxx> > > diff -r 612f69531fd1 -r 8147822efdee xen/arch/x86/hvm/hvm.c > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -454,6 +454,8 @@ int hvm_domain_initialise(struct domain > spin_lock_init(&d->arch.hvm_domain.irq_lock); > spin_lock_init(&d->arch.hvm_domain.uc_lock); > > + spin_lock_init(&d->arch.hvm_domain.gfn_lock); > + I agree with Andres's comments on this lock, and will go futher: please - add it to the mm-locks.h system so we see any ordering vioations in future patches. - add a detailed comment there explaining what exactly this lock protects. Cheers, Tim. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |