From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [PATCH v4 1/6] xen: improve changes to xen_add_to_physmap Date: Fri, 14 Sep 2012 16:09:18 -0700 Message-ID: <20120914160918.7e61d1d0@mantra.us.oracle.com> References: <1345633688-31684-1-git-send-email-stefano.stabellini@eu.citrix.com> <1347627587.24226.192.camel@zakaz.uk.xensource.com> <1347628660.24226.197.camel@zakaz.uk.xensource.com> <1347630442.24226.211.camel@zakaz.uk.xensource.com> <1347630971.24226.214.camel@zakaz.uk.xensource.com> <50535AFA020000780009B7C4@nat28.tlf.novell.com> <1347637953.14977.10.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: "xen-devel@lists.xensource.com" , "Keir (Xen.org)" , Ian Campbell , "Tim (Xen.org)" , "ijackson@chiark.greenend.org.uk" , Jan Beulich List-Id: xen-devel@lists.xenproject.org On Fri, 14 Sep 2012 16:54:06 +0100 Stefano Stabellini wrote: > On Fri, 14 Sep 2012, Ian Campbell wrote: > > On Fri, 2012-09-14 at 16:44 +0100, Stefano Stabellini wrote: > > > On Fri, 14 Sep 2012, Jan Beulich wrote: > > > > >>> On 14.09.12 at 15:56, Ian Campbell > > > > >>> wrote: > > > > >> > > Might we prefer to have a batched version of this call? > > > > >> > > I don't think we can shoehorn the necessary fields into > > > > >> > > xen_add_to_physmap_t though. > > > > >> > > > > > >> > Actually, talking about this we Stefano we think we can. > > > > >> > Since both idx and gpfn are unsigned longs they can become > > > > >> > unions with a GUEST_HANDLE without changing the ABI on > > > > >> > x86_32 or x86_64. > > > > > > > > > > Except we need both foreign_domid and size, which currently > > > > > overlap, and there's no other spare bits. Damn. > > > > > > > > > > Looks like XENMEM_add_to_physmap_range is the only option :-( > > > > > > > > You could use the first entry in each array to specify the > > > > counts, which would at once allow mixed granularity on each > > > > list (should that ever turn out useful); initially you would > > > > certainly want both counts to match. > > > > > > I think it would be better from the interface point of view to > > > have idx become the number of frames, and gpfn a pointer (a > > > GUEST_HANDLE) to a struct that contains both arrays. > > > > We'd need to slip in enough info to allow continuations too. Perhaps > > that can be done by manipulating the size and the handle to keep > > track of progress. Or maybe we can get away with just just frobbing > > the size if we process the array backwards. > > > > Which is all sounding pretty gross. I'm very temped to add > > add_to_physmap2... > > Yeah, I am OK with that. Agree, pmap2.