[ndctl PATCH] ndctl: do not try to load a key already on the kernel keyring

2021-06-18 Thread Alison Schofield
these error messages by checking the kernel keyring before trying to load. Fixes: 9925be9d6793 ("ndctl: add a load-keys command and a modprobe config") Signed-off-by: Alison Schofield --- ndctl/load-keys.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/ndctl/load-keys

[ndctl PATCH] ndctl: return -errno when keyctl_read_alloc() fails

2021-06-18 Thread Alison Schofield
the available errno correctly. Fixes: 86b078b44275 ("ndctl: add passphrase management commands") Signed-off-by: Alison Schofield --- ndctl/util/keys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ndctl/util/keys.c b/ndctl/util/keys.c index 30cb4c8..d1cc890 100644 --- a/ndctl/util/ke

[ndctl PATCH] ndctl: remove key from kernel keyring if blob storage fails

2021-06-18 Thread Alison Schofield
key for the same NVDIMM. (presumably after correcting the storage issue) Unlink the key from the kernel keyring upon failures in key storage. Fixes: 86b078b44275 ("ndctl: add passphrase management commands") Signed-off-by: Alison Schofield --- ndctl/util/keys.c | 2 ++ 1 file changed, 2

Re: [PATCH] tools/testing/nvdimm: NULL check before vfree() is not needed

2021-06-25 Thread Alison Schofield
Hi Gushengxian, The code change looks good. A couple of cleanups noted below... (same feedback on next patch too) On Fri, Jun 25, 2021 at 12:27:00AM -0700, 13145886...@163.com wrote: > From: gushengxian > > NULL check before vfree() is not needed. The commit message needs to say what was

Re: [PATCH] tools/testing/nvdimm: Remove NULL test before vfree

2021-06-25 Thread Alison Schofield
On Fri, Jun 25, 2021 at 06:26:55PM -0700, 13145886...@163.com wrote: > From: gushengxian Hi, Thanks for updating the commit message and log. I think you need to do something about the Signed-off-by or this will not be accepted. You can read more about the developer's certificate of origin in

Re: [ndctl PATCH 1/2] libndctl: check return value of ndctl_pfn_get_namespace

2021-06-30 Thread Alison Schofield
On Tue, Jun 15, 2021 at 08:38:33PM +0800, Zhiqiang Liu wrote: > > ndctl_pfn_get_namespace() may return NULL, so callers > should check return value of it. Otherwise, it may > cause access NULL pointer problem. > Hi Zhiqiang, I see you mentioned this was found by Coverity in the cover letter.

Re: [ndctl PATCH 2/2] namespace: fix potentail fd leak problem in do_xaction_namespace()

2021-06-30 Thread Alison Schofield
On Tue, Jun 15, 2021 at 08:39:20PM +0800, Zhiqiang Liu wrote: > > In do_xaction_namespace(), ri_ctx.f_out should be closed after > being opened. > Hi Zhiqiang, The commit message and commit log need to be swapped. Something like: Commit message says what the patch does: [ndctl PATCH 2/2]

[ndctl PATCH 7/7] cxl: add command set-partition-info

2022-01-03 Thread alison . schofield
From: Alison Schofield The command 'cxl set-partition-info' operates on a CXL memdev, or a set of memdevs, allowing the user to change the partition layout of the device. Synopsis: Usage: cxl set-partition-info [..] [] -v, --verbose turn on debug -s, --volatile_size

[ndctl PATCH 0/7] Add partitioning support for CXL memdevs

2022-01-03 Thread alison . schofield
From: Alison Schofield To support changing partitions on CXL memdevs, first provide access to device partitioning info. The first 4 patches add accessors to all the partition info a CXL command parser needs in order to validate the command. This info is added to cxl list to assist the user

[ndctl PATCH 1/7] libcxl: add GET_PARTITION_INFO mailbox command and accessors

2022-01-03 Thread alison . schofield
From: Alison Schofield Add libcxl APIs to create a new GET_PARTITION_INFO mailbox command, the command output data structure (privately), and accessor APIs to return the different fields in the partition info output. Signed-off-by: Alison Schofield --- cxl/lib/private.h | 10 ++ cxl

[ndctl PATCH 3/7] libcxl: apply CXL_CAPACITY_MULTIPLIER to partition alignment field

2022-01-03 Thread alison . schofield
From: Alison Schofield The IDENTIFY mailbox command returns the partition alignment field expressed in multiples of 256 MB. Use CXL_CAPACITY_MULTIPLIER when returning this field. This is in sync with all the other partitioning related fields using the multiplier. Signed-off-by: Alison

[ndctl PATCH 2/7] libcxl: add accessors for capacity fields of the IDENTIFY command

2022-01-03 Thread alison . schofield
From: Alison Schofield Add accessors to retrieve total capacity, volatile only capacity, and persistent only capacity from the IDENTIFY mailbox command. These values are useful when partitioning the device. Signed-off-by: Alison Schofield --- cxl/libcxl.h | 3 +++ cxl/lib/libcxl.c

[ndctl PATCH 4/7] cxl: add memdev partition information to cxl-list

2022-01-03 Thread alison . schofield
From: Alison Schofield Add information useful for managing memdev partitions to cxl-list output. Include all of the fields from GET_PARTITION_INFO and the partitioning related fields from the IDENTIFY mailbox command. "partition":{ "active_volatile_capacit

[ndctl PATCH 6/7] ndctl, util: use 'unsigned long long' type in OPT_U64 define

2022-01-03 Thread alison . schofield
From: Alison Schofield The OPT_U64 define failed in check_vtype() with unknown 'u64' type. Replace with 'unsigned long long' to make the OPT_U64 define usable. Signed-off-by: Alison Schofield --- util/parse-options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util

[ndctl PATCH 5/7] libcxl: add interfaces for SET_PARTITION_INFO mailbox command

2022-01-03 Thread alison . schofield
From: Alison Schofield Add APIs to allocate and send a SET_PARTITION_INFO mailbox command. Signed-off-by: Alison Schofield --- cxl/lib/private.h | 9 + cxl/libcxl.h | 4 cxl/lib/libcxl.c | 45 + cxl/lib/libcxl.sym | 3 +++ 4

Re: [ndctl PATCH 5/7] libcxl: add interfaces for SET_PARTITION_INFO mailbox command

2022-01-09 Thread Alison Schofield
On Fri, Jan 07, 2022 at 06:27:40PM -0800, Dan Williams wrote: > On Fri, Jan 7, 2022 at 5:46 PM Alison Schofield > wrote: > > > > On Thu, Jan 06, 2022 at 12:53:02PM -0800, Ira Weiny wrote: > > > On Mon, Jan 03, 2022 at 12:16:16PM -0800, Schofield, Alison wrote: >

[ndctl PATCH v2 5/6] libcxl: add interfaces for SET_PARTITION_INFO mailbox command

2022-01-11 Thread alison . schofield
From: Alison Schofield Users may want the ability to change the partition layout of a CXL memory device. Add interfaces to libcxl to allocate and send a SET_PARTITION_INFO mailbox as defined in the CXL 2.0 specification. Signed-off-by: Alison Schofield --- cxl/lib/libcxl.c | 50

[ndctl PATCH v2 1/6] libcxl: add GET_PARTITION_INFO mailbox command and accessors

2022-01-11 Thread alison . schofield
From: Alison Schofield Users need access to the CXL GET_PARTITION_INFO mailbox command to inspect and confirm changes to the partition layout of a memory device. Add libcxl APIs to create a new GET_PARTITION_INFO mailbox command, the command output data structure (privately), and accessor APIs

[ndctl PATCH v2 6/6] cxl: add command set-partition-info

2022-01-11 Thread alison . schofield
From: Alison Schofield Users may want to change the partition layout of a memory device using the CXL command line tool. Add a new CXL command, 'cxl set-partition-info', that operates on a CXL memdev, or a set of memdevs, and allows the user to change the partition layout of the device(s

[ndctl PATCH v2 4/6] cxl: add memdev partition information to cxl-list

2022-01-11 Thread alison . schofield
From: Alison Schofield Users may want to check the partition information of a memory device using the CXL command line tool. This is useful for understanding the active, as well as creating the next, partition layout. Add an option the 'cxl list' command to display partition information

[ndctl PATCH v2 0/6] Add partitioning support for CXL memdevs

2022-01-11 Thread alison . schofield
From: Alison Schofield Users may want to view and change partition layouts of CXL memory devices that support partitioning. Provide userspace access to the device partitioning capabilities as defined in the CXL 2.0 specification. The first 4 patches add accessors for all the information needed

[ndctl PATCH v2 3/6] libcxl: return the partition alignment field in bytes

2022-01-11 Thread alison . schofield
From: Alison Schofield Per the CXL specification, the partition alignment field reports the alignment value in multiples of 256MB. In the libcxl API, values for all capacity fields are defined to return bytes. Update the partition alignment accessor to return bytes so that it is in sync

[ndctl PATCH v2 2/6] libcxl: add accessors for capacity fields of the IDENTIFY command

2022-01-11 Thread alison . schofield
From: Alison Schofield Users need access to a few additional fields reported by the IDENTIFY mailbox command: total, volatile_only, and persistent_only capacities. These values are useful when defining partition layouts. Add accessors to the libcxl API to retrieve these values from the IDENTIFY

Re: [ndctl PATCH 7/7] cxl: add command set-partition-info

2022-01-10 Thread Alison Schofield
On Fri, Jan 07, 2022 at 02:45:15PM -0800, Alison Schofield wrote: > On Thu, Jan 06, 2022 at 02:19:08PM -0800, Dan Williams wrote: > > On Mon, Jan 3, 2022 at 12:11 PM wrote: > > > > > snip > > > > > One of the conventions from ndctl is that any command

Re: [ndctl PATCH v2 3/6] libcxl: return the partition alignment field in bytes

2022-01-13 Thread Alison Schofield
On Thu, Jan 13, 2022 at 08:31:49AM -0800, Alison Schofield wrote: > > On Tue, Jan 11, 2022 at 10:33:31PM -0800, alison.schofi...@intel.com wrote: > > From: Alison Schofield > > > > Per the CXL specification, the partition alignment field reports > > the alignme

Re: [ndctl PATCH v3 00/16] ndctl: Meson support

2022-01-12 Thread Alison Schofield
Hi Dan - I'll offer a Tested-by since I used it for v2 of the CXL Partitions: https://lore.kernel.org/nvdimm/cover.1641965853.git.alison.schofi...@intel.com/ Very FAST! Tested-by: Alison Schofield On Wed, Jan 05, 2022 at 01:31:39PM -0800, Dan Williams wrote: > Changes since v2

[ndctl PATCH] cxl/list: tidy the error path in add_cxl_decoder()

2022-03-03 Thread alison . schofield
From: Alison Schofield Static analysis reported this NULL pointer dereference during cleanup on error in add_cxl_decoder(). Fixes: 46564977afb7 ("cxl/list: Add decoder support") Signed-off-by: Alison Schofield --- cxl/lib/libcxl.c | 8 +--- 1 file changed, 5 insertions(+), 3

[ndctl PATCH] cxl/list: always free the path var in add_cxl_decoder()

2022-03-03 Thread alison . schofield
From: Alison Schofield Static analysis reported a resource leak where the 'path' variable was not always freed before returns. Fixes: 46564977afb7 ("cxl/list: Add decoder support") Signed-off-by: Alison Schofield --- cxl/lib/libcxl.c | 2 ++ 1 file changed, 2 insertions(+) diff -

[ndctl PATCH] libcxl: Remove extraneous NULL checks when validating cmd status

2022-03-03 Thread alison . schofield
From: Alison Schofield When a cxl_cmd_new_*() function is executed the returned command pointer is always checked for NULL. Remove extraneous NULL checks later in the command validation path. Coverity pointed these out as 'check_after_deref' issues. Signed-off-by: Alison Schofield --- cxl

[ndctl PATCH] cxl/list: Handle GET_PARTITION_INFO command as optional

2022-02-22 Thread alison . schofield
From: Alison Schofield CXL specifies GET_PARTITION_INFO mailbox command as optional. A device may not support the command when it has no partitionable space. Flip the order in which the command cxl-list retrieves the partition info so that the fields reported by the IDENTIFY mailbox command

[ndctl PATCH v6 3/6] libcxl: return the partition alignment field in bytes

2022-02-22 Thread alison . schofield
From: Alison Schofield Per the CXL specification, the partition alignment field reports the alignment value in multiples of 256MB. In the libcxl API, values for all capacity fields are defined to return bytes. Update the partition alignment accessor to return bytes so that it is in sync

[ndctl PATCH v6 4/6] cxl: add memdev partition information to cxl-list

2022-02-22 Thread alison . schofield
From: Alison Schofield The CXL PMEM provisioning model depends upon the values reported in both the CXL IDENTIFY and GET_PARTITION_INFO mailbox commands when changing the partitioning between volatile and persistent capacity. Add an option to the 'cxl list' command to display partition

[ndctl PATCH v6 5/6] libcxl: add interfaces for SET_PARTITION_INFO mailbox command

2022-02-22 Thread alison . schofield
From: Alison Schofield The CXL PMEM provisioning model depends upon the CXL mailbox command SET_PARTITION_INFO to change a device's partitioning between volatile and persistent capacity. Add interfaces to libcxl to allocate and send a SET_PARTITION_INFO mailbox command as defined in the CXL 2.0

[ndctl PATCH v6 0/6] Add partitioning support for CXL memdevs

2022-02-22 Thread alison . schofield
From: Alison Schofield Provisioning PMEM over CXL requires the ability to view and change partition layouts of CXL memory devices that support partitioning. Provide access to these capabilities as defined in the CXL 2.0 specification. The first 4 patches add accessors for all the information

[ndctl PATCH v6 1/6] libcxl: add GET_PARTITION_INFO mailbox command and accessors

2022-02-22 Thread alison . schofield
From: Alison Schofield The CXL PMEM provisioning model depends upon the values reported in the CXL GET_PARTITION_INFO mailbox command when changing the partitioning between volatile and persistent capacity. Add libcxl APIs to create a new GET_PARTITION_INFO mailbox command, the command output

[ndctl PATCH v6 2/6] libcxl: add accessors for capacity fields of the IDENTIFY command

2022-02-22 Thread alison . schofield
From: Alison Schofield The CXL PMEM provisioning model depends upon the values reported in the CXL IDENTIFY mailbox command when changing the partitioning between volatile and persistent capacity. Add accessors to the libcxl API to retrieve the total, volatile only, and persistent only

[ndctl PATCH v6 6/6] cxl: add command 'cxl set-partition'

2022-02-22 Thread alison . schofield
From: Alison Schofield CXL devices may support both volatile and persistent memory capacity. The amount of device capacity set aside for each type is typically established at the factory, but some devices also allow for dynamic re-partitioning. Add a command for this purpose. usage: cxl set

Re: [ndctl PATCH v3 5/6] libcxl: add interfaces for SET_PARTITION_INFO mailbox command

2022-01-27 Thread Alison Schofield
Hi Dan, Thanks for the review. I'm still working thru this, but a clarifying question below... On Wed, Jan 26, 2022 at 03:41:14PM -0800, Dan Williams wrote: > On Tue, Jan 18, 2022 at 12:20 PM wrote: > > > > From: Alison Schofield > > > > Users may want the ability to

Re: [ndctl PATCH v3 6/6] cxl: add command set-partition-info

2022-01-26 Thread Alison Schofield
On Wed, Jan 26, 2022 at 05:44:54PM -0800, Dan Williams wrote: > On Tue, Jan 18, 2022 at 12:20 PM wrote: > > > > From: Alison Schofield > > > > Users may want to change the partition layout of a memory > > device using the CXL command line tool. > > How a

Re: [ndctl PATCH v3 5/6] libcxl: add interfaces for SET_PARTITION_INFO mailbox command

2022-01-31 Thread Alison Schofield
> > snip > > > > > > > > > I don't understand what this is for? > > > > > > Let's back up. In order to future proof against spec changes, and > > > endianness, struct packing and all other weird things that make struct > > > ABIs hard to maintain compatibility the ndctl project adopts the > > >

Re: [ndctl PATCH v3 5/6] libcxl: add interfaces for SET_PARTITION_INFO mailbox command

2022-01-31 Thread Alison Schofield
Dan, One follow up below... On Wed, Jan 26, 2022 at 03:41:14PM -0800, Dan Williams wrote: > On Tue, Jan 18, 2022 at 12:20 PM wrote: > > > > From: Alison Schofield > > > > Users may want the ability to change the partition layout of a CXL > > memory device.

[ndctl PATCH v4 0/6] Add partitioning support for CXL memdevs

2022-02-07 Thread alison . schofield
From: Alison Schofield Users may want to view and change partition layouts of CXL memory devices that support partitioning. Provide userspace access to the device partitioning capabilities as defined in the CXL 2.0 specification. The first 4 patches add accessors for all the information needed

[ndctl PATCH v4 1/6] libcxl: add GET_PARTITION_INFO mailbox command and accessors

2022-02-07 Thread alison . schofield
From: Alison Schofield Users need access to the CXL GET_PARTITION_INFO mailbox command to inspect and confirm changes to the partition layout of a memory device. Add libcxl APIs to create a new GET_PARTITION_INFO mailbox command, the command output data structure (privately), and accessor APIs

[ndctl PATCH v4 2/6] libcxl: add accessors for capacity fields of the IDENTIFY command

2022-02-07 Thread alison . schofield
From: Alison Schofield Users need access to a few additional fields reported by the IDENTIFY mailbox command: total, volatile_only, and persistent_only capacities. These values are useful when defining partition layouts. Add accessors to the libcxl API to retrieve these values from the IDENTIFY

[ndctl PATCH v4 3/6] libcxl: return the partition alignment field in bytes

2022-02-07 Thread alison . schofield
From: Alison Schofield Per the CXL specification, the partition alignment field reports the alignment value in multiples of 256MB. In the libcxl API, values for all capacity fields are defined to return bytes. Update the partition alignment accessor to return bytes so that it is in sync

[ndctl PATCH v4 5/6] libcxl: add interfaces for SET_PARTITION_INFO mailbox command

2022-02-07 Thread alison . schofield
From: Alison Schofield Users may want the ability to change the partition layout of a CXL memory device. Add interfaces to libcxl to allocate and send a SET_PARTITION_INFO mailbox command as defined in the CXL 2.0 specification. Signed-off-by: Alison Schofield --- Documentation/cxl/lib

[ndctl PATCH v4 4/6] cxl: add memdev partition information to cxl-list

2022-02-07 Thread alison . schofield
From: Alison Schofield Users may want to check the partition information of a memory device using the CXL command line tool. This is useful for understanding the active, as well as creating the next, partition layout. Add an option to the 'cxl list' command to display partition information

Re: [ndctl PATCH v4 0/6] Add partitioning support for CXL memdevs

2022-02-08 Thread Alison Schofield
On Tue, Feb 08, 2022 at 09:23:54AM -0800, Dan Williams wrote: > On Mon, Feb 7, 2022 at 3:06 PM wrote: > > > > From: Alison Schofield > > > > Users may want to view and change partition layouts of CXL memory > > devices that support partitioning. Provide u

Re: [ndctl PATCH v4 6/6] cxl: add command set-partition

2022-02-08 Thread Alison Schofield
Thanks Dan. Understand all comments & will do. On Tue, Feb 08, 2022 at 01:08:39PM -0800, Dan Williams wrote: > On Mon, Feb 7, 2022 at 3:06 PM wrote: > > > > From: Alison Schofield > > > > CXL devices may support both volatile and persistent memory capacity. > &

Re: [ndctl PATCH v4 2/6] libcxl: add accessors for capacity fields of the IDENTIFY command

2022-02-08 Thread Alison Schofield
Got it, thanks! On Tue, Feb 08, 2022 at 12:34:23PM -0800, Dan Williams wrote: > On Mon, Feb 7, 2022 at 3:06 PM wrote: > > > > From: Alison Schofield > > > > Users need access to a few additional fields reported by the IDENTIFY > > Ah, I see the "Users n

[ndctl PATCH v5 0/6] Add partitioning support for CXL memdevs

2022-02-09 Thread alison . schofield
From: Alison Schofield Provisioning PMEM over CXL requires the ability to view and change partition layouts of CXL memory devices that support partitioning. Provide access to these capabilities as defined in the CXL 2.0 specification. The first 4 patches add accessors for all the information

[ndctl PATCH v5 4/6] cxl: add memdev partition information to cxl-list

2022-02-09 Thread alison . schofield
From: Alison Schofield The CXL PMEM provisioning model depends upon the values reported in both the CXL IDENTIFY and GET_PARTITION_INFO mailbox commands when changing the partitioning between volatile and persistent capacity. Add an option to the 'cxl list' command to display partition

[ndctl PATCH v5 5/6] libcxl: add interfaces for SET_PARTITION_INFO mailbox command

2022-02-09 Thread alison . schofield
From: Alison Schofield The CXL PMEM provisioning model depends upon the CXL mailbox command SET_PARTITION_INFO to change a device's partitioning between volatile and persistent capacity. Add interfaces to libcxl to allocate and send a SET_PARTITION_INFO mailbox command as defined in the CXL 2.0

[ndctl PATCH v5 6/6] cxl: add command 'cxl set-partition'

2022-02-09 Thread alison . schofield
From: Alison Schofield CXL devices may support both volatile and persistent memory capacity. The amount of device capacity set aside for each type is typically established at the factory, but some devices also allow for dynamic re-partitioning. Add a command for this purpose. usage: cxl set

[ndctl PATCH v5 1/6] libcxl: add GET_PARTITION_INFO mailbox command and accessors

2022-02-09 Thread alison . schofield
From: Alison Schofield The CXL PMEM provisioning model depends upon the values reported in the CXL GET_PARTITION_INFO mailbox command when changing the partitioning between volatile and persistent capacity. Add libcxl APIs to create a new GET_PARTITION_INFO mailbox command, the command output

[ndctl PATCH v5 3/6] libcxl: return the partition alignment field in bytes

2022-02-09 Thread alison . schofield
From: Alison Schofield Per the CXL specification, the partition alignment field reports the alignment value in multiples of 256MB. In the libcxl API, values for all capacity fields are defined to return bytes. Update the partition alignment accessor to return bytes so that it is in sync

[ndctl PATCH v5 2/6] libcxl: add accessors for capacity fields of the IDENTIFY command

2022-02-09 Thread alison . schofield
From: Alison Schofield The CXL PMEM provisioning model depends upon the values reported in the CXL IDENTIFY mailbox command when changing the partitioning between volatile and persistent capacity. Add accessors to the libcxl API to retrieve the total, volatile only, and persistent only

[ndctl PATCH v3 1/6] libcxl: add GET_PARTITION_INFO mailbox command and accessors

2022-01-18 Thread alison . schofield
From: Alison Schofield Users need access to the CXL GET_PARTITION_INFO mailbox command to inspect and confirm changes to the partition layout of a memory device. Add libcxl APIs to create a new GET_PARTITION_INFO mailbox command, the command output data structure (privately), and accessor APIs

[ndctl PATCH v3 2/6] libcxl: add accessors for capacity fields of the IDENTIFY command

2022-01-18 Thread alison . schofield
From: Alison Schofield Users need access to a few additional fields reported by the IDENTIFY mailbox command: total, volatile_only, and persistent_only capacities. These values are useful when defining partition layouts. Add accessors to the libcxl API to retrieve these values from the IDENTIFY

[ndctl PATCH v3 0/6] Add partitioning support for CXL memdevs

2022-01-18 Thread alison . schofield
From: Alison Schofield Users may want to view and change partition layouts of CXL memory devices that support partitioning. Provide userspace access to the device partitioning capabilities as defined in the CXL 2.0 specification. The first 4 patches add accessors for all the information needed

[ndctl PATCH v3 6/6] cxl: add command set-partition-info

2022-01-18 Thread alison . schofield
From: Alison Schofield Users may want to change the partition layout of a memory device using the CXL command line tool. Add a new CXL command, 'cxl set-partition-info', that operates on a CXL memdev, or a set of memdevs, and allows the user to change the partition layout of the device(s

[ndctl PATCH v3 3/6] libcxl: return the partition alignment field in bytes

2022-01-18 Thread alison . schofield
From: Alison Schofield Per the CXL specification, the partition alignment field reports the alignment value in multiples of 256MB. In the libcxl API, values for all capacity fields are defined to return bytes. Update the partition alignment accessor to return bytes so that it is in sync

[ndctl PATCH v3 4/6] cxl: add memdev partition information to cxl-list

2022-01-18 Thread alison . schofield
From: Alison Schofield Users may want to check the partition information of a memory device using the CXL command line tool. This is useful for understanding the active, as well as creating the next, partition layout. Add an option the 'cxl list' command to display partition information

[ndctl PATCH v3 5/6] libcxl: add interfaces for SET_PARTITION_INFO mailbox command

2022-01-18 Thread alison . schofield
From: Alison Schofield Users may want the ability to change the partition layout of a CXL memory device. Add interfaces to libcxl to allocate and send a SET_PARTITION_INFO mailbox as defined in the CXL 2.0 specification. Signed-off-by: Alison Schofield --- cxl/lib/libcxl.c | 50

Re: [ndctl PATCH 4/7] cxl: add memdev partition information to cxl-list

2022-01-07 Thread Alison Schofield
On Thu, Jan 06, 2022 at 01:51:47PM -0800, Dan Williams wrote: > On Mon, Jan 3, 2022 at 12:11 PM wrote: > > > > From: Alison Schofield > > > > Add information useful for managing memdev partitions to cxl-list > > output. Include all of the fields from GET_PARTIT

Re: [ndctl PATCH 7/7] cxl: add command set-partition-info

2022-01-07 Thread Alison Schofield
On Thu, Jan 06, 2022 at 01:05:26PM -0800, Ira Weiny wrote: > On Mon, Jan 03, 2022 at 12:16:18PM -0800, Schofield, Alison wrote: > > From: Alison Schofield > > > > "User will need a command line option for setting partition info. Add > 'set-partition-info'

Re: [ndctl PATCH 5/7] libcxl: add interfaces for SET_PARTITION_INFO mailbox command

2022-01-07 Thread Alison Schofield
On Thu, Jan 06, 2022 at 12:53:02PM -0800, Ira Weiny wrote: > On Mon, Jan 03, 2022 at 12:16:16PM -0800, Schofield, Alison wrote: > > From: Alison Schofield > > > > Add APIs to allocate and send a SET_PARTITION_INFO mailbox command. > > > > + le64 vo

Re: [ndctl PATCH 2/7] libcxl: add accessors for capacity fields of the IDENTIFY command

2022-01-07 Thread Alison Schofield
On Thu, Jan 06, 2022 at 12:36:39PM -0800, Ira Weiny wrote: > On Mon, Jan 03, 2022 at 12:16:13PM -0800, Schofield, Alison wrote: > > From: Alison Schofield > > > > Add accessors to retrieve total capacity, volatile only capacity, > > and persistent only capacity from t

Re: [ndctl PATCH 1/7] libcxl: add GET_PARTITION_INFO mailbox command and accessors

2022-01-07 Thread Alison Schofield
On Thu, Jan 06, 2022 at 01:57:59PM -0800, Vishal Verma wrote: > > Just one nit here about the double verb 'get'. In such cases, > get_partition_info can just become 'partition_info' > > e.g.: cxl_cmd_partition_info_get_active_volatile_cap(... > Will do - thanks Vishal! Combiningg w Ira's

Re: [ndctl PATCH 1/7] libcxl: add GET_PARTITION_INFO mailbox command and accessors

2022-01-07 Thread Alison Schofield
Thanks for the review Ira! On Thu, Jan 06, 2022 at 12:19:07PM -0800, Ira Weiny wrote: > On Mon, Jan 03, 2022 at 12:16:12PM -0800, Schofield, Alison wrote: > > From: Alison Schofield > > > > Add libcxl APIs to create a new GET_PARTITION_INFO mailbox command, the > > co

Re: [ndctl PATCH 7/7] cxl: add command set-partition-info

2022-01-07 Thread Alison Schofield
On Thu, Jan 06, 2022 at 02:19:08PM -0800, Dan Williams wrote: > On Mon, Jan 3, 2022 at 12:11 PM wrote: > > snip > > One of the conventions from ndctl is that any command that modifies an > object should also emit the updated state of that object in JSON. For > example, "ndctl

Re: [ndctl PATCH 4/7] cxl: add memdev partition information to cxl-list

2022-01-07 Thread Alison Schofield
On Thu, Jan 06, 2022 at 12:49:05PM -0800, Ira Weiny wrote: > On Mon, Jan 03, 2022 at 12:16:15PM -0800, Schofield, Alison wrote: > > From: Alison Schofield > > > > "Users will want to be able to check the current partition information. In > addition they will nee

Re: [ndctl PATCH 7/7] cxl: add command set-partition-info

2022-01-07 Thread Alison Schofield
On Thu, Jan 06, 2022 at 01:35:03PM -0800, Dan Williams wrote: > On Mon, Jan 3, 2022 at 12:11 PM wrote: > > > > unsigned offset; > > bool verbose; > > + unsigned long long volatile_size; > > This should be a string. > > See parse_size64() that handles suffixes like K,M,G,T,

Re: [ndctl PATCH 0/7] Add partitioning support for CXL memdevs

2022-01-07 Thread Alison Schofield
Thanks for the review Ira! There's one question back at you wrt adding MAN page to cover letter. Otherwise, I'm absorbing all your feedback. On Thu, Jan 06, 2022 at 12:32:46PM -0800, Ira Weiny wrote: > On Mon, Jan 03, 2022 at 12:16:11PM -0800, Schofield, Alison wrote: > > From: Alison

Re: [ndctl PATCH 6/7] ndctl, util: use 'unsigned long long' type in OPT_U64 define

2022-01-07 Thread Alison Schofield
On Thu, Jan 06, 2022 at 12:54:54PM -0800, Ira Weiny wrote: > On Mon, Jan 03, 2022 at 12:16:17PM -0800, Schofield, Alison wrote: > > From: Alison Schofield > > > > The OPT_U64 define failed in check_vtype() with unknown 'u64' type. > > Replace with 'unsigned long long'

Re: [ndctl PATCH v3 1/6] libcxl: add GET_PARTITION_INFO mailbox command and accessors

2022-01-26 Thread Alison Schofield
On Wed, Jan 26, 2022 at 08:07:17AM -0800, Dan Williams wrote: > On Tue, Jan 18, 2022 at 12:20 PM wrote: > > > > From: Alison Schofield > > > > Users need access to the CXL GET_PARTITION_INFO mailbox command > > to inspect and confirm changes to the partit

Re: [ndctl PATCH v3 4/6] cxl: add memdev partition information to cxl-list

2022-01-26 Thread Alison Schofield
On Wed, Jan 26, 2022 at 09:23:23AM -0800, Dan Williams wrote: > On Tue, Jan 18, 2022 at 12:20 PM wrote: > > snip > > +# cxl list -m mem0 -I > > +[ > > + { > > +"memdev":"mem0", > > +"pmem_size":0, > > +"ram_size":273535729664, > > +"partition_info":{ > > +

Re: [NDCTL PATCH v3] cxl/region: Add -f option for disable-region

2023-11-02 Thread Alison Schofield
until a reboot. physical With that, Reviewed-by: Alison Schofield > > >

[ndctl PATCH v2 0/3] Support poison list retrieval

2023-10-01 Thread alison . schofield
From: Alison Schofield Changes since v1: - Replace 'media-error' language with 'poison'. At v1 I was spec obsessed and following it's language strictly. Jonathan questioned it at the time, and I've come around to simply say poison, since that is the language we've all been using

[ndctl PATCH v2 1/5] libcxl: add interfaces for GET_POISON_LIST mailbox commands

2023-10-01 Thread alison . schofield
From: Alison Schofield CXL devices maintain a list of locations that are poisoned or result in poison if the addresses are accessed by the host. Per the spec (CXL 3.0 8.2.9.8.4.1), the device returns the Poison List as a set of Media Error Records that include the source of the error

[ndctl PATCH v2 5/5] cxl/test: add cxl-poison.sh unit test

2023-10-01 Thread alison . schofield
From: Alison Schofield Exercise cxl list, libcxl, and driver pieces of the get poison list pathway. Inject and clear poison using debugfs and use cxl-cli to read the poison list by memdev and by region. Signed-off-by: Alison Schofield --- test/cxl-poison.sh | 103

[ndctl PATCH v2 3/5] cxl/list: collect and parse the poison list records

2023-10-01 Thread alison . schofield
From: Alison Schofield Poison list records are logged as events in the kernel tracing subsystem. To prepare the poison list for cxl list, enable tracing, trigger the poison list read, and parse the generated cxl_poison events into a json representation. Signed-off-by: Alison Schofield --- cxl

[ndctl PATCH v2 2/5] cxl: add an optional pid check to event parsing

2023-10-01 Thread alison . schofield
From: Alison Schofield When parsing CXL events, callers may only be interested in events that originate from the current process. Introduce an optional argument to the event trace context: event_pid. When event_pid is present, only include events with a matching pid in the returned JSON list

[ndctl PATCH v2 4/5] cxl/list: add --poison option to cxl list

2023-10-01 Thread alison . schofield
From: Alison Schofield The --poison option to 'cxl list' retrieves poison lists from memory devices supporting the capability and displays the returned poison records in the cxl list json. This option can apply to memdevs or regions. Example usage in the Documentation/cxl/cxl-list.txt update

Re: [PATCH] memregion: Fix memregion_free() fallback definition

2022-06-23 Thread Alison Schofield
vious prototype for > function 'memregion_free' [-Wmissing-prototypes] > > Mark memregion_free() static. > > Fixes: 33dd70752cd7 ("lib: Uplevel the pmem "region" ida to a global > allocator") > Reported-by: kernel test robot > Signed-off-by: Dan Willia

Re: [PATCH 00/46] CXL PMEM Region Provisioning

2022-07-01 Thread Alison Schofield
On Thu, Jun 23, 2022 at 07:45:00PM -0700, Dan Williams wrote: > tl;dr: 46 patches is way too many patches to review in one sitting. Jump > to the PATCH SUMMARY below to find a subset of interest to jump into. > > The series is also posted on the 'preview' branch [1]. Note that branch > rebases,

Re: [PATCH 00/46] CXL PMEM Region Provisioning

2022-06-27 Thread Alison Schofield
-snipped everything These are commit message typos followed by one tidy-up request. [PATCH 00/46] CXL PMEM Region Provisioning s/usersapce/userspace s/mangage/manage [PATCH 09/46] cxl/acpi: Track CXL resources in iomem_resource s/accurracy/accuracy [PATCH 11/46] cxl/core: Define a 'struct

Re: [PATCH 15/46] cxl/Documentation: List attribute permissions

2022-06-27 Thread Alison Schofield
On Thu, Jun 23, 2022 at 07:46:52PM -0700, Dan Williams wrote: > Clarify the access permission of CXL sysfs attributes in the > documentation to help development of userspace tooling. > > Reported-by: Alison Schofield > Signed-off-by: Dan Williams > --- Reviewed-by

Re: [PATCH 06/46] cxl/core: Drop is_cxl_decoder()

2022-06-23 Thread Alison Schofield
On Thu, Jun 23, 2022 at 07:45:43PM -0700, Dan Williams wrote: > This helper was only used to identify the object type for lockdep > purposes. Now that lockdep support is done with explicit lock classes, > this helper can be dropped. > > Signed-off-by: Dan Williams Reviewed-by: A

Re: [PATCH 04/46] cxl/core: Rename ->decoder_range ->hpa_range

2022-06-23 Thread Alison Schofield
On Thu, Jun 23, 2022 at 07:45:28PM -0700, Dan Williams wrote: > In preparation for growing a ->dpa_range attribute for endpoint > decoders, rename the current ->decoder_range to the more descriptive > ->hpa_range. > > Signed-off-by: Dan Williams Reviewed-by: Alison Scho

Re: [PATCH 02/46] cxl/port: Keep port->uport valid for the entire life of a port

2022-06-23 Thread Alison Schofield
work to do as > unregister_port() will handle it. > > Fixes: 8dd2bc0f8e02 ("cxl/mem: Add the cxl_mem driver") > Signed-off-by: Dan Williams Reviewed-by: Alison Schofield > --- > drivers/cxl/core/port.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-

Re: [PATCH 03/46] cxl/hdm: Use local hdm variable

2022-06-23 Thread Alison Schofield
On Thu, Jun 23, 2022 at 07:45:21PM -0700, Dan Williams wrote: > From: Ben Widawsky > > Save a few characters and use the already initialized local variable. > > Signed-off-by: Ben Widawsky > Signed-off-by: Dan Williams Reviewed-by: Alison Schofield > --- > drive

Re: [ndctl PATCH] libcxl: fix a segfault when memdev->pmem is absent

2022-06-15 Thread Alison Schofield
lt. > > Fix this by only proceeding in free_pmem() if 'pmem' was valid. > > Fixes: cd1aed6cefe8 ("libcxl: add representation for an nvdimm bridge object") > Reported-by: Steven Garcia > Cc: Dan Williams > Signed-off-by: Vishal Verma > --- Reviewed-by: Alison Sch

[ndctl PATCH] cxl/test: Use interleave arithmetic to sort memdevs for a region

2022-08-24 Thread alison . schofield
From: Alison Schofield Test cxl-region-sysfs.sh assumes Modulo arithmetic. XOR arithmetic is being introduced and requires a different ordering of the memdevs in the region. Update the test to sort the memdevs based on interleave arithmetic. If the interleave arithmetic attribute for the root

[ndctl PATCH v2] cxl/test: add cxl_xor_region test

2022-10-26 Thread alison . schofield
From: Alison Schofield Exercise the kernel driver support of XOR math by creating regions with 1, 2, and 4-way interleaves using XOR interleave arithmetic. Use module parameter "interleave_arithmetic=1" to select the cxl_test topology that supports XOR math. XOR math is not used in t

Re: [ndctl PATCH v2] cxl/test: add cxl_xor_region test

2022-10-28 Thread Alison Schofield
On Fri, Oct 28, 2022 at 09:27:04AM -0700, Dave Jiang wrote: > > On 10/26/2022 9:12 PM, alison.schofi...@intel.com wrote: > > From: Alison Schofield > > > > Exercise the kernel driver support of XOR math by creating regions > > with 1, 2, and 4-way interleaves u

[ndctl PATCH 0/2] Add CXL XOR region test

2022-09-15 Thread alison . schofield
From: Alison Schofield These patches, although not tied to each other, both depend upon this cxl_test patch: https://lore.kernel.org/linux-cxl/5a33e3d0b182308a3a783ac8685fd2728bb64a22.1663291370.git.alison.schofi...@intel.com/ cxl/test: add cxl_xor_region test Depends on: tools/testing

[ndctl PATCH 2/2] cxl/test: allow another host bridge in cxl-topology check

2022-09-15 Thread alison . schofield
From: Alison Schofield Update the related count checks to allow a third CXL Host Bridge in the cxl_test topology. Signed-off-by: Alison Schofield --- test/cxl-topology.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cxl-topology.sh b/test/cxl-topology.sh

[ndctl PATCH 1/2] cxl/test: add cxl_xor_region test

2022-09-15 Thread alison . schofield
From: Alison Schofield Exercise the kernel driver support of XOR math by creating x1, x2, x3, x4 regions using CFMWS's that use XOR Math. x1 - no interleave, target index is always 0 x2 - 2 way interleave uses one xormap x3 - 3 way interleave uses no xormaps and relies on a modulo calc. x4 - 4

Re: [PATCH v2 2/9] cxl: add helper to parse through all current events

2022-09-21 Thread Alison Schofield
On Mon, Sep 19, 2022 at 04:46:46PM -0700, Dave Jiang wrote: > Add common function to iterate through and extract the events in the > current trace buffer. The function uses tracefs_iterate_raw_events() from > libtracefs to go through all the events loaded into a tep_handle. A > callback is

  1   2   3   >