Email Deactivation Notice linux-nvdimm@lists.01.org

2021-02-01 Thread support
<<< text/html; charset="iso-8859-1": Unrecognized >>> ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

remain blessed

2021-02-01 Thread Rev Azra Mehmet Ates
Dear, linux-nvdimm ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread Ben Widawsky
On 21-01-30 15:51:49, David Rientjes wrote: > On Fri, 29 Jan 2021, Ben Widawsky wrote: > > > +static int cxl_mem_setup_mailbox(struct cxl_mem *cxlm) > > +{ > > + const int cap = cxl_read_mbox_reg32(cxlm, CXLDEV_MB_CAPS_OFFSET); > > + > > + cxlm->mbox.payload_size = > > + 1 <<

Re: [PATCH 02/14] cxl/mem: Map memory device registers

2021-02-01 Thread Ben Widawsky
On 21-01-30 15:51:42, David Rientjes wrote: > On Fri, 29 Jan 2021, Ben Widawsky wrote: > > > diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h > > new file mode 100644 > > index ..d81d0ba4617c > > --- /dev/null > > +++ b/drivers/cxl/cxl.h > > @@ -0,0 +1,17 @@ > > +/*

Re: [PATCH v16 07/11] secretmem: use PMD-size pages to amortize direct map fragmentation

2021-02-01 Thread James Bottomley
On Fri, 2021-01-29 at 09:23 +0100, Michal Hocko wrote: > On Thu 28-01-21 13:05:02, James Bottomley wrote: > > Obviously the API choice could be revisited > > but do you have anything to add over the previous discussion, or is > > this just to get your access control? > > Well, access control is

remain blessed

2021-02-01 Thread Rev Azra Mehmet Ates
Dear, linux-nvdimm ___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

Re: [PATCH 08/14] taint: add taint for direct hardware access

2021-02-01 Thread Dan Williams
On Mon, Feb 1, 2021 at 10:35 AM Ben Widawsky wrote: > > On 21-02-01 13:18:45, Konrad Rzeszutek Wilk wrote: > > On Fri, Jan 29, 2021 at 04:24:32PM -0800, Ben Widawsky wrote: > > > For drivers that moderate access to the underlying hardware it is > > > sometimes desirable to allow userspace to

Re: [PATCH 04/14] cxl/mem: Implement polled mode mailbox

2021-02-01 Thread Ben Widawsky
On 21-02-01 12:54:00, Konrad Rzeszutek Wilk wrote: > > +#define cxl_doorbell_busy(cxlm) > > \ > > + (cxl_read_mbox_reg32(cxlm, CXLDEV_MB_CTRL_OFFSET) &\ > > +CXLDEV_MB_CTRL_DOORBELL) > > + > > +#define CXL_MAILBOX_TIMEOUT_US

Re: [PATCH 04/14] cxl/mem: Implement polled mode mailbox

2021-02-01 Thread Dan Williams
On Sat, Jan 30, 2021 at 3:52 PM David Rientjes wrote: > > On Fri, 29 Jan 2021, Ben Widawsky wrote: > > > Provide enough functionality to utilize the mailbox of a memory device. > > The mailbox is used to interact with the firmware running on the memory > > device. > > > > The CXL specification

Re: [PATCH 05/14] cxl/mem: Register CXL memX devices

2021-02-01 Thread Ben Widawsky
On 21-01-30 15:52:01, David Rientjes wrote: > On Fri, 29 Jan 2021, Ben Widawsky wrote: > > > diff --git a/Documentation/ABI/testing/sysfs-bus-cxl > > b/Documentation/ABI/testing/sysfs-bus-cxl > > new file mode 100644 > > index ..fe7b87eba988 > > --- /dev/null > > +++

Re: [PATCH 01/14] cxl/mem: Introduce a driver for CXL-2.0-Type-3 endpoints

2021-02-01 Thread Jonathan Cameron
On Fri, 29 Jan 2021 16:24:25 -0800 Ben Widawsky wrote: > From: Dan Williams > > The CXL.mem protocol allows a device to act as a provider of "System > RAM" and/or "Persistent Memory" that is fully coherent as if the memory > was attached to the typical CPU memory controller. > > With the

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread Konrad Rzeszutek Wilk
> +static int cxl_mem_setup_regs(struct cxl_mem *cxlm) > +{ > + struct device *dev = >pdev->dev; > + int cap, cap_count; > + u64 cap_array; > + > + cap_array = readq(cxlm->regs + CXLDEV_CAP_ARRAY_OFFSET); > + if (CXL_GET_FIELD(cap_array, CXLDEV_CAP_ARRAY_ID) != >

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread Ben Widawsky
On 21-02-01 12:41:36, Konrad Rzeszutek Wilk wrote: > > +static int cxl_mem_setup_regs(struct cxl_mem *cxlm) > > +{ > > + struct device *dev = >pdev->dev; > > + int cap, cap_count; > > + u64 cap_array; > > + > > + cap_array = readq(cxlm->regs + CXLDEV_CAP_ARRAY_OFFSET); > > + if

Re: [PATCH 04/14] cxl/mem: Implement polled mode mailbox

2021-02-01 Thread Konrad Rzeszutek Wilk
> +#define cxl_doorbell_busy(cxlm) > \ > + (cxl_read_mbox_reg32(cxlm, CXLDEV_MB_CTRL_OFFSET) &\ > + CXLDEV_MB_CTRL_DOORBELL) > + > +#define CXL_MAILBOX_TIMEOUT_US 2000 You been using the spec for the values. Is that

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread Konrad Rzeszutek Wilk
On Mon, Feb 01, 2021 at 09:50:41AM -0800, Ben Widawsky wrote: > On 21-02-01 12:41:36, Konrad Rzeszutek Wilk wrote: > > > +static int cxl_mem_setup_regs(struct cxl_mem *cxlm) > > > +{ > > > + struct device *dev = >pdev->dev; > > > + int cap, cap_count; > > > + u64 cap_array; > > > + > > > +

Re: [PATCH 09/14] cxl/mem: Add a "RAW" send command

2021-02-01 Thread Konrad Rzeszutek Wilk
On Fri, Jan 29, 2021 at 04:24:33PM -0800, Ben Widawsky wrote: > The CXL memory device send interface will have a number of supported > commands. The raw command is not such a command. Raw commands allow > userspace to send a specified opcode to the underlying hardware and > bypass all driver

Re: [PATCH 13/14] cxl/mem: Add limited Get Log command (0401h)

2021-02-01 Thread Konrad Rzeszutek Wilk
On Fri, Jan 29, 2021 at 04:24:37PM -0800, Ben Widawsky wrote: > The Get Log command returns the actual log entries that are advertised > via the Get Supported Logs command (0400h). CXL device logs are selected > by UUID which is part of the CXL spec. Because the driver tries to > sanitize what is

Re: [PATCH 08/14] taint: add taint for direct hardware access

2021-02-01 Thread Ben Widawsky
On 21-02-01 13:18:45, Konrad Rzeszutek Wilk wrote: > On Fri, Jan 29, 2021 at 04:24:32PM -0800, Ben Widawsky wrote: > > For drivers that moderate access to the underlying hardware it is > > sometimes desirable to allow userspace to bypass restrictions. Once > > userspace has done this, the driver

Re: [PATCH 09/14] cxl/mem: Add a "RAW" send command

2021-02-01 Thread Ben Widawsky
On 21-02-01 13:24:00, Konrad Rzeszutek Wilk wrote: > On Fri, Jan 29, 2021 at 04:24:33PM -0800, Ben Widawsky wrote: > > The CXL memory device send interface will have a number of supported > > commands. The raw command is not such a command. Raw commands allow > > userspace to send a specified

Re: [PATCH 04/14] cxl/mem: Implement polled mode mailbox

2021-02-01 Thread Dan Williams
On Mon, Feb 1, 2021 at 11:13 AM Ben Widawsky wrote: > > On 21-02-01 12:54:00, Konrad Rzeszutek Wilk wrote: > > > +#define cxl_doorbell_busy(cxlm) > > > \ > > > + (cxl_read_mbox_reg32(cxlm, CXLDEV_MB_CTRL_OFFSET) & > > > \ > > >

Re: [PATCH 09/14] cxl/mem: Add a "RAW" send command

2021-02-01 Thread Konrad Rzeszutek Wilk
On Mon, Feb 01, 2021 at 11:27:08AM -0800, Ben Widawsky wrote: > On 21-02-01 13:24:00, Konrad Rzeszutek Wilk wrote: > > On Fri, Jan 29, 2021 at 04:24:33PM -0800, Ben Widawsky wrote: > > > The CXL memory device send interface will have a number of supported > > > commands. The raw command is not

Re: [PATCH 05/14] cxl/mem: Register CXL memX devices

2021-02-01 Thread David Rientjes
On Mon, 1 Feb 2021, Ben Widawsky wrote: > > > diff --git a/Documentation/ABI/testing/sysfs-bus-cxl > > > b/Documentation/ABI/testing/sysfs-bus-cxl > > > new file mode 100644 > > > index ..fe7b87eba988 > > > --- /dev/null > > > +++ b/Documentation/ABI/testing/sysfs-bus-cxl > > > @@

Re: [PATCH 08/14] taint: add taint for direct hardware access

2021-02-01 Thread Konrad Rzeszutek Wilk
On Mon, Feb 01, 2021 at 11:01:11AM -0800, Dan Williams wrote: > On Mon, Feb 1, 2021 at 10:35 AM Ben Widawsky wrote: > > > > On 21-02-01 13:18:45, Konrad Rzeszutek Wilk wrote: > > > On Fri, Jan 29, 2021 at 04:24:32PM -0800, Ben Widawsky wrote: > > > > For drivers that moderate access to the

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread Ben Widawsky
On 21-02-01 15:58:09, David Rientjes wrote: > On Mon, 1 Feb 2021, Ben Widawsky wrote: > > > > I haven't seen the update to 8.2.8.4.5 to know yet :) > > > > > > You make a good point of at least being able to interact with the driver. > > > > > > I think you could argue that if the driver

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread David Rientjes
On Mon, 1 Feb 2021, Ben Widawsky wrote: > > I think that's what 8.2.8.4.3 says, no? And then 8.2.8.4.5 says you > > can use up to Payload Size. That's why my recommendation was to enforce > > this in cxl_mem_setup_mailbox() up front. > > Yeah. I asked our spec people to update 8.2.8.4.5 to

Re: PERT ENTERPRISES SWIFT - JAN. 29, 2021 PAYMENTS MADE BY RUSTAN'S

2021-02-01 Thread Amy Parker
On Mon, Feb 1, 2021 at 7:42 PM RAJENDRA BALAI ACCOUNT wrote: > > ___ > Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org > To unsubscribe send an email to linux-nvdimm-le...@lists.01.org Can someone please block this account from the lists?

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread David Rientjes
On Mon, 1 Feb 2021, Ben Widawsky wrote: > > > > > +static int cxl_mem_setup_mailbox(struct cxl_mem *cxlm) > > > > > +{ > > > > > + const int cap = cxl_read_mbox_reg32(cxlm, > > > > > CXLDEV_MB_CAPS_OFFSET); > > > > > + > > > > > + cxlm->mbox.payload_size = > > > > > + 1 <<

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread David Rientjes
On Mon, 1 Feb 2021, Ben Widawsky wrote: > > I haven't seen the update to 8.2.8.4.5 to know yet :) > > > > You make a good point of at least being able to interact with the driver. > > I think you could argue that if the driver binds, then the payload size is > > accepted, in which case it

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread David Rientjes
On Mon, 1 Feb 2021, Dan Williams wrote: > > > I don't have an objection to binding, but doesn't this require that the > > > check in cxl_validate_cmd_from_user() guarantees send_cmd->size_in cannot > > > be greater than 1MB? > > > > You're correct. I'd need to add: > > cxlm->mbox.payload_size = >

Re: [PATCH RESEND v2 09/10] xfs: Implement ->corrupted_range() for XFS

2021-02-01 Thread Darrick J. Wong
On Fri, Jan 29, 2021 at 02:27:56PM +0800, Shiyang Ruan wrote: > This function is used to handle errors which may cause data lost in > filesystem. Such as memory failure in fsdax mode. > > In XFS, it requires "rmapbt" feature in order to query for files or > metadata which associated to the

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread David Rientjes
On Mon, 1 Feb 2021, Ben Widawsky wrote: > On 21-01-30 15:51:49, David Rientjes wrote: > > On Fri, 29 Jan 2021, Ben Widawsky wrote: > > > > > +static int cxl_mem_setup_mailbox(struct cxl_mem *cxlm) > > > +{ > > > + const int cap = cxl_read_mbox_reg32(cxlm, CXLDEV_MB_CAPS_OFFSET); > > > + > > > +

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread David Rientjes
On Mon, 1 Feb 2021, Ben Widawsky wrote: > > > > > > > > +static int cxl_mem_setup_mailbox(struct cxl_mem *cxlm) > > > > > > > > +{ > > > > > > > > + const int cap = cxl_read_mbox_reg32(cxlm, > > > > > > > > CXLDEV_MB_CAPS_OFFSET); > > > > > > > > + > > > > > > > > +

PERT ENTERPRISES SWIFT - JAN. 29, 2021 PAYMENTS MADE BY RUSTAN'S

2021-02-01 Thread RAJENDRA BALAI ACCOUNT
___ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-le...@lists.01.org

[PATCH] libnvdimm/dimm: Avoid race between probe and available_slots_show()

2021-02-01 Thread Dan Williams
Richard reports that the following test: (while true; do cat /sys/bus/nd/devices/nmem*/available_slots 2>&1 > /dev/null done) & while true; do for i in $(seq 0 4); do echo nmem$i > /sys/bus/nd/drivers/nvdimm/bind done for i in $(seq 0 4); do echo nmem$i >

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread Dan Williams
On Mon, Feb 1, 2021 at 4:11 PM Ben Widawsky wrote: > > On 21-02-01 15:58:09, David Rientjes wrote: > > On Mon, 1 Feb 2021, Ben Widawsky wrote: > > > > > > I haven't seen the update to 8.2.8.4.5 to know yet :) > > > > > > > > You make a good point of at least being able to interact with the > > >

