From: Hollis Blanchard Subject: Re: Re: [XenPPC] Xencomm for xen/ia64 Date: Fri, 18 Aug 2006 11:39:01 -0500 Message-ID: <1155919141.23182.18.camel@basalt.austin.ibm.com> References: <200608161724.36470.Tristan.Gingold@bull.net> <1155839719.27466.48.camel@basalt.austin.ibm.com> <200608181104.50452.Tristan.Gingold@bull.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <200608181104.50452.Tristan.Gingold@bull.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Tristan Gingold Cc: xen-devel , xen-ppc-devel List-Id: xen-devel@lists.xenproject.org On Fri, 2006-08-18 at 11:04 +0200, Tristan Gingold wrote: > Le Jeudi 17 Ao=C3=BBt 2006 20:35, Hollis Blanchard a =C3=A9crit : >=20 > > > If we agree on using xencomm we will have to work with xen/ppc peop= le in > > > order not to duplicate the code. Hopefully it is rather small. I = have > > > enhanced the xencomm code so that the kernel may not use xencomm ar= ea but > > > pass the guest physical address with a flag to know the space is li= near > > > in memory. > > > > > > At this time I can boot dom0 with xencomm. I will publish the patc= h > > > later. > > > > I'll be very interested to see your patch. I guess the "flag" is a > > reserved bit in the (physical) address passed from kernel to hypervis= or? > Yes. >=20 > > Does that really gain much performance? > I don't think performance will be decreased. But it simplifies hcall.c= a lot! I'm not sure how it simplifies hcall.c. You always need to create xencomm descriptors, unless you're manually guaranteeing that the dom0_op structures do not cross page boundaries (in which case they are not "linear in memory"). Is that what you're doing? > Using xencomm_create (and __get_free_page) is tricky: it doesn't work a= ll the=20 > time and at least it doesn't work very early duing kernel boot. > Using xencomm_create_mini is possible but rather heavy. "Heavy" meaning what? It adds almost no CPU overhead (just checking for crossing page boundaries), and the stack space used is 64 bytes. The only reason it's not the preferred API is that a) it's a little cumbersome to use (in that the caller must manually allocate stack space), and b) it handles only up to two pages worth of data. > > I guess you will need to do the same thing we need to with privcmd io= ctl > > handling, i.e. copy and modify the pointers in the dom0_op data > > structures passed to the kernel. :( > Yes. hcall.c *has* to be shared between ppc and ia64. >=20 > > We need to do one more thing though: we *also* need to change fix up = the > > size of longs and pointers in our code (since 32-bit userland is pass= ing > > structures to a 64-bit kernel). So perhaps these two fixup passes cou= ld > > be split: we could share the xencomm conversion in common code, and P= PC > > arch code could contain the size munging. > Are structure sizes different on 32 and 64 bits ? Yes, in particular longs and pointers. --=20 Hollis Blanchard IBM Linux Technology Center