Re: [Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-28 Thread Jan Beulich
>>> On 28.08.15 at 16:15, wrote: > Then I decided to see if I can expand that to also be part of the > 'tmem_op', which looked legit (as it is the same size and offset and > pahole wise it looks right). > > But sadly the compat layer is not happy with me: > > > In file included from > /home/ko

Re: [Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-28 Thread Konrad Rzeszutek Wilk
> >>> +struct xen_sysctl_tmem_op { > >>> +uint32_t cmd; /* IN: XEN_SYSCTL_TMEM_OP_* . */ > >>> +int32_t pool_id;/* IN: 0 by default unless _SAVE_*, RESTORE_* .*/ > >>> +uint32_t cli_id;/* IN: client id, 0 for > >>> XEN_SYSCTL_TMEM_QUERY_FREEABLE_MB > >>> +

Re: [Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-28 Thread Jan Beulich
>>> On 27.08.15 at 21:20, wrote: >> >>> --- a/xen/include/public/tmem.h >> >>> +++ b/xen/include/public/tmem.h >> >>> @@ -33,7 +33,7 @@ >> >>> #define TMEM_SPEC_VERSION 1 >> >>> >> >>> /* Commands to HYPERVISOR_tmem_op() */ >> >>> -#define TMEM_CONTROL 0 >> >>> +#define

Re: [Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-28 Thread Jan Beulich
>>> On 27.08.15 at 20:43, wrote: > On Thu, Aug 27, 2015 at 09:11:35AM -0600, Jan Beulich wrote: >> >>> On 27.08.15 at 13:02, wrote: >> > --- a/xen/include/public/sysctl.h >> > +++ b/xen/include/public/sysctl.h >> > @@ -710,6 +710,48 @@ struct xen_sysctl_psr_cat_op { >> > typedef struct xen_sysct

Re: [Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-27 Thread Konrad Rzeszutek Wilk
> >>> +struct xen_sysctl_tmem_op { > >>> +uint32_t cmd; /* IN: XEN_SYSCTL_TMEM_OP_* . */ > >>> +int32_t pool_id;/* IN: 0 by default unless _SAVE_*, RESTORE_* .*/ > >>> +uint32_t cli_id;/* IN: client id, 0 for > >>> XEN_SYSCTL_TMEM_QUERY_FREEABLE_MB > >>> +

Re: [Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-27 Thread Andrew Cooper
On 27/08/15 19:43, Konrad Rzeszutek Wilk wrote: > >>> --- a/xen/include/public/sysctl.h >>> +++ b/xen/include/public/sysctl.h >>> @@ -710,6 +710,48 @@ struct xen_sysctl_psr_cat_op { >>> typedef struct xen_sysctl_psr_cat_op xen_sysctl_psr_cat_op_t; >>> DEFINE_XEN_GUEST_HANDLE(xen_sysctl_psr_cat_op

Re: [Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-27 Thread Andrew Cooper
On 27/08/15 19:47, Konrad Rzeszutek Wilk wrote: > >>> --- a/xen/include/public/sysctl.h >>> +++ b/xen/include/public/sysctl.h >>> @@ -710,6 +710,48 @@ struct xen_sysctl_psr_cat_op { >>> typedef struct xen_sysctl_psr_cat_op xen_sysctl_psr_cat_op_t; >>> DEFINE_XEN_GUEST_HANDLE(xen_sysctl_psr_cat_op

Re: [Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-27 Thread Konrad Rzeszutek Wilk
On Thu, Aug 27, 2015 at 02:12:35PM +0100, Andrew Cooper wrote: > On 27/08/15 12:02, Konrad Rzeszutek Wilk wrote: > > --- a/tools/python/xen/lowlevel/xc/xc.c > > +++ b/tools/python/xen/lowlevel/xc/xc.c > > @@ -1808,25 +1808,25 @@ static PyObject *pyxc_tmem_control(XcObject *self, > >

Re: [Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-27 Thread Konrad Rzeszutek Wilk
On Thu, Aug 27, 2015 at 09:11:35AM -0600, Jan Beulich wrote: > >>> On 27.08.15 at 13:02, wrote: > > @@ -2666,9 +2662,9 @@ long do_tmem_op(tmem_cli_op_t uops) > > /* Acquire wirte lock for all command at first */ > > write_lock(&tmem_rwlock); > > > > -if ( op.cmd == TMEM_CONTROL ) >

Re: [Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-27 Thread Jan Beulich
>>> On 27.08.15 at 13:02, wrote: > @@ -2666,9 +2662,9 @@ long do_tmem_op(tmem_cli_op_t uops) > /* Acquire wirte lock for all command at first */ > write_lock(&tmem_rwlock); > > -if ( op.cmd == TMEM_CONTROL ) > +if ( op.cmd == TMEM_CONTROL_MOVED ) > { > -rc = do_tme

Re: [Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-27 Thread Jan Beulich
>>> On 27.08.15 at 15:12, wrote: > On 27/08/15 12:02, Konrad Rzeszutek Wilk wrote: >> --- a/xen/include/xen/tmem.h >> +++ b/xen/include/xen/tmem.h >> @@ -9,6 +9,9 @@ >> #ifndef __XEN_TMEM_H__ >> #define __XEN_TMEM_H__ >> >> +struct xen_sysctl_tmem_op; > > #include please. Why? Forward declar

Re: [Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-27 Thread Andrew Cooper
On 27/08/15 12:02, Konrad Rzeszutek Wilk wrote: > --- a/tools/python/xen/lowlevel/xc/xc.c > +++ b/tools/python/xen/lowlevel/xc/xc.c > @@ -1808,25 +1808,25 @@ static PyObject *pyxc_tmem_control(XcObject *self, > &pool_id, &subop, &cli_id, &arg1, &arg2, &buf) ) > ret

Re: [Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-27 Thread Wei Liu
On Thu, Aug 27, 2015 at 07:02:00AM -0400, Konrad Rzeszutek Wilk wrote: > The operations are to be used by an control domain to set parameters, > list pools, clients, and to be used during migration. > > There is no need to have them in the tmem hypercall path. > > This patch moves code without ad

[Xen-devel] [PATCH v2 5/8] tmem: Move TMEM_CONTROL subop of tmem hypercall to sysctl.

2015-08-27 Thread Konrad Rzeszutek Wilk
The operations are to be used by an control domain to set parameters, list pools, clients, and to be used during migration. There is no need to have them in the tmem hypercall path. This patch moves code without adding fixes - and in fact in some cases makes the parameters soo long that they hurt