From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 0 of 3] Update paging/sharing/access interfaces v2 Date: Fri, 10 Feb 2012 12:29:32 -0800 Message-ID: References: <54af50e4d70943ce8539bd3ce0e3120c.squirrel@webmail.lagarcavilla.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54af50e4d70943ce8539bd3ce0e3120c.squirrel@webmail.lagarcavilla.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Andres Lagar-Cavilla Cc: Olaf Hering , xen-devel@lists.xensource.com, ian.campbell@citrix.com, andres@gridcentric.ca, Tim Deegan , adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org On 10/02/2012 12:11, "Andres Lagar-Cavilla" wrote: >>> I was just thinking about this issue. The bug is that the ring lives in >>> dom0, the page should belong to domU and should be destroyed along with >>> it. And ring users in dom0 should request (and maybe initially allocate >>> and setup) a certain gfn belonging to domU. >> >> Yes indeed. The gpfn could be allocated by the domain builder, or by >> hvmloader (which might be too late!). > > Well, let's say the domain builder reserves three gpfns (paging, access, > sharing). When helpers for each come up, the enable domctl allocates the > actual frame. Or, we could have the frames allocated up front, it's not > terrible wastage -- the enable domctl would init the ring. > > My question was more along the lines of how to choose which guest pfns to > reserve for this. Domain builder (xc_hvm_build.c) would be the sensible place to reserve, and push that info down to Xen in some way. Then allocate the pages during the enable domctl, via alloc_xenheap_page() (for a few arcane reasons, it's better to use this than alloc_domheap_page() for this particular purpose). -- Keir