Re: [NDCTL PATCH v5 2/3] cxl: Enumerate major/minor of FWCTL char device

2025-04-11 Thread Dave Jiang
On 4/11/25 1:53 PM, Alison Schofield wrote: > On Fri, Apr 11, 2025 at 11:47:36AM -0700, Dave Jiang wrote: > > big snip... > >> +char path[CXL_PATH_MAX]; > > A bit of minutiae, not directly related to your patch- > > I see: > ndctl keys code, (ndct

[NDCTL PATCH v5 1/3] cxl: Add cxl_bus_get_by_provider()

2025-04-11 Thread Dave Jiang
Add helper function cxl_bus_get_by_provider() in order to support unit test that will utilize the API call. Signed-off-by: Dave Jiang --- v5: - Add documentation for API. (Alison) --- Documentation/cxl/lib/libcxl.txt | 2 ++ cxl/lib/libcxl.c | 11 +++ cxl/lib/libcxl.sym

[NDCTL PATCH v5 3/3] cxl/test: Add test for cxl features device

2025-04-11 Thread Dave Jiang
Add a unit test to verify the features ioctl commands. Test support added for locating a features device, retrieve and verify the supported features commands, retrieve specific feature command data, retrieve test feature data, and write and verify test feature data. Signed-off-by: Dave Jiang

[NDCTL PATCH v5 2/3] cxl: Enumerate major/minor of FWCTL char device

2025-04-11 Thread Dave Jiang
e major and minor of the FWCTL character device. Signed-off-by: Dave Jiang --- v5: - Add documentation. (Alison) - Alloc path on stack. (Alison) - Deal with out of entry and no match case. (Alison) - Make fwctl operations part of 'struct cxl_fwctl' (Dan) --- Documentation/cxl/lib/libc

[NDCTL PATCH v5 0/3] ndctl: Add support and test for CXL Features support

2025-04-11 Thread Dave Jiang
ue all the supported ioctls to the associated FWCTL char device to verify that all the ioctl paths are working as expected. Kernel series: https://lore.kernel.org/linux-cxl/20250207233914.2375110-1-dave.ji...@intel.com/T/#t Dave Jiang (3): cxl: Add cxl_bus_get_by_provider() cxl: Enume

Re: [NDCTL PATCH v4 3/3] cxl/test: Add test for cxl features device

2025-04-09 Thread Dave Jiang
On 4/9/25 1:40 PM, Alison Schofield wrote: > On Tue, Feb 18, 2025 at 03:59:56PM -0700, Dave Jiang wrote: >> Add a unit test to verify the features ioctl commands. Test support added >> for locating a features device, retrieve and verify the supported features >> comman

Re: [NDCTL PATCH v4 3/3] cxl/test: Add test for cxl features device

2025-04-09 Thread Dave Jiang
On 4/9/25 1:40 PM, Alison Schofield wrote: > On Tue, Feb 18, 2025 at 03:59:56PM -0700, Dave Jiang wrote: >> Add a unit test to verify the features ioctl commands. Test support added >> for locating a features device, retrieve and verify the supported features >> comman

Re: [patch 04/10] NTB/msi: Switch MSI descriptor locking to lock guard()

2025-03-15 Thread Dave Jiang
On 3/9/25 1:41 AM, Thomas Gleixner wrote: > Convert the code to use the new guard(msi_descs_lock). > > No functional change intended. > > Signed-off-by: Thomas Gleixner > Cc: Jon Mason > Cc: Dave Jiang > Cc: Allen Hubbe > Cc: n...@lists.linux.dev Acked-by: Da

Re: [ndctl PATCH v2 3/5] ndctl/dimm: do not increment a ULLONG_MAX slot value

2025-03-07 Thread Dave Jiang
slot in the for loop header. That > keeps the comparison to a u32 as is and avoids overflow. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > ndctl/dimm.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/ndctl/dimm.c b/nd

Re: [ndctl PATCH 4/5] ndctl/namespace: protect against overflow handling param.offset

2025-03-05 Thread Dave Jiang
; > Add check for ULLONG_MAX upon return from parse_size64. > Add check for overflow in subsequent PFN_MODE offset calculation. > > This issue was reported in a coverity scan. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > ndctl/namespace.c |

Re: [ndctl PATCH 5/5] ndctl/namespace: protect against under|over-flow w bad param.align

2025-03-05 Thread Dave Jiang
hecks for both values. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > ndctl/namespace.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/ndctl/namespace.c b/ndctl/namespace.c > index 40bcf4ca65ac..3224c9ff 100644 > -

Re: [ndctl PATCH 3/5] ndctl/dimm: do not increment a ULLONG_MAX slot value

2025-03-05 Thread Dave Jiang
On 3/3/25 5:37 PM, alison.schofi...@intel.com wrote: > From: Alison Schofield > > A coverity scan higlighted an overflow issue when the slot variable, > an unsigned integer that is initialized to -1, is incremented and > overflows. > > Initialize slot to 0 and move the increment statement to

Re: [ndctl PATCH 2/5] ndctl/namespace: close file descriptor in do_xaction_namespace()

2025-03-05 Thread Dave Jiang
e all returns through > that path. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > ndctl/namespace.c | 15 --- > 1 file changed, 8 insertions(+), 7 deletions(-) > > diff --git a/ndctl/namespace.c b/ndctl/namespace.c > index bb0c

Re: [ndctl PATCH 1/5] ndctl/namespace: avoid integer overflow in namespace validation

2025-03-05 Thread Dave Jiang
l not > exceed the maximimum value that an unsigned long long can hold. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang nit below > --- > ndctl/namespace.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/ndctl/namespace.

Re: [PATCH v2][next] UAPI: ndctl / acpi: intel: Avoid multiple -Wflex-array-member-not-at-end warnings

2025-02-14 Thread Dave Jiang
so on. > > So, with these changes, fix 12 of the following warnings: > > drivers/acpi/nfit/intel.c:692:35: warning: structure containing a flexible > array member is not at the end of another structure > [-Wflex-array-member-not-at-end] > > Signed-off-by: Gustavo A. R. S

Re: [ndctl PATCH] cxl/json: remove prefix from tracefs.h #include

2025-02-12 Thread Dave Jiang
request: > https://github.com/pmem/ndctl/pull/268/ > > [ alison: commit msg and log edits ] > > Fixes: 9873123fce03 ("cxl/list: collect and parse media_error records") > Signed-off-by: Michal Suchanek > Signed-off-by: Alison Schofield Reviewed-by: Dave Ji

Re: [ndctl PATCH] util/strbuf: remove unused cli infrastructure imports

2025-02-12 Thread Dave Jiang
ort was not reviewed at this time. > > [1] 91677390f9e6 ("ndctl: import cli infrastructure from perf") > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > util/strbuf.c | 51 --- > util/strbuf.h

Re: [PATCH] acpi: nfit: fix narrowing conversion in acpi_nfit_ctl

2025-01-23 Thread Dave Jiang
On 1/23/25 9:39 AM, Murad Masimov wrote: > Syzkaller has reported a warning in to_nfit_bus_uuid(): "only secondary > bus families can be translated". This warning is emited if the argument > is equal to NVDIMM_BUS_FAMILY_NFIT == 0. Function acpi_nfit_ctl() first > verifies that a user-provided v

Re: [ndctl PATCH 1/1] daxctl: Output more information if memblock is unremovable

2025-01-09 Thread Dave Jiang
On 1/8/25 5:58 PM, Li Ming wrote: > On 1/9/2025 12:46 AM, Dave Jiang wrote: >> >> On 12/5/24 6:10 PM, Alison Schofield wrote: >>> On Thu, Dec 05, 2024 at 12:14:56AM +0800, Li Ming wrote: >>>> If CONFIG_MEMORY_HOTREMOVE is disabled by kernel, memblocks will

Re: [ndctl PATCH 1/1] daxctl: Output more information if memblock is unremovable

2025-01-08 Thread Dave Jiang
On 12/5/24 6:10 PM, Alison Schofield wrote: > On Thu, Dec 05, 2024 at 12:14:56AM +0800, Li Ming wrote: >> If CONFIG_MEMORY_HOTREMOVE is disabled by kernel, memblocks will not be >> removed, so 'dax offline-memory all' will output below error logs: >> >> libdaxctl: offline_one_memblock: dax0.0:

Re: [PATCH v6] acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl

2024-12-02 Thread Dave Jiang
ved2 array. > > Reported-by: syzbot+7534f060ebda6b8b5...@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?extid=7534f060ebda6b8b51b3 > Tested-by: syzbot+7534f060ebda6b8b5...@syzkaller.appspotmail.com > Fixes: ebe9f6f19d80 ("acpi/nfit: Fix bus command validation") &

Re: [PATCH v4] acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl

2024-11-15 Thread Dave Jiang
ved2 array. > > Reported-by: syzbot+7534f060ebda6b8b5...@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?extid=7534f060ebda6b8b51b3 > Tested-by: syzbot+7534f060ebda6b8b5...@syzkaller.appspotmail.com > Fixes: ebe9f6f19d80 ("acpi/nfit: Fix bus command validation") &

Re: [PATCH v3] acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl

2024-11-14 Thread Dave Jiang
On 11/14/24 2:19 AM, Suraj Sonawane wrote: > On 13/11/24 22:32, Dave Jiang wrote: >> >> >> On 11/13/24 5:51 AM, Suraj Sonawane wrote: >>> Fix an issue detected by syzbot with KASAN: >>> >>> BUG: KASAN: vmalloc-out-of-bounds in cmd_to_func dr

Re: [PATCH] nvdimm: rectify the illogical code within nd_dax_probe()

2024-11-13 Thread Dave Jiang
and > improve its readability. > > Signed-off-by: Yi Yang Reviewed-by: Dave Jiang but a few comments for future patches: Is this v2 of the patch? Please label patch subject prefix as so. > --- Please include change history here from previous versions. > drivers/nvdimm/dax_devs.c

Re: [PATCH v3] acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl

2024-11-13 Thread Dave Jiang
On 11/13/24 5:51 AM, Suraj Sonawane wrote: > Fix an issue detected by syzbot with KASAN: > > BUG: KASAN: vmalloc-out-of-bounds in cmd_to_func drivers/acpi/nfit/ > core.c:416 [inline] > BUG: KASAN: vmalloc-out-of-bounds in acpi_nfit_ctl+0x20e8/0x24a0 > drivers/acpi/nfit/core.c:459 > > The issue

Re: [PATCH v2 04/11] net/ntb: Use never-managed version of pci_intx()

2024-11-13 Thread Dave Jiang
ow/intel enable their PCI-Device with pci_enable_device(). > Thus, they need the never-managed version. > > Replace pci_intx() with pci_intx_unmanaged(). > > Signed-off-by: Philipp Stanner > Acked-by: Shyam Sundar S K #for ntb_hw_amd.c Acked-by: Dave Jiang # for ntb_hw_g

Re: [PATCH v7 00/27] DCD: Add support for Dynamic Capacity Devices (DCD)

2024-11-08 Thread Dave Jiang
On 11/7/24 1:58 PM, Ira Weiny wrote: > A git tree of this series can be found here: > > https://github.com/weiny2/linux-kernel/tree/dcd-v4-2024-11-07 > > This is a quick spin with minor clean ups Dave was going to apply as > well as a couple of clean ups I had slated for after V4 landed.

Re: [ndctl PATCH v2 5/6] ndctl/cxl: Add extent output to region query

2024-11-05 Thread Dave Jiang
On 11/4/24 7:10 PM, Ira Weiny wrote: > DCD regions have 0 or more extents. The ability to list those and their > properties is useful to end users. > > Add extent output to region queries. > > Signed-off-by: Ira Weiny > --- > Documentation/cxl/cxl-list.txt | 4 ++ > cxl/filter.h

Re: [ndctl PATCH v2 6/6] ndctl/cxl/test: Add Dynamic Capacity tests

2024-11-05 Thread Dave Jiang
On 11/4/24 7:10 PM, Ira Weiny wrote: > cxl_test provides a good way to ensure quick smoke and regression > testing. The complexity of DCD and the new sparse DAX regions required > to use them benefits greatly with a series of smoke tests. > > The only part of the kernel stack which must be byp

Re: [ndctl PATCH v2 4/6] cxl/region: Add creation of Dynamic capacity regions

2024-11-05 Thread Dave Jiang
On 11/4/24 7:10 PM, ira.we...@intel.com wrote: > From: Navneet Singh > > CXL Dynamic Capacity Devices (DCDs) optionally support dynamic capacity > with up to eight partitions (Regions) (dc0-dc7). CXL regions can now be > spare and defined as dynamic capacity (dc). > > Add support for DCD dev

Re: [ndctl PATCH v2 3/6] ndctl: Separate region mode from decoder mode

2024-11-05 Thread Dave Jiang
a new region mode enumeration and access function. > > To maintain compatibility with existing software the region mode values > are defined the same as the current decoder mode. In addition > cxl_region_get_mode() is retained. > > Signed-off-by: Ira Weiny Reviewed-by: Dave Jian

Re: [ndctl PATCH v2 2/6] ndctl/cxl/region: Report max size for region creation

2024-11-05 Thread Dave Jiang
t; Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang > --- > cxl/region.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/cxl/region.c b/cxl/region.c > index > 96aa5931d2281c7577679b7f6165218964fa0425..207cf2d003148992255c715f286bc0f38de2ca84

Re: [ndctl PATCH v2 1/6] ndctl/cxl-events: Don't fail test until event counts are reported

2024-11-05 Thread Dave Jiang
ount checks for pass/fail > of the test. > > Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang > --- > test/cxl-events.sh | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/test/cxl-events.sh b/test/cxl-events.sh > index

Re: [PATCH v5 00/27] DCD: Add support for Dynamic Capacity Devices (DCD)

2024-10-31 Thread Dave Jiang
On 10/30/24 7:48 AM, Jonathan Cameron wrote: > On Tue, 29 Oct 2024 15:34:35 -0500 > Ira Weiny wrote: > >> A git tree of this series can be found here: >> >> https://github.com/weiny2/linux-kernel/tree/dcd-v4-2024-10-29 >> >> Series info >> === >> >> This series has 4 parts: >> >>

Re: [PATCH v5 12/27] cxl/cdat: Gather DSMAS data for DCD regions

2024-10-30 Thread Dave Jiang
: Jonathan Cameron > Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang > --- > Changes: > [Fan: remove unwanted blank line] > [Rafael: Split out acpi change] > [iweiny: remove %pra use] > [Jonathan: s/cdat/CDAT/] > --- > drivers/cxl/core/cdat.c | 39 +

Re: [djiang:cxl/fwctl 13/25] drivers/cxl/cxlmem.h:798:44: error: 'counted_by' argument must be a simple declaration reference

2024-09-27 Thread Dave Jiang
On 9/27/24 6:41 AM, Nathan Chancellor wrote: > On Fri, Sep 27, 2024 at 09:39:54AM +0800, kernel test robot wrote: >> tree: https://git.kernel.org/pub/scm/linux/kernel/git/djiang/linux.git >> cxl/fwctl >> head: b4f2900f53c72de8fc639b62e44763c6a9695d3b >> commit: 5a0496c19151d83cd0d926f8a1488

Re: [PATCH v1] nvdimm: Correct some typos in comments

2024-09-26 Thread Dave Jiang
amepace ==> namespace > drivers/nvdimm/pmem.c:319: reenable ==> re-enable > > Signed-off-by: Shen Lichuan Reviewed-by: Dave Jiang > --- > drivers/nvdimm/nd_virtio.c | 2 +- > drivers/nvdimm/pfn_devs.c | 2 +- > drivers/nvdimm/pmem.c | 2 +- > 3 files changed, 3 inse

Re: [PATCH] btt: fix block integrity

2024-09-03 Thread Dave Jiang
On 8/30/24 1:42 PM, Keith Busch wrote: > From: Keith Busch > > bip is NULL before bio_integrity_prep(). > > Signed-off-by: Keith Busch Reviewed-by: Dave Jiang > --- > drivers/nvdimm/btt.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff

Re: [PATCH -next] nvdimm: Remove redundant null pointer checks

2024-09-03 Thread Dave Jiang
On 9/3/24 7:39 AM, Li Zetao wrote: > Since the debugfs_create_dir() never returns a null pointer, checking > the return value for a null pointer is redundant, and using IS_ERR is > safe enough. > > Signed-off-by: Li Zetao Reviewed-by: Dave Jiang > --- > drivers/nvdim

Re: [PATCH v3 11/25] cxl/mem: Expose DCD partition capabilities in sysfs

2024-08-23 Thread Dave Jiang
On 8/22/24 7:28 PM, Ira Weiny wrote: > Dave Jiang wrote: >> >> >> On 8/16/24 7:44 AM, ira.we...@intel.com wrote: >>> From: Navneet Singh >>> >>> To properly configure CXL regions on Dynamic Capacity Devices (DCD), >>> user space wil

Re: [ndctl PATCH] ndctl.spec.in: enable libtrace{event|fs} support for Fedora

2024-08-21 Thread Dave Jiang
ates to true, since 0 is less > than 9. The result is that ndctl builds for Fedora lack support for > libtraceevent and libtracefs. Correct the expression. > > Reposted here from github pull request: > https://github.com/pmem/ndctl/pull/266/ > > Signed-off-by: Jerry James Revie

Re: [PATCH v3 24/25] tools/testing/cxl: Make event logs dynamic

2024-08-20 Thread Dave Jiang
e concurrency required when user space is allowed to > control DCD extents > > Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang > > --- > Changes: > [iweiny: rebase] > --- > tools/testing/cxl/test/mem.c | 278 > ++- > 1

Re: [PATCH v3 23/25] cxl/mem: Trace Dynamic capacity Event Record

2024-08-20 Thread Dave Jiang
ed-off-by: Navneet Singh > Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang small nit below > > --- > Changes: > [Alison: Update commit message] > --- > drivers/cxl/core/mbox.c | 4 +++ > drivers/cxl/core/trace.h | 65 >

Re: [PATCH v2] virtio_pmem: Check device status before requesting flush

2024-08-20 Thread Dave Jiang
On 8/20/24 10:22 AM, Philip Chen wrote: > If a pmem device is in a bad status, the driver side could wait for > host ack forever in virtio_pmem_flush(), causing the system to hang. > > So add a status check in the beginning of virtio_pmem_flush() to return > early if the device is not activated

Re: [PATCH ndctl 2/2] libndctl.c: major and minor numbers are unsigned

2024-08-20 Thread Dave Jiang
minor numbers > that large, but let's fix it. > > Signed-off-by: Jeff Moyer Reviewed-by: Dave Jiang > --- > ndctl/lib/libndctl.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c > index dd

Re: [PATCH ndctl 1/2] ndctl/keys.c: don't leak fd in error cases

2024-08-20 Thread Dave Jiang
On 8/20/24 11:26 AM, jmo...@redhat.com wrote: > From: Jeff Moyer > > Static analysis points out that fd is leaked in some cases. The > change to the while loop is optional. I only did that to make the > code consistent. > > Signed-off-by: Jeff Moyer Re

Re: [PATCH v3 22/25] cxl/region: Read existing extents on region creation

2024-08-19 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > Dynamic capacity device extents may be left in an accepted state on a > device due to an unexpected host crash. In this case it is expected > that the creation of a new region on top of a DC partition can read > those ex

Re: [PATCH v3 21/25] dax/region: Create resources on sparse DAX regions

2024-08-19 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > DAX regions which map dynamic capacity partitions require that memory be > allowed to come and go. Recall sparse regions were created for this > purpose. Now that extents can be realized within DAX regions the DAX > reg

Re: [PATCH v3 20/25] dax/bus: Factor out dev dax resize logic

2024-08-19 Thread Dave Jiang
e tree > which is less complicated for finding space. > > In preparation for this change, factor out the dev_dax_resize logic. > For static regions use dax_region->res as the parent to find space for > the dax ranges. Future patches will use the same algorithm with > individual exte

Re: [PATCH v3 19/25] cxl/region/extent: Expose region extent information in sysfs

2024-08-19 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > Extent information can be helpful to the user to coordinate memory usage > with the external orchestrator and FM. > > Expose the details of region extents by creating the following > sysfs entries. > > /sys/bus/

Re: [PATCH v3 18/25] cxl/extent: Process DCD events and realize region extents

2024-08-19 Thread Dave Jiang
Process DCD events and create region devices. > > Signed-off-by: Navneet Singh > Co-developed-by: Ira Weiny > Signed-off-by: Ira Weiny A few nits below, but in general Reviewed-by: Dave Jiang > > --- > Changes: > [iweiny: combine this with the extent surface patches to be

Re: [PATCH v3 17/25] cxl/core: Return endpoint decoder information from region search

2024-08-19 Thread Dave Jiang
addition, well behaved > extents should be contained within an endpoint decoder. > > Return the endpoint decoder found to be used in subsequent DCD code. > > Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang > --- > drivers/cxl/core/core.h | 6 -- > drivers/cxl/c

Re: [PATCH v3 16/25] cxl/mem: Configure dynamic capacity interrupts

2024-08-16 Thread Dave Jiang
by the FW if FW first > has been selected by the BIOS. > > Signed-off-by: Navneet Singh > Co-developed-by: Ira Weiny > Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang > > --- > Changes: > [iweiny: update commit message] > [iweiny: rebase to upstream irq code] &g

Re: [PATCH v3 14/25] cxl/events: Split event msgnum configuration from irq setup

2024-08-16 Thread Dave Jiang
onfiguration. > > Split cxl_event_config_msgnums() from irq setup in preparation for > separate DCD interrupts configuration. > > Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang > --- > drivers/cxl/pci.c | 24 > 1 file changed, 12 insertions(+), 12 de

Re: [PATCH v3 13/25] cxl/region: Add sparse DAX region support

2024-08-16 Thread Dave Jiang
ax devices. There is no > known use case for range mapping on sparse regions. Avoid the > complication by preventing range mapping of dax devices on sparse > regions. > > Interleaving is deferred for now. Add checks. > > Signed-off-by: Navneet Singh > Co-d

Re: [PATCH v3 12/25] cxl/region: Refactor common create region code

2024-08-16 Thread Dave Jiang
ion_store() and create_ram_region_store() to use > a single common function to be used in subsequent DC code. > > Suggested-by: Fan Ni > Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang > --- > drivers/cxl/core/region.c | 28 +++- > 1 file changed, 11 inse

Re: [PATCH v3 11/25] cxl/mem: Expose DCD partition capabilities in sysfs

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > To properly configure CXL regions on Dynamic Capacity Devices (DCD), > user space will need to know the details of the DC partitions available. > > Expose dynamic capacity capabilities through sysfs. > > Signed-off-by:

Re: [PATCH v3 10/25] cxl/port: Add endpoint decoder DC mode support to sysfs

2024-08-16 Thread Dave Jiang
> Signed-off-by: Navneet Singh > Co-developed-by: Ira Weiny > Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang > > --- > Changes: > [Fan: change mode range logic] > [Fan: use !resource_size()] > [djiang: use the static mode name string array in mode_store()] >

Re: [PATCH v3 09/25] cxl/hdm: Add dynamic capacity size support to endpoint decoders

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > To support Dynamic Capacity Devices (DCD) endpoint decoders will need to > map DC partitions (regions). In addition to assigning the size of the > DC partition, the decoder must assign any skip value from the previous >

Re: [PATCH v3 08/25] cxl/region: Add dynamic capacity decoder and region modes

2024-08-16 Thread Dave Jiang
-by: Navneet Singh > Co-developed-by: Ira Weiny > Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang > > --- > Changes: > [iweiny: keep tags on simple patch] > [Fan: s/partitions/partition/] > [djiang: New wording for the commit message] > [iweiny: reword commit mess

Re: [PATCH v3 07/25] cxl/core: Separate region mode from decoder mode

2024-08-16 Thread Dave Jiang
just the code to process these modes > independently. > > There is no equal to decoder mode dead in region modes. Avoid > constructing regions with decoders which have been flagged as dead. > > Suggested-by: Jonathan Cameron > Signed-off-by: Navneet Singh > Co-developed-by: Ir

Re: [PATCH v3 06/25] cxl/mem: Read dynamic capacity configuration from the device

2024-08-16 Thread Dave Jiang
On 8/16/24 7:44 AM, ira.we...@intel.com wrote: > From: Navneet Singh > > Devices which optionally support Dynamic Capacity (DC) are configured > via mailbox commands. CXL 3.1 requires the host to issue the Get DC > Configuration command in order to properly configure DCDs. Without the > Get

Re: [PATCH v3 03/25] dax: Document dax dev range tuple

2024-08-16 Thread Dave Jiang
Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang > > --- > Changes: > [iweiny: move to start of series] > --- > drivers/dax/dax-private.h | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/dax/dax-private.h b/drivers/dax/dax-private.

Re: [PATCH] nvdimm/pmem: Set dax flag for all 'PFN_MAP' cases

2024-08-07 Thread Dave Jiang
e the dax flag to queue_limits") > Signed-off-by: Zhihao Cheng Reviewed-by: Dave Jiang > --- > drivers/nvdimm/pmem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c > index 1ae8b2351654..210fb77f5

Re: [PATCH] nvdimm: Use of_property_present() and of_property_read_bool()

2024-08-07 Thread Dave Jiang
ar functions. > of_(find|get)_property() leak the DT struct property and data pointers > which is a problem for dynamically allocated nodes which may be freed. > > Signed-off-by: Rob Herring (Arm) Reviewed-by: Dave Jiang > --- > drivers/nvdimm/of_pmem.c | 2 +- > drivers/n

Re: [ndctl PATCH] cxl/list: add firmware_version to default memdev listing

2024-07-25 Thread Dave Jiang
ew json member to the default memdev listing. > > This means users of the -F option will get the same info twice if > GET_FW_INFO is supported. > > [ > { > "memdev":"mem9", > "pmem_size":268435456, > "serial":0, > "ho

Re: [ndctl PATCH v13 3/8] util/trace: pass an event_ctx to its own parse_event method

2024-07-24 Thread Dave Jiang
> object and it allows the parse_event function to access any > members of the event_ctx structure. > > This is in preparation for adding a private parser requiring more > context for cxl_poison events. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- >

Re: [ndctl PATCH v13 1/8] util/trace: move trace helpers from ndctl/cxl/ to ndctl/util/

2024-07-24 Thread Dave Jiang
ove them to the ndctl/util/ where other generic helpers reside. > Replace cxl-ish naming with generic names and update the single > user, cxl/monitor.c, to match. > > This move is in preparation for extending the helpers in support > of cxl_poison trace events. > > Signed-o

Re: [RFC PATCH] cxl: avoid duplicating report from MCE & device

2024-07-19 Thread Dave Jiang
On 7/1/24 7:12 PM, Shiyang Ruan wrote: > > > 在 2024/6/25 21:56, Shiyang Ruan 写道: >> >> >> 在 2024/6/22 1:51, Dan Williams 写道: >>> Shiyang Ruan wrote: Background: Since CXL device is a memory device, while CPU consumes a poison page of CXL device, it always triggers a MCE by inter

Re: [ndctl PATCH] cxl/test: add cxl_translate unit test

2024-06-26 Thread Dave Jiang
tel.com/content/www/us/en/content-details/643805/cxl-memory-device-sw-guide.html > > Signed-off-by: Alison Schofield Looks ok to me. This is a direct copy of the kernel translation code? Is the intention to keep them in sync? Reviewed-by: Dave Jiang > --- > > More sample data

Re: [RFC PATCH] cxl: avoid duplicating report from MCE & device

2024-06-20 Thread Dave Jiang
On 6/19/24 2:24 AM, Shiyang Ruan wrote: > > > 在 2024/6/19 7:35, Dave Jiang 写道: >> >> >> On 6/18/24 9:53 AM, Shiyang Ruan wrote: >>> Background: >>> Since CXL device is a memory device, while CPU consumes a poison page of >>> CXL device, it

Re: [RFC PATCH] cxl: avoid duplicating report from MCE & device

2024-06-18 Thread Dave Jiang
On 6/18/24 9:53 AM, Shiyang Ruan wrote: > Background: > Since CXL device is a memory device, while CPU consumes a poison page of > CXL device, it always triggers a MCE by interrupt (INT18), no matter > which-First path is configured. This is the first report. Then > currently, in FW-First p

Re: [PATCH] nvdimm: Fix devs leaks in scan_labels()

2024-06-06 Thread Dave Jiang
On 6/3/24 8:16 PM, Li Zhijian wrote: > Don't allocate devs again when it's valid pointer which has pionted to > the memory allocated above with size (count + 2 * sizeof(dev)). > > A kmemleak reports: > unreferenced object 0x88800dda1980 (size 16): > comm "kworker/u10:5", pid 69, jiffies 4

Re: [PATCH RESEND] nvdimm: add missing MODULE_DESCRIPTION() macros

2024-06-06 Thread Dave Jiang
ON() in drivers/nvdimm/nd_btt.o > WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/nd_e820.o > WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/of_pmem.o > WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvdimm/nd_virtio.o > > Signed-off-by:

Re: [PATCH] nvdimm/btt: use sizeof(*pointer) instead of sizeof(type)

2024-06-06 Thread Dave Jiang
f-by: Erick Archer Reviewed-by: Dave Jiang > --- > drivers/nvdimm/btt.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c > index 1e5aedaf8c7b..b25df8fa8e8e 100644 > --- a/drivers/nvdimm/btt.c > +++

Re: [PATCH] ACPI: NFIT: add missing MODULE_DESCRIPTION() macro

2024-06-06 Thread Dave Jiang
On 6/3/24 6:30 AM, Jeff Johnson wrote: > make allmodconfig && make W=1 C=1 reports: > WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/acpi/nfit/nfit.o > > Add the missing invocation of the MODULE_DESCRIPTION() macro. > > Signed-off-by: Jeff Johnson

Re: [ndctl PATCH v2 2/2] daxctl: Remove unimplemented create-device options

2024-05-31 Thread Dave Jiang
On 5/30/24 11:29 PM, Li Zhijian wrote: > RECONFIG_OPTIONS and ZONE_OPTIONS are not implemented for create-device > and they will be ignored by create-device. Remove them so that the usage > message is identical to the manual. > > Signed-off-by: Li Zhijian Reviewed-by: Dave Ji

Re: [ndctl PATCH v2 1/2] daxctl: Fix create-device parameters parsing

2024-05-31 Thread Dave Jiang
"target_node":1, > "align":2097152, > "mode":"devdax" > } > ] > created 1 device > > where above user would want to specify '-r region0'. > > Check extra parameters starting from index 0 to ensure no extra paramet

Re: Lockdep annotation introduced warn in VMD driver

2024-05-29 Thread Dave Jiang
Re: Lockdep annotation introduced warn in VMD driver >>> >>> On Tue, 28 May 2024, Nirmal Patel wrote: >>>> On Tue, 28 May 2024 15:36:54 +0300 >>>> Imre Deak wrote: >>>> >>>>> Hi, >>>>> >>>>> commit

Re: Lockdep annotation introduced warn in VMD driver

2024-05-28 Thread Dave Jiang
On 5/28/24 5:36 AM, Imre Deak wrote: > Hi, > > commit 7e89efc6e9e402839643cb297bab14055c547f07 > Author: Dave Jiang > Date: Thu May 2 09:57:31 2024 -0700 > > PCI: Lock upstream bridge for pci_reset_function() > > introduced the WARN below in the VMD drive

Re: [PATCH ndctl] Build: Fix deprecated str.format() usage

2024-05-01 Thread Dave Jiang
ptions, > dictionaries and lists thereof.'} > > Fix this by explicit string concatenation for building paths for the > version script, whence the warnings originated. > > Signed-off-by: Dan Williams > Signed-off-by: Vishal Verma Thanks for fixing this! Reviewed-by: Da

Re: [PATCH v3 2/2] cxl/core: add poison creation event handler

2024-04-17 Thread Dave Jiang
On 4/17/24 12:50 AM, Shiyang Ruan wrote: > Currently driver only traces cxl events, poison creation (for both vmem > and pmem type) on cxl memdev is silent. OS needs to be notified then it > could handle poison pages in time. Per CXL spec, the device error event > could be signaled through FW-

Re: [PATCH][next] dax: remove redundant assignment to variable rc

2024-04-15 Thread Dave Jiang
ning: Value stored to 'rc' is never > read [deadcode.DeadStores] > > Signed-off-by: Colin Ian King Reviewed-by: Dave Jiang > --- > drivers/dax/bus.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c > index 797e

Re: [PATCH ndctl 2/2] daxctl/device.c: Fix error propagation in do_xaction_device()

2024-04-15 Thread Dave Jiang
ed status instead of returning the status of the last > device processed. > > Cc: Dan Williams > Cc: Alison Schofield > Signed-off-by: Vishal Verma Reviewed-by: Dave Jiang > --- > daxctl/device.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > dif

Re: [PATCH ndctl 1/2] daxctl/device.c: Handle special case of destroying daxX.0

2024-04-15 Thread Dave Jiang
an EBUSY. > > Cc: Dan Williams > Cc: Alison Schofield > Reported-by: Ira Weiny > Reported-by: Dave Jiang > Signed-off-by: Vishal Verma Reviewed-by: Dave Jiang > --- > daxctl/device.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/daxctl/devic

Re: [PATCH 0/2] nvdimm: Convert to platform remove callback returning void

2024-04-10 Thread Dave Jiang
vers/nvdimm/of_pmem.c | 6 ++ > 2 files changed, 4 insertions(+), 7 deletions(-) > > base-commit: 6ebf211bb11dfc004a2ff73a9de5386fa309c430 Reviewed-by: Dave Jiang for the series

Re: [ndctl PATCH] cxl/test: Add test case for region info to cxl-events.sh

2024-03-29 Thread Dave Jiang
in the > trace event. > > Add a test case that triggers these events with DPAs that map > into a region. Verify the region is included in the trace event. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > test/cxl-events.sh | 24 ++

Re: [PATCH] ndtest: Convert to platform remove callback returning void

2024-03-29 Thread Dave Jiang
converted, .remove_new() will be renamed to .remove(). > > Trivially convert this driver from always returning zero in the remove > callback to the void returning variant. > > Signed-off-by: Uwe Kleine-König Reviewed-by: Dave Jiang > --- > tools/testing/nvdimm/test/ndt

Re: [PATCH 18/22] nvdimm: virtio_pmem: drop owner assignment

2024-03-27 Thread Dave Jiang
On 3/27/24 5:41 AM, Krzysztof Kozlowski wrote: > virtio core already sets the .owner, so driver does not need to. > > Signed-off-by: Krzysztof Kozlowski Acked-by: Dave Jiang > > --- > > Depends on the first patch. > --- > drivers/nvdimm/virtio_pmem.c | 1 - &g

Re: [PATCH 18/22] nvdimm: virtio_pmem: drop owner assignment

2024-03-27 Thread Dave Jiang
On 3/27/24 5:41 AM, Krzysztof Kozlowski wrote: > virtio core already sets the .owner, so driver does not need to. > > Signed-off-by: Krzysztof Kozlowski Acked-by: Dave Jiang > > --- > > Depends on the first patch. > --- > drivers/nvdimm/virtio_pmem.c | 1 - &g

Re: [PATCH 08/28] ntb: Use PCI_IRQ_INTX

2024-03-26 Thread Dave Jiang
On 3/25/24 12:09 AM, Damien Le Moal wrote: > Use the macro PCI_IRQ_INTX instead of the deprecated PCI_IRQ_LEGACY > macro. > > Signed-off-by: Damien Le Moal Reviewed-by: Dave Jiang > --- > drivers/ntb/hw/idt/ntb_hw_idt.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH v2 1/1] cxl/mem: Fix for the index of Clear Event Record Handle

2024-03-19 Thread Dave Jiang
On 3/18/24 5:38 PM, Dan Williams wrote: > Jonathan Cameron wrote: >> On Mon, 18 Mar 2024 10:29:28 +0800 >> Yuquan Wang wrote: >> >>> The dev_dbg info for Clear Event Records mailbox command would report >>> the handle of the next record to clear not the current one. >>> >>> This was because the

Re: [ndctl PATCH v11 7/7] cxl/test: add cxl-poison.sh unit test

2024-03-15 Thread Dave Jiang
Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > test/cxl-poison.sh | 137 + > test/meson.build | 2 + > 2 files changed, 139 insertions(+) > create mode 100644 test/cxl-poison.sh > > diff --git a/test/cxl-pois

Re: [ndctl PATCH v11 6/7] cxl/list: add --media-errors option to cxl list

2024-03-15 Thread Dave Jiang
This option can apply to > memdevs or regions. > > Include media-errors in the -vvv verbose option. > > Example usage in the Documentation/cxl/cxl-list.txt update. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > Documentation/cxl/cxl-list.txt | 6

Re: [ndctl PATCH v11 5/7] cxl/list: collect and parse media_error records

2024-03-15 Thread Dave Jiang
ed > cxl_poison events into a json representation. > > Use the event_trace private parsing option to customize the json > representation based on cxl-list calling options and event field > settings. > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang Minor

Re: [ndctl PATCH v11 4/7] cxl/event_trace: add helpers to retrieve tep fields by type

2024-03-15 Thread Dave Jiang
so return > the 'type'_MAX of the type when the field is > > Since this is in preparation for adding a cxl_poison private parser > for 'cxl list --media-errors' support those specific required > types: u8, u32, u64. > > Signed-off-by: Alison Schofield

[GIT PULL] NVDIMM//DAX changes for 6.9

2024-03-14 Thread Dave Jiang
Hi Linus, please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git tags/libnvdimm-for-6.9 ... to get updates to the nvdimm tree. They are a number of updates to interfaces used by nvdimm/dax and a documentation fix. Doc fixes: ACPI_NFIT Kconfig documetation f

Re: [ndctl PATCH v9 5/7] cxl/list: collect and parse media_error records

2024-03-04 Thread Dave Jiang
On 2/29/24 6:31 PM, alison.schofi...@intel.com wrote: > From: Alison Schofield > > Media_error records are logged as events in the kernel tracing > subsystem. To prepare the media_error records for cxl list, enable > tracing, trigger the poison list read, and parse the generated > cxl_poison e

Re: [ndctl PATCH v9 4/7] cxl/event_trace: add helpers to retrieve tep fields by type

2024-03-04 Thread Dave Jiang
> Since this is in preparation for adding a cxl_poison private parser > for 'cxl list --media-errors' support, add those specific required > types: u8, u32, u64, char* > > Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang > --- > cxl/event_trace.c | 75 +

[NDCTL PATCH v9 4/4] ndctl: add test for qos_class in CXL test suite

2024-03-04 Thread Dave Jiang
Add tests in cxl-qos-class.sh to verify qos_class are set with the fake qos_class create by the kernel. Root decoders should have qos_class attribute set. Memory devices should have ram_qos_class or pmem_qos_class set depending on which partitions are valid. Signed-off-by: Dave Jiang --- test

  1   2   3   4   5   6   7   8   9   10   >