From: Herbert Xu Subject: Re: RFC: [0/2] Remove netloop by lazy copying in netback Date: Tue, 27 Mar 2007 17:44:51 +1000 Message-ID: <20070327074451.GA24369@gondor.apana.org.au> References: <20070327033442.GD32121%yamahata@valinux.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Isaku Yamahata , Xen Development Mailing List List-Id: xen-devel@lists.xenproject.org On Tue, Mar 27, 2007 at 08:36:39AM +0100, Keir Fraser wrote: > > This is quite a shame, since the swap-grant-mapping-for-memory hypercall > simply is not very nice. What if we wanted to swap a grant mapping for > another grant mapping in future? Or some other kind of mapping? We end up > needing a new, complicated, grant-table hypercall every time. Or in six > months time we decide this wasn't such a good idea, implement another > scheme, but have this special-purpose grant-table hypercall hanging around > unused forever more. > > Could we shatter the ia64 guest large mappings easily? They have no benefit > on Xen anyway apart from some inconsequential memory saving. There is another way. Instead of expanding add_to_physmap which doesn't quite fit our semantics, let's add a new operation that *actually* swaps two p2m entries. Then it can be used as follows: a) new_addr = alloc_page b) memcpy(new_addr, addr, len) c) p2m_swap(__pa(new_addr), __pa(addr)) d) grant_unmap(__pa(new_addr)) Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt