From: Ian Campbell Subject: Re: [RFC PATCH 8/8]: PVH: privcmd changes Date: Thu, 13 Sep 2012 20:01:32 +0100 Message-ID: <1347562892.25803.66.camel@dagon.hellion.org.uk> References: <20120815180716.0049bffe@mantra.us.oracle.com> <1347372623.5305.170.camel@zakaz.uk.xensource.com> <20120912181910.6b0b9d2b@mantra.us.oracle.com> <1347536266.24226.97.camel@zakaz.uk.xensource.com> <20120913112753.3fa731ec@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120913112753.3fa731ec@mantra.us.oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Mukesh Rathor Cc: "Xen-devel@lists.xensource.com" , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On Thu, 2012-09-13 at 19:27 +0100, Mukesh Rathor wrote: > > I suppose it depends on whether the core "takes over" the reference > > which you hold. I think it doesn't, so this is just a leak, rather > > than putting a ballooned page back into the general allocation pool > > (things would be crashing left & right if it was doing this I reckon) > > > > > > > > I had looked for other hooks initially when I did this, but > > > vm_operations_struct->close was the only one to pan out. > > > > > > I can't really move pvh_privcmd_resv_pfns to mmu.c because the > > > xen_remap_domain_mfn_range is called one page at a time, and I need > > > to allocate the array first. I'd have to change it to linked list, > > > worth it? Or I'd have to move and export it. > > > > Another alternative would be to add the page array as a parameter to > > the map/unmap function, rather than relying on it propagating via > > vma_private. > > I thought it was a no-no to change an exported API. Konrad, is it OK > to change an exported API like xen_remap_domain_mfn_range, I mean, are > there any guidelines? You are thinking of system calls, which cannot be changed. Kernel internal APIs, including those exported to modules are fair game to change. See Documentation/stable_api_nonsense.txt. Ian. > > thanks, > Mukesh > >