Hi, This patch implements the 6 arguments hypercalls. The sixth argument is passed using ebp or r9. Signed-off-by: Jean Guyader <jean.guyader@citrix.com> Reviewed-by: Ian Campbell <ian.campbell@citrix.com> http://lists.xensource.com/archives/html/xen-devel/2010-12/msg00945.html Jean _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2011-Jun-24 17:26 UTC
[Xen-devel] Re: [PATCH] Linux: 6 arguments hypercall v3
On 06/24/2011 08:13 AM, Jean Guyader wrote:> Hi, > > This patch implements the 6 arguments hypercalls. > The sixth argument is passed using ebp or r9. > > Signed-off-by: Jean Guyader <jean.guyader@citrix.com> > Reviewed-by: Ian Campbell <ian.campbell@citrix.com>Looks OK, but I am still a bit worried about triggering compiler bugs with register pressure. What compilers have you tested? What hypercalls have 6 args? J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jean Guyader
2011-Jun-24 22:15 UTC
[Xen-devel] Re: [PATCH] Linux: 6 arguments hypercall v3
On 24/06 06:26, Jeremy Fitzhardinge wrote:> On 06/24/2011 08:13 AM, Jean Guyader wrote: > > Hi, > > > > This patch implements the 6 arguments hypercalls. > > The sixth argument is passed using ebp or r9. > > > > Signed-off-by: Jean Guyader <jean.guyader@citrix.com> > > Reviewed-by: Ian Campbell <ian.campbell@citrix.com> > > Looks OK, but I am still a bit worried about triggering compiler bugs > with register pressure. What compilers have you tested? >I only tested it gcc 4.4. We could still use the v2 which is not as nice, but it doesn''t try to load eax twice. Let me know which one you will feel better about.> What hypercalls have 6 args? >I''m planning on upstream v4v which is a inter vm memory transport based on hypervisor memcpy. The send hypercall takes 6 arguments. Jean _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2011-Jun-24 22:43 UTC
[Xen-devel] Re: [PATCH] Linux: 6 arguments hypercall v3
On 06/24/2011 03:15 PM, Jean Guyader wrote:> I only tested it gcc 4.4. > > We could still use the v2 which is not as nice, but it doesn''t try to > load eax twice. Let me know which one you will feel better about.I feel best about the one you''ve successfully tested with a number of older compilers ;)>> What hypercalls have 6 args? >> > I''m planning on upstream v4v which is a inter vm memory transport > based on hypervisor memcpy. The send hypercall takes 6 arguments.Does it have to? Couldn''t it take a pointer to a struct or something? J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, Jun 24, 2011 at 03:43:18PM -0700, Jeremy Fitzhardinge wrote:> On 06/24/2011 03:15 PM, Jean Guyader wrote: > > I only tested it gcc 4.4. > > > > We could still use the v2 which is not as nice, but it doesn''t try to > > load eax twice. Let me know which one you will feel better about.Given "that loading r0 twice" is in the gcc documentation as an example at http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#index-extended-_0040code_007basm_007d-2601 I think it''s fair to use that.> I feel best about the one you''ve successfully tested with a number of > older compilers ;)what compilers work to build modern linux? We''ll give a goodly set of them a try if that makes everyone feel better.> Does it have to? Couldn''t it take a pointer to a struct or something?Yes we could change the API, make sure the struct is visible on all CPUs, making it incompatible with the existing code, but I think that misses the point: Xen is written to support 6 argument hypercalls, but 32 bit dom0 is missing the functionality to call them. Surely that''s something we should fix? James. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2011-Jul-02 23:05 UTC
Re: [Xen-devel] Re: [PATCH] Linux: 6 arguments hypercall v3
On 06/27/2011 09:19 PM, James wrote:> On Fri, Jun 24, 2011 at 03:43:18PM -0700, Jeremy Fitzhardinge wrote: >> On 06/24/2011 03:15 PM, Jean Guyader wrote: >>> I only tested it gcc 4.4. >>> >>> We could still use the v2 which is not as nice, but it doesn''t try to >>> load eax twice. Let me know which one you will feel better about. > Given "that loading r0 twice" is in the gcc documentation as an > example at > > http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#index-extended-_0040code_007basm_007d-2601 > > I think it''s fair to use that. > >> I feel best about the one you''ve successfully tested with a number of >> older compilers ;) > what compilers work to build modern linux? We''ll give a goodly set of them > a try if that makes everyone feel better.HPA says:> For x86, we support 3.4, 4.0 and 4.1.2 and above (not sure if 4.0.x > actually works).>> Does it have to? Couldn''t it take a pointer to a struct or something? > Yes we could change the API, make sure the struct is visible on all > CPUs, making it incompatible with the existing code, but I think that > misses the point: Xen is written to support 6 argument hypercalls, but > 32 bit dom0 is missing the functionality to call them. Surely that''s > something we should fix?The nominal ability of 6 arg hypercalls is moot if there aren''t actually any hypercalls which have 6 args. The fact that 6 args uses ebp on 32-bit is incredibly awkward, and it seems better to just say that it in fact only supports 5, and adjust the v4v call(s) accordingly. J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2011-Jul-03 11:16 UTC
Re: [Xen-devel] Re: [PATCH] Linux: 6 arguments hypercall v3
On Mon, 2011-06-27 at 21:19 +0100, James wrote:> On Fri, Jun 24, 2011 at 03:43:18PM -0700, Jeremy Fitzhardinge wrote: > > Does it have to? Couldn''t it take a pointer to a struct or something? > > Yes we could change the API, make sure the struct is visible on all > CPUs,FWIW the struct only needs to be visible on the CPU actually making the hypercall. Many (most?) Xen hypercalls take a pointer to an argument structure in this way. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Sun, Jul 03, 2011 at 12:16:01PM +0100, Ian Campbell wrote:> On Mon, 2011-06-27 at 21:19 +0100, James wrote: > > On Fri, Jun 24, 2011 at 03:43:18PM -0700, Jeremy Fitzhardinge wrote: > > > Does it have to? Couldn''t it take a pointer to a struct or something? > > > > Yes we could change the API, make sure the struct is visible on all > > CPUs, > > FWIW the struct only needs to be visible on the CPU actually making the > hypercall. Many (most?) Xen hypercalls take a pointer to an argument > structure in this way. >.. what was the end result of this? I''m wondering if V4V will be upstreamed, or if the new libvchan can replace V4V? I assume XenClient is still using V4V .. -- Pasi