Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-22 Thread Frederic Barrat
Yeah, I think metadata will evolve for a while till it settle's down. Since ocxl_ioctl_get_metadata is exposed via uapi, a newer program calling an older kernel will never work, since the size of that struct will always be larger than what the OS supports and our copy_to_user() will fail. The ot

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Balbir Singh
On Thu, Feb 22, 2018 at 2:51 PM, Alastair D'Silva wrote: > On Thu, 2018-02-22 at 14:46 +1100, Balbir Singh wrote: > >> lpc_size could be added. It's currently useless to the library, but >> > doesn't >> > hurt. The one which was giving me troubles on a previous version of >> > this >> > patch was

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Alastair D'Silva
On Thu, 2018-02-22 at 14:46 +1100, Balbir Singh wrote: > lpc_size could be added. It's currently useless to the library, but > > doesn't > > hurt. The one which was giving me troubles on a previous version of > > this > > patch was the lpc numa node ID, since that was experimental code > > and fel

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Alastair D'Silva
On Thu, 2018-02-22 at 14:41 +1100, Balbir Singh wrote: > On Thu, Feb 22, 2018 at 10:32 AM, Alastair D'Silva com> wrote: > > > > On Wed, 2018-02-21 at 17:43 +1100, Balbir Singh wrote: > > > On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva > > bm.c > > > om> wrote: > > > > From: Alastair D'Silva

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Andrew Donnellan
On 22/02/18 14:41, Balbir Singh wrote: Setting it to 0 is for the reader, not the compiler. I'm not clear on the benefit of starting the version at 1, could you clarify? How do I distinguish between version number never set and 0? The ioctl won't exist without a version number set. -- Andrew

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Balbir Singh
On Wed, Feb 21, 2018 at 10:25 PM, Frederic Barrat wrote: > > > Le 21/02/2018 à 07:43, Balbir Singh a écrit : >> >> On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva >> wrote: >>> >>> From: Alastair D'Silva >>> >>> Some required information is not exposed to userspace currently (eg. the >>> PASID

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Balbir Singh
On Thu, Feb 22, 2018 at 10:32 AM, Alastair D'Silva wrote: > > On Wed, 2018-02-21 at 17:43 +1100, Balbir Singh wrote: >> On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva > om> wrote: >> > From: Alastair D'Silva >> > >> > Some required information is not exposed to userspace currently >> > (eg. th

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Michael Ellerman
"Alastair D'Silva" writes: > On Wed, 2018-02-21 at 17:43 +1100, Balbir Singh wrote: >> On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva > om> wrote: >> > From: Alastair D'Silva >> > ... >> > diff --git a/include/uapi/misc/ocxl.h b/include/uapi/misc/ocxl.h >> > index 4b0b0b756f3e..16e1f48ce280

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Alastair D'Silva
On Wed, 2018-02-21 at 12:25 +0100, Frederic Barrat wrote: > > Le 21/02/2018 à 07:43, Balbir Singh a écrit : > > On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva > .com> wrote: > > > From: Alastair D'Silva > > > > > > Some required information is not exposed to userspace currently > > > (eg. th

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Alastair D'Silva
On Wed, 2018-02-21 at 17:43 +1100, Balbir Singh wrote: > On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva om> wrote: > > From: Alastair D'Silva > > > > Some required information is not exposed to userspace currently > > (eg. the > > PASID), pass this information back, along with other informat

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-21 Thread Frederic Barrat
Le 21/02/2018 à 07:43, Balbir Singh a écrit : On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva wrote: From: Alastair D'Silva Some required information is not exposed to userspace currently (eg. the PASID), pass this information back, along with other information which is currently communic

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-20 Thread Balbir Singh
On Wed, Feb 21, 2018 at 3:57 PM, Alastair D'Silva wrote: > From: Alastair D'Silva > > Some required information is not exposed to userspace currently (eg. the > PASID), pass this information back, along with other information which > is currently communicated via sysfs, which saves some parsing e

Re: [PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-20 Thread Andrew Donnellan
On 21/02/18 15:57, Alastair D'Silva wrote: From: Alastair D'Silva Some required information is not exposed to userspace currently (eg. the PASID), pass this information back, along with other information which is currently communicated via sysfs, which saves some parsing effort in userspace. S

[PATCH] ocxl: Add get_metadata IOCTL to share OCXL information to userspace

2018-02-20 Thread Alastair D'Silva
From: Alastair D'Silva Some required information is not exposed to userspace currently (eg. the PASID), pass this information back, along with other information which is currently communicated via sysfs, which saves some parsing effort in userspace. Signed-off-by: Alastair D'Silva --- drivers/