From: Jerry Hoemann <jerry.hoemann@hpe.com> To: ross.zwisler@linux.intel.com, rjw@rjwysocki.net, lenb@kernel.org, dan.j.williams@intel.com, elliott@hpe.com, jmoyer@redhat.com, krivenok.dmitry@gmail.com, linda.knippers@hpe.com Cc: robert.moore@intel.com, lv.zheng@intel.com, rafael.j.wysocki@intel.com, linux-nvdimm@lists.01.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Jerry Hoemann <jerry.hoemann@hpe.com> Subject: [PATCH v3 3/6] nvdimm: Add wrapper for IOCTL pass thru Date: Sun, 13 Dec 2015 18:54:24 -0700 [thread overview] Message-ID: <1f8827ca2e27be08fdb8dad5952e4ce836fadaea.1450036445.git.jerry.hoemann@hpe.com> (raw) In-Reply-To: <cover.1450036445.git.jerry.hoemann@hpe.com> In-Reply-To: <cover.1450036445.git.jerry.hoemann@hpe.com> Add struct nd_passthru_pkg which serves as a warapper for the data being passed via a pass thru to a NVDIMM DSM. This wrapper specifies the extra information in a uniform manner allowing the kenrel to call a DSM without knowing specifics of the DSM. Add dsm_call command to nvdimm_bus_cmd_name and nvdimm_cmd_name. Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> --- include/uapi/linux/ndctl.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h index 5b4a4be..6823af3 100644 --- a/include/uapi/linux/ndctl.h +++ b/include/uapi/linux/ndctl.h @@ -109,6 +109,7 @@ enum { ND_CMD_VENDOR_EFFECT_LOG_SIZE = 7, ND_CMD_VENDOR_EFFECT_LOG = 8, ND_CMD_VENDOR = 9, + ND_CMD_CALL_DSM = 10, }; enum { @@ -122,6 +123,7 @@ static inline const char *nvdimm_bus_cmd_name(unsigned cmd) [ND_CMD_ARS_CAP] = "ars_cap", [ND_CMD_ARS_START] = "ars_start", [ND_CMD_ARS_STATUS] = "ars_status", + [ND_CMD_CALL_DSM] = "dsm_call", }; if (cmd < ARRAY_SIZE(names) && names[cmd]) @@ -141,6 +143,7 @@ static inline const char *nvdimm_cmd_name(unsigned cmd) [ND_CMD_VENDOR_EFFECT_LOG_SIZE] = "effect_size", [ND_CMD_VENDOR_EFFECT_LOG] = "effect_log", [ND_CMD_VENDOR] = "vendor", + [ND_CMD_CALL_DSM] = "dsm_call", }; if (cmd < ARRAY_SIZE(names) && names[cmd]) @@ -204,4 +207,20 @@ enum ars_masks { ARS_STATUS_MASK = 0x0000FFFF, ARS_EXT_STATUS_SHIFT = 16, }; + + +struct nd_cmd_dsmcall_pkg { + struct { + __u8 dsm_uuid[16]; + __u64 reserved1; /* reserved should be zero */ + __u64 dsm_rev; /* revision of dsm call */ + __u64 dsm_fun_idx; /* DSM function id */ + __u32 dsm_in; /* size of _DSM input */ + __u32 dsm_out; /* size of user buffer */ + __u32 reserved2[23]; /* reserved must be zero */ + __u32 dsm_size; /* size _DSM would write */ + } h; + unsigned char dsm_buf[]; /* Contents of DSM call */ +}; + #endif /* __NDCTL_H__ */ -- 1.7.11.3
WARNING: multiple messages have this Message-ID (diff)
From: Jerry Hoemann <jerry.hoemann@hpe.com> To: ross.zwisler@linux.intel.com, rjw@rjwysocki.net, lenb@kernel.org, dan.j.williams@intel.com, elliott@hpe.com, jmoyer@redhat.com, krivenok.dmitry@gmail.com, linda.knippers@hpe.com Cc: robert.moore@intel.com, lv.zheng@intel.com, rafael.j.wysocki@intel.com, linux-nvdimm@ml01.01.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Jerry Hoemann <jerry.hoemann@hpe.com> Subject: [PATCH v3 3/6] nvdimm: Add wrapper for IOCTL pass thru Date: Sun, 13 Dec 2015 18:54:24 -0700 [thread overview] Message-ID: <1f8827ca2e27be08fdb8dad5952e4ce836fadaea.1450036445.git.jerry.hoemann@hpe.com> (raw) In-Reply-To: <cover.1450036445.git.jerry.hoemann@hpe.com> In-Reply-To: <cover.1450036445.git.jerry.hoemann@hpe.com> Add struct nd_passthru_pkg which serves as a warapper for the data being passed via a pass thru to a NVDIMM DSM. This wrapper specifies the extra information in a uniform manner allowing the kenrel to call a DSM without knowing specifics of the DSM. Add dsm_call command to nvdimm_bus_cmd_name and nvdimm_cmd_name. Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> --- include/uapi/linux/ndctl.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h index 5b4a4be..6823af3 100644 --- a/include/uapi/linux/ndctl.h +++ b/include/uapi/linux/ndctl.h @@ -109,6 +109,7 @@ enum { ND_CMD_VENDOR_EFFECT_LOG_SIZE = 7, ND_CMD_VENDOR_EFFECT_LOG = 8, ND_CMD_VENDOR = 9, + ND_CMD_CALL_DSM = 10, }; enum { @@ -122,6 +123,7 @@ static inline const char *nvdimm_bus_cmd_name(unsigned cmd) [ND_CMD_ARS_CAP] = "ars_cap", [ND_CMD_ARS_START] = "ars_start", [ND_CMD_ARS_STATUS] = "ars_status", + [ND_CMD_CALL_DSM] = "dsm_call", }; if (cmd < ARRAY_SIZE(names) && names[cmd]) @@ -141,6 +143,7 @@ static inline const char *nvdimm_cmd_name(unsigned cmd) [ND_CMD_VENDOR_EFFECT_LOG_SIZE] = "effect_size", [ND_CMD_VENDOR_EFFECT_LOG] = "effect_log", [ND_CMD_VENDOR] = "vendor", + [ND_CMD_CALL_DSM] = "dsm_call", }; if (cmd < ARRAY_SIZE(names) && names[cmd]) @@ -204,4 +207,20 @@ enum ars_masks { ARS_STATUS_MASK = 0x0000FFFF, ARS_EXT_STATUS_SHIFT = 16, }; + + +struct nd_cmd_dsmcall_pkg { + struct { + __u8 dsm_uuid[16]; + __u64 reserved1; /* reserved should be zero */ + __u64 dsm_rev; /* revision of dsm call */ + __u64 dsm_fun_idx; /* DSM function id */ + __u32 dsm_in; /* size of _DSM input */ + __u32 dsm_out; /* size of user buffer */ + __u32 reserved2[23]; /* reserved must be zero */ + __u32 dsm_size; /* size _DSM would write */ + } h; + unsigned char dsm_buf[]; /* Contents of DSM call */ +}; + #endif /* __NDCTL_H__ */ -- 1.7.11.3
next prev parent reply other threads:[~2015-12-14 1:54 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-12-14 1:54 [PATCH v3 0/6] nvdimm: Add an IOCTL pass thru for DSM calls Jerry Hoemann 2015-12-14 1:54 ` Jerry Hoemann 2015-12-14 1:54 ` [PATCH v3 1/6] acpica: Correct parameter type to acpi_evaluate_dsm Jerry Hoemann 2015-12-14 1:54 ` Jerry Hoemann 2015-12-14 2:07 ` Rafael J. Wysocki 2015-12-14 2:07 ` Rafael J. Wysocki 2015-12-14 3:20 ` Jerry Hoemann 2015-12-14 3:20 ` Jerry Hoemann 2015-12-14 1:54 ` [PATCH v3 2/6] nvdimm: Clean-up access mode check Jerry Hoemann 2015-12-14 1:54 ` Jerry Hoemann 2015-12-14 1:54 ` Jerry Hoemann [this message] 2015-12-14 1:54 ` [PATCH v3 3/6] nvdimm: Add wrapper for IOCTL pass thru Jerry Hoemann 2015-12-14 1:54 ` [PATCH v3 4/6] nvdimm: Fix security issue with DSM IOCTL Jerry Hoemann 2015-12-14 1:54 ` Jerry Hoemann 2015-12-14 1:54 ` [PATCH v3 5/6] nvdimm: Increase max envelope size for IOCTL Jerry Hoemann 2015-12-14 1:54 ` Jerry Hoemann 2015-12-14 1:54 ` [PATCH v3 6/6] nvdimm: Add IOCTL pass thru functions Jerry Hoemann 2015-12-14 1:54 ` Jerry Hoemann 2015-12-14 17:33 ` [PATCH v4 0/6] nvdimm: Add an IOCTL pass thru for DSM calls Jerry Hoemann 2015-12-14 17:33 ` Jerry Hoemann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1f8827ca2e27be08fdb8dad5952e4ce836fadaea.1450036445.git.jerry.hoemann@hpe.com \ --to=jerry.hoemann@hpe.com \ --cc=dan.j.williams@intel.com \ --cc=elliott@hpe.com \ --cc=jmoyer@redhat.com \ --cc=krivenok.dmitry@gmail.com \ --cc=lenb@kernel.org \ --cc=linda.knippers@hpe.com \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-nvdimm@lists.01.org \ --cc=lv.zheng@intel.com \ --cc=rafael.j.wysocki@intel.com \ --cc=rjw@rjwysocki.net \ --cc=robert.moore@intel.com \ --cc=ross.zwisler@linux.intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.