From: Alastair D'Silva <redacted>
This series adds a new IOCTL for OpenCAPI, which exposes adapter
metadata to userspace.
---
v1->v2:
- Document the new IOCTL
Alastair D'Silva (2):
ocxl: Add get_metadata IOCTL to share OCXL information to userspace
ocxl: Document the OCXL_IOCTL_GET_METADATA IOCTL
Documentation/accelerators/ocxl.rst | 5 +++++
drivers/misc/ocxl/file.c | 27 +++++++++++++++++++++++++++
include/uapi/misc/ocxl.h | 22 ++++++++++++++++++++++
3 files changed, 54 insertions(+)
--
2.14.3
From: Alastair D'Silva <redacted>
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 <redacted>
---
drivers/misc/ocxl/file.c | 27 +++++++++++++++++++++++++++
include/uapi/misc/ocxl.h | 22 ++++++++++++++++++++++
2 files changed, 49 insertions(+)
@@ -32,6 +32,27 @@ struct ocxl_ioctl_attach {__u64reserved3;};+/*+*Versioncontainstheversionofthestruct.+*Versionswillalwaysbebackwardscompatible,thatis,newversionswillnot+*alterexistingfields+*/+structocxl_ioctl_get_metadata{+__u16version;++// Version 0 fields+__u8afu_version_major;+__u8afu_version_minor;+__u32pasid;++__u64pp_mmio_size;+__u64global_mmio_size;++// End version 0 fields++__u64reserved[13];// Total of 16*u64+};+structocxl_ioctl_irq_fd{__u64irq_offset;__s32eventfd;
@@ -152,6 +152,11 @@ OCXL_IOCTL_IRQ_SET_FD: Associate an event fd to an AFU interrupt so that the user process can be notified when the AFU sends an interrupt.+OCXL_IOCTL_GET_METADATA:++ Obtains configuration information from the card, such at the size of+ MMIO areas, the AFU version, and the PASID for the current context.+ mmap ----
From: Alastair D'Silva <redacted>
This series adds a new IOCTL for OpenCAPI, which exposes adapter
metadata to userspace.
---
v1->v2:
- Document the new IOCTL
v2->v3:
- Rename metadata struct
- Document a couple of struct members that are not immediately obvious
Alastair D'Silva (2):
ocxl: Add get_metadata IOCTL to share OCXL information to userspace
ocxl: Document the OCXL_IOCTL_GET_METADATA IOCTL
Documentation/accelerators/ocxl.rst | 5 +++++
drivers/misc/ocxl/file.c | 27 +++++++++++++++++++++++++++
include/uapi/misc/ocxl.h | 17 +++++++++++++++++
3 files changed, 49 insertions(+)
--
2.14.3
From: Alastair D'Silva <redacted>
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 <redacted>
---
drivers/misc/ocxl/file.c | 27 +++++++++++++++++++++++++++
include/uapi/misc/ocxl.h | 17 +++++++++++++++++
2 files changed, 44 insertions(+)
@@ -32,6 +32,22 @@ struct ocxl_ioctl_attach {__u64reserved3;};+structocxl_ioctl_metadata{+__u16version;// struct version, always backwards compatible++// Version 0 fields+__u8afu_version_major;+__u8afu_version_minor;+__u32pasid;// PASID assigned to the current context++__u64pp_mmio_size;// Per PASID MMIO size+__u64global_mmio_size;++// End version 0 fields++__u64reserved[13];// Total of 16*u64+};+structocxl_ioctl_irq_fd{__u64irq_offset;__s32eventfd;
@@ -152,6 +152,11 @@ OCXL_IOCTL_IRQ_SET_FD: Associate an event fd to an AFU interrupt so that the user process can be notified when the AFU sends an interrupt.+OCXL_IOCTL_GET_METADATA:++ Obtains configuration information from the card, such at the size of+ MMIO areas, the AFU version, and the PASID for the current context.+ mmap ----
From: Andrew Donnellan <hidden> Date: 2018-02-22 05:21:45
On 22/02/18 15:17, Alastair D'Silva wrote:
From: Alastair D'Silva <redacted>
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 <redacted>
Acked-by: Andrew Donnellan <redacted>
--
Andrew Donnellan OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com IBM Australia Limited
From: Alastair D'Silva <redacted>
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 <redacted>
---
@@ -32,6 +32,22 @@ struct ocxl_ioctl_attach {__u64reserved3;};+structocxl_ioctl_metadata{+__u16version;// struct version, always backwards compatible++// Version 0 fields+__u8afu_version_major;+__u8afu_version_minor;+__u32pasid;// PASID assigned to the current context++__u64pp_mmio_size;// Per PASID MMIO size+__u64global_mmio_size;++// End version 0 fields++__u64reserved[13];// Total of 16*u64+};+structocxl_ioctl_irq_fd{__u64irq_offset;__s32eventfd;
@@ -152,6 +152,11 @@ OCXL_IOCTL_IRQ_SET_FD: Associate an event fd to an AFU interrupt so that the user process can be notified when the AFU sends an interrupt.+OCXL_IOCTL_GET_METADATA:++ Obtains configuration information from the card, such at the size of+ MMIO areas, the AFU version, and the PASID for the current context.+ mmap ----
From: Michael Ellerman <hidden> Date: 2018-03-05 12:36:08
On Thu, 2018-02-22 at 04:17:38 UTC, "Alastair D'Silva" wrote:
From: Alastair D'Silva <redacted>
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 <redacted>
Acked-by: Andrew Donnellan <redacted>
Acked-by: Frederic Barrat <redacted>