Re: [PATCH RESEND v2 08/10] md: Implement ->corrupted_range()

2021-02-01 Thread Darrick J. Wong
On Fri, Jan 29, 2021 at 02:27:55PM +0800, Shiyang Ruan wrote: > With the support of ->rmap(), it is possible to obtain the superblock on > a mapped device. > > If a pmem device is used as one target of mapped device, we cannot > obtain its superblock directly. With the help of SYSFS, the mapped

Re: [PATCH 09/14] cxl/mem: Add a "RAW" send command

2021-02-01 Thread Dan Williams
On Mon, Feb 1, 2021 at 11:36 AM Konrad Rzeszutek Wilk wrote: > > On Mon, Feb 01, 2021 at 11:27:08AM -0800, Ben Widawsky wrote: > > On 21-02-01 13:24:00, Konrad Rzeszutek Wilk wrote: > > > On Fri, Jan 29, 2021 at 04:24:33PM -0800, Ben Widawsky wrote: > > > > The CXL memory device send interface

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread Ben Widawsky
On 21-02-01 13:51:16, David Rientjes wrote: > On Mon, 1 Feb 2021, Ben Widawsky wrote: > > > On 21-01-30 15:51:49, David Rientjes wrote: > > > On Fri, 29 Jan 2021, Ben Widawsky wrote: > > > > > > > +static int cxl_mem_setup_mailbox(struct cxl_mem *cxlm) > > > > +{ > > > > + const int cap =

Re: [PATCH 05/14] cxl/mem: Register CXL memX devices

2021-02-01 Thread Dan Williams
On Mon, Feb 1, 2021 at 1:53 PM David Rientjes wrote: > > On Mon, 1 Feb 2021, Ben Widawsky wrote: > > > > > diff --git a/Documentation/ABI/testing/sysfs-bus-cxl > > > > b/Documentation/ABI/testing/sysfs-bus-cxl > > > > new file mode 100644 > > > > index ..fe7b87eba988 > > > > ---

Re: [PATCH 01/14] cxl/mem: Introduce a driver for CXL-2.0-Type-3 endpoints

2021-02-01 Thread Konrad Rzeszutek Wilk
> +cxl_mem-y := mem.o > diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c > new file mode 100644 > index ..f4ee9a507ac9 > --- /dev/null > +++ b/drivers/cxl/mem.c > @@ -0,0 +1,61 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* Copyright(c) 2020 Intel Corporation. All rights

Re: [PATCH 02/14] cxl/mem: Map memory device registers

2021-02-01 Thread Konrad Rzeszutek Wilk
> > - return 0; > + rc = -ENXIO; > + for (i = regloc; i < regloc + 0x24; i += 8) { This 0x24, 8, and > + u32 reg_lo, reg_hi; > + u8 reg_type; > + > + /* "register low and high" contain other bits */ > + pci_read_config_dword(pdev, i,

Re: [PATCH 07/14] cxl/mem: Add send command

2021-02-01 Thread Konrad Rzeszutek Wilk
> +/** > + * struct cxl_send_command - Send a command to a memory device. > + * @id: The command to send to the memory device. This must be one of the > + * commands returned by the query command. > + * @flags: Flags for the command (input). > + * @rsvd: Must be zero. > + * @retval: Return value

Re: [PATCH 02/14] cxl/mem: Map memory device registers

2021-02-01 Thread Jonathan Cameron
On Mon, 1 Feb 2021 08:46:24 -0800 Ben Widawsky wrote: > On 21-01-30 15:51:42, David Rientjes wrote: > > On Fri, 29 Jan 2021, Ben Widawsky wrote: > > > > > diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h > > > new file mode 100644 > > > index ..d81d0ba4617c > > > --- /dev/null >

Re: [PATCH 08/14] taint: add taint for direct hardware access

2021-02-01 Thread Konrad Rzeszutek Wilk
On Fri, Jan 29, 2021 at 04:24:32PM -0800, Ben Widawsky wrote: > For drivers that moderate access to the underlying hardware it is > sometimes desirable to allow userspace to bypass restrictions. Once > userspace has done this, the driver can no longer guarantee the sanctity > of either the OS or

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread Ben Widawsky
On 21-02-01 15:09:45, David Rientjes wrote: > On Mon, 1 Feb 2021, Ben Widawsky wrote: > > > > I think that's what 8.2.8.4.3 says, no? And then 8.2.8.4.5 says you > > > can use up to Payload Size. That's why my recommendation was to enforce > > > this in cxl_mem_setup_mailbox() up front. > >

Re: [PATCH v2] nvdimm: Avoid race between probe and reading device attributes

2021-02-01 Thread Dan Williams
Yikes, sorry this languished so long, comments below: On Mon, Jun 15, 2020 at 12:48 AM Richard Palethorpe wrote: > > It is possible to cause a division error and use-after-free by querying the > nmem device before the driver data is fully initialised in nvdimm_probe. E.g > by doing > > (while

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread Dan Williams
On Mon, Feb 1, 2021 at 1:51 PM David Rientjes wrote: > > On Mon, 1 Feb 2021, Ben Widawsky wrote: > > > On 21-01-30 15:51:49, David Rientjes wrote: > > > On Fri, 29 Jan 2021, Ben Widawsky wrote: > > > > > > > +static int cxl_mem_setup_mailbox(struct cxl_mem *cxlm) > > > > +{ > > > > + const int

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread Ben Widawsky
On 21-02-01 14:23:47, David Rientjes wrote: > On Mon, 1 Feb 2021, Ben Widawsky wrote: > > > > > > > +static int cxl_mem_setup_mailbox(struct cxl_mem *cxlm) > > > > > > +{ > > > > > > + const int cap = cxl_read_mbox_reg32(cxlm, > > > > > > CXLDEV_MB_CAPS_OFFSET); > > > > > > + > > > > > > +

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread Ben Widawsky
On 21-02-01 14:45:00, David Rientjes wrote: > On Mon, 1 Feb 2021, Ben Widawsky wrote: > > > > > > > > > > +static int cxl_mem_setup_mailbox(struct cxl_mem *cxlm) > > > > > > > > > +{ > > > > > > > > > + const int cap = cxl_read_mbox_reg32(cxlm, > > > > > > > > > CXLDEV_MB_CAPS_OFFSET); > > >

Re: [PATCH 03/14] cxl/mem: Find device capabilities

2021-02-01 Thread Ben Widawsky
On 21-02-01 14:28:59, Ben Widawsky wrote: > On 21-02-01 14:23:47, David Rientjes wrote: > > On Mon, 1 Feb 2021, Ben Widawsky wrote: > > > > > > > > > +static int cxl_mem_setup_mailbox(struct cxl_mem *cxlm) > > > > > > > +{ > > > > > > > + const int cap = cxl_read_mbox_reg32(cxlm, > > > > > > >