From: Tristan Gingold Subject: Re: Re: [XenPPC] Xencomm for xen/ia64 Date: Tue, 22 Aug 2006 09:29:04 +0200 Message-ID: <200608220929.04245.Tristan.Gingold@bull.net> References: <200608161724.36470.Tristan.Gingold@bull.net> <200608210846.03548.Tristan.Gingold@bull.net> <1156177466.11326.35.camel@basalt.austin.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1156177466.11326.35.camel@basalt.austin.ibm.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Hollis Blanchard Cc: xen-devel , xen-ppc-devel List-Id: xen-devel@lists.xenproject.org Le Lundi 21 Ao=C3=BBt 2006 18:24, Hollis Blanchard a =C3=A9crit : > On Mon, 2006-08-21 at 08:46 +0200, Tristan Gingold wrote: > > Le Vendredi 18 Ao=C3=BBt 2006 18:39, Hollis Blanchard a =C3=A9crit : > > > 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 : > > > > > > 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 a= re > > > not "linear in memory"). Is that what you're doing? > > > > For hypercalls issued through privcmd, xencomm descriptors are always > > created. For hypercalls directly issued by kernel inline xencomm is > > prefered. > > How do you guarantee that kernel-created data structures are not > crossing page boundaries? The patch you sent does not do this. Without > that, xencomm_inline() simply cannot work except by luck. Kernel-created structures are linear in guest physical space, so it doesn't= =20 matter if they cross page boundaries. > > > > > 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 passing structures to a 64-bit kernel). So perhaps > > > > > these two fixup passes could be split: we could share the xencomm > > > > > conversion in common code, and PPC arch code could contain the si= ze > > > > > munging. > > > > > > > > Are structure sizes different on 32 and 64 bits ? > > > > > > Yes, in particular longs and pointers. > > > > But are longs and pointers used directly in Xen hypercalls ? I though > > only sized types (uintNN_t & others) are used. > > I have put a lot of work into converting types to be explicitly sized, > but there are still missing pieces. I think Jimi got tired of it, and > started doing the Linux "compat32" conversion. For example, see > drivers/xen/privcmd/compat_privcmd.c . Ok. Tristan.