From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [RFC PATCH 8/8]: PVH: privcmd changes Date: Wed, 12 Sep 2012 11:00:03 -0700 Message-ID: <20120912110003.4d694761@mantra.us.oracle.com> References: <20120815180716.0049bffe@mantra.us.oracle.com> <1347372623.5305.170.camel@zakaz.uk.xensource.com> <20120911183210.5c43f428@mantra.us.oracle.com> <1347435419.10570.107.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1347435419.10570.107.camel@dagon.hellion.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "Xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On Wed, 12 Sep 2012 08:36:59 +0100 Ian Campbell wrote: > On Wed, 2012-09-12 at 02:32 +0100, Mukesh Rathor wrote: > > On Tue, 11 Sep 2012 15:10:23 +0100 > > Ian Campbell wrote: > > > > > On Thu, 2012-08-16 at 02:07 +0100, Mukesh Rathor wrote: > > > > --- > > > > drivers/xen/privcmd.c | 68 > > > > + if (rc != 0) { > > > > + pr_warn("%s Could not alloc %d pfns rc:%d\n", > > > > __FUNCTION__, > > > > + numpgs, rc); > > > > + kfree(savp->sp_paga); > > > > + kfree(savp); > > > > + return -ENOMEM; > > > > + } > > > > > > I've just been building on this patch to make proper mmap foreign > > > support on ARM and I was looking for the place which freed this, > > > both the pages back to the balloon and then the array itself. > > > There is code in privcmd_close which unmaps the P2M, but I can't > > > find the code which frees things back to the balloon. Have I > > > missed something? > > > > You are right, I missed the free. Let me revisit it and make some > > changes. > > Thanks. > > Any comments on the rest of my mail? We need to agree what the > interface between the generic and the per-arch code is going to look > like here. > > Ian. Right, I am paging it all in the brain right now, as I made the changes a while ago :). I will attempt to change the code according to your email, to come up with generic interface. Also I am going to come up with xen_unmap_domain_mfn_range. Mostly agree with your email. More soon. thanks, Mukesh