From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH 0 of 6] [RFC] Use wait queues for paging, v2 Date: Thu, 15 Mar 2012 16:37:12 +0100 Message-ID: <20120315153712.GD7421@aepfle.de> References: <20120226221407.GA6385@aepfle.de> <20120227165152.GA32471@aepfle.de> <20120229161822.GA6878@aepfle.de> <20120229195623.GA11126@aepfle.de> <20120315152745.GA11329@ocelot.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20120315152745.GA11329@ocelot.phlegethon.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: xen-devel@lists.xensource.com, Andres Lagar-Cavilla , adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org On Thu, Mar 15, Tim Deegan wrote: > At 20:56 +0100 on 29 Feb (1330548983), Olaf Hering wrote: > > On Wed, Feb 29, Olaf Hering wrote: > > > > > This is the domain_lock() in xenmem_add_to_physmap_once(). > > > > > > Is get_gfn_untyped() correct, or would get_gfn_query() work as well in > > > this context? > > get_gfn_untyped() is correct. I'm not sure that we really need to take > the domain lock while we're doing it, though. It might be that the new > gfn locks will be enough to serialize these updates. > > > Another case is emulate_privileged_op(), in "Write CR3" case > > get_gfn_untyped() is called with domain_lock(). > > I think that should be OK as it only happens for PV guests. I think its just me not knowing these things, but would it make sense to add comments to XX_lock users describing what they protect (or used to protect since comments can stale over time)? Olaf