Subject: Re: [PATCH v8 4/5] ndctl/papr_scm,uapi: Add support for PAPR nvdimm specific methods

From: "Aneesh Kumar K.V" <[email-masked]>
Date: Wed, 27 May 2020 15:25:21 +0530

Vaibhav Jain <[email-masked]> writes:

> Introduce support for PAPR NVDIMM Specific Methods (PDSM) in papr_scm
> module and add the command family to the white list of NVDIMM command
> sets. Also advertise support for ND_CMD_CALL for the nvdimm
> command mask and implement necessary scaffolding in the module to
> handle ND_CMD_CALL ioctl and PDSM requests that we receive.
>
> The layout of the PDSM request as we expect from libnvdimm/libndctl is
> described in newly introduced uapi header 'papr_scm_pdsm.h' which
> defines a new 'struct nd_pdsm_cmd_pkg' header. This header is used
> to communicate the PDSM request via member
> 'nd_pkg_papr_scm->nd_command' and size of payload that need to be
> sent/received for servicing the PDSM.
>
> A new function is_cmd_valid() is implemented that reads the args to
> papr_scm_ndctl() and performs sanity tests on them. A new function
> papr_scm_service_pdsm() is introduced and is called from
> papr_scm_ndctl() in case of a PDSM request is received via ND_CMD_CALL
> command from libnvdimm.
>

Reviewed-by: Aneesh Kumar K.V <[email-masked]>

> Cc: "Aneesh Kumar K . V" <[email-masked]>
> Cc: Dan Williams <[email-masked]>
> Cc: Michael Ellerman <[email-masked]>
> Cc: Ira Weiny <[email-masked]>
> Signed-off-by: Vaibhav Jain <[email-masked]>
> ---

-aneesh