[GIT PULL] NVDIMM and DAX for 6.10

2024-05-15 Thread Ira Weiny
to the current kernel interfaces such as using const for struct device_type and changing the platform remove callback signature. Thank you, Ira Weiny --- The following changes since commit ed30a4a51bb196781c8058073ea720133a65596f: Linux 6.9-rc5 (2024-04-21 12:35:54 -0700) are available in the Git

Re: [ndctl PATCH v2] cxl/test: use max_available_extent in cxl-destroy-region

2024-04-25 Thread Ira Weiny
mparison succeeds when cxl create-region command emits nothing. > Use the ! comparator when checking the create-region result. > > When checking the ram_size output of cxl-list add a check for empty. > > Signed-off-by: Alison Schofield Reviewed-by: Ira Weiny

Re: [PATCH v2 21/25] nvdimm: virtio_pmem: drop owner assignment

2024-04-25 Thread Ira Weiny
Krzysztof Kozlowski wrote: > virtio core already sets the .owner, so driver does not need to. > > Acked-by: Dave Jiang Acked-by: Ira Weiny > Signed-off-by: Krzysztof Kozlowski > --- > > Depends on the first patch. > --- > drivers/nvdimm/virtio_pmem.c | 1 - &g

Re: [PATCH v2 21/25] nvdimm: virtio_pmem: drop owner assignment

2024-04-25 Thread Ira Weiny
Krzysztof Kozlowski wrote: > virtio core already sets the .owner, so driver does not need to. > > Acked-by: Dave Jiang Acked-by: Ira Weiny > Signed-off-by: Krzysztof Kozlowski > --- > > Depends on the first patch. > --- > drivers/nvdimm/virtio_pmem.c | 1 - &g

Re: [PATCH v5 09/13] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-04-25 Thread Ira Weiny
Markus Armbruster wrote: > fan writes: > > > On Wed, Apr 24, 2024 at 03:09:52PM +0200, Markus Armbruster wrote: > >> nifan@gmail.com writes: > >> > >> > From: Fan Ni > >> > > >> > Since fabric manager emulation is not supported yet, the change > >> > implements > >> > the functions to

Re: [PATCH v3 1/2] cxl/core: correct length of DPA field masks

2024-04-25 Thread Ira Weiny
Shiyang Ruan wrote: > > > 在 2024/4/24 5:04, Ira Weiny 写道: > > Alison Schofield wrote: > >> On Wed, Apr 17, 2024 at 03:50:52PM +0800, Shiyang Ruan wrote: > > > > [snip] > > > >>> diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core

Re: [PATCH v5 09/13] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents

2024-04-24 Thread Ira Weiny
Markus Armbruster wrote: > nifan@gmail.com writes: > > > From: Fan Ni > > > > Since fabric manager emulation is not supported yet, the change implements > > the functions to add/release dynamic capacity extents as QMP interfaces. > > Will fabric manager emulation obsolete these commands? I

Re: [PATCH v3 1/2] cxl/core: correct length of DPA field masks

2024-04-23 Thread Ira Weiny
Alison Schofield wrote: > On Wed, Apr 17, 2024 at 03:50:52PM +0800, Shiyang Ruan wrote: [snip] > > diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h > > index e5f13260fc52..cdfce932d5b1 100644 > > --- a/drivers/cxl/core/trace.h > > +++ b/drivers/cxl/core/trace.h > > @@ -253,7

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

2024-04-23 Thread Ira Weiny
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-First and OS-First

Re: [PATCH v3 1/2] cxl/core: correct length of DPA field masks

2024-04-23 Thread Ira Weiny
Media Event Record") > Cc: > Cc: Dan Williams > Cc: Davidlohr Bueso > Cc: Jonathan Cameron > Cc: Ira Weiny Apologies I thought I saw this go in before. But perhaps it was a different mask. Reviewed-by: Ira Weiny > Signed-off-by: Shiyang Ruan > --- > d

Re: [RFC PATCH v2 00/19] PKS write protected page tables

2024-03-14 Thread Ira Weiny
Edgecombe, Rick P wrote: > On Thu, 2024-03-14 at 09:27 -0700, Kees Cook wrote: > > On Mon, Aug 30, 2021 at 04:59:08PM -0700, Rick Edgecombe wrote: > > > This is a second RFC for the PKS write protected tables concept. > > > I'm sharing to > > > show the progress to interested people. I'd also

Re: [PATCH v2] acpi/ghes: Prevent sleeping with spinlock held

2024-02-15 Thread Ira Weiny
Jonathan Cameron wrote: > On Wed, 14 Feb 2024 17:33:18 -0500 > Steven Rostedt wrote: > > > On Wed, 14 Feb 2024 14:19:19 -0800 > > Ira Weiny wrote: > > > > > > > Jonathan Cameron wrote: > > > > > > > > >

Re: [PATCH v2] acpi/ghes: Prevent sleeping with spinlock held

2024-02-14 Thread Ira Weiny
Ira Weiny wrote: > Jonathan Cameron wrote: > > On Wed, 14 Feb 2024 10:23:10 -0500 > > Steven Rostedt wrote: > > > > > On Wed, 14 Feb 2024 12:11:53 + > > > Jonathan Cameron wrote: > > > > > > > So I'm thinking this

Re: [PATCH v2] acpi/ghes: Prevent sleeping with spinlock held

2024-02-14 Thread Ira Weiny
Jonathan Cameron wrote: > On Wed, 14 Feb 2024 10:23:10 -0500 > Steven Rostedt wrote: > > > On Wed, 14 Feb 2024 12:11:53 + > > Jonathan Cameron wrote: > > > > > So I'm thinking this is a won't fix - wait for the printk rework to land > > > and > > > assume this will be resolved as well?

Re: [PATCH v2] acpi/ghes: Prevent sleeping with spinlock held

2024-02-14 Thread Ira Weiny
Jonathan Cameron wrote: > On Wed, 14 Feb 2024 10:23:10 -0500 > Steven Rostedt wrote: > > > On Wed, 14 Feb 2024 12:11:53 + > > Jonathan Cameron wrote: > > > > > So I'm thinking this is a won't fix - wait for the printk rework to land > > > and > > > assume this will be resolved as well?

Re: [PATCH v2] acpi/ghes: Prevent sleeping with spinlock held

2024-02-14 Thread Ira Weiny
Ira Weiny wrote: > Jonathan Cameron wrote: > > On Tue, 06 Feb 2024 14:15:32 -0800 > > Ira Weiny wrote: > > > > [snip] > > > > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c > > index 9ff8a439d674..7ee45f22f56f 100644 > > --- a/

Re: [PATCH v2] acpi/ghes: Prevent sleeping with spinlock held

2024-02-14 Thread Ira Weiny
Jonathan Cameron wrote: > On Tue, 06 Feb 2024 14:15:32 -0800 > Ira Weiny wrote: > > > Smatch caught that cxl_cper_post_event() is called with a spinlock held > > or preemption disabled.[1] The callback takes the device lock to > > perform address translatio

Re: [PATCH] libnvdimm: Fix ACPI_NFIT in BLK_DEV_PMEM help

2024-02-12 Thread Ira Weiny
Peter Robinson wrote: > The ACPI_NFIT config option is described incorrectly as the > inverse NFIT_ACPI, which doesn't exist, so update the help > to the actual config option. > > Fixes: 18da2c9ee41a0 ("libnvdimm, pmem: move pmem to drivers/nvdimm/") I don't think this warrants a fixes tag as

Re: [PATCH] bswap.h: Fix const_le64() macro

2024-01-23 Thread Ira Weiny
> even if the input to the macro is a smaller type, and so the shifts > will be in range. > > Fixes: 845d80a8c7b187 ("qemu/bswap: Add const_le64()") > Signed-off-by: Peter Maydell Thanks! Reviewed-by: Ira Weiny

[GIT PULL] NVDIMM/NFIT changes for 6.8

2024-01-10 Thread Ira Weiny
Hi Linus, please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git tags/libnvdimm-for-6.8 ... to get updates to the nvdimm tree. They are a mix of bug fixes and updates to interfaces used by nvdimm. Updates to interfaces include: Use the new scope based

Re: [PATCH 3/3] nvdimm/namespace: fix kernel-doc for function params

2023-12-21 Thread Ira Weiny
Randy Dunlap wrote: > > > On 12/21/23 14:32, Ira Weiny wrote: > > Randy Dunlap wrote: > > > > [snip] > > > >> @@ -1656,8 +1664,10 @@ static int select_pmem_id(struct nd_regi > >> /** > >> * create_namespace_pmem - validate interle

Re: [PATCH 2/3] nvdimm/dimm_devs: fix kernel-doc for function params

2023-12-21 Thread Ira Weiny
Ira Weiny wrote: > Randy Dunlap wrote: [snip] > > diff -- a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c > > --- a/drivers/nvdimm/dimm_devs.c > > +++ b/drivers/nvdimm/dimm_devs.c > > @@ -53,7 +53,10 @@ static int validate_dimm(struct nvdimm_d > > &g

Re: [PATCH 3/3] nvdimm/namespace: fix kernel-doc for function params

2023-12-21 Thread Ira Weiny
t; + * @nd_mapping: container of dpa-resource-root + labels > * @nd_label: target pmem namespace label to evaluate > + * > + * Returns: the created device on success or -errno on error NIT: should this be ERR_PTR(-errno) on error? Generally good to me though. Reviewed-by: Ira Weiny >

Re: [PATCH 2/3] nvdimm/dimm_devs: fix kernel-doc for function params

2023-12-21 Thread Ira Weiny
found for return value of > 'nvdimm_allocated_dpa' > > Signed-off-by: Randy Dunlap > Cc: Dan Williams > Cc: Vishal Verma > Cc: Dave Jiang > Cc: Ira Weiny > Cc: nvd...@lists.linux.dev > --- > drivers/nvdimm/dimm_devs.c | 14 -- > 1 file changed, 12 inse

Re: [PATCH 1/3] nvdimm/btt: fix btt_blk_cleanup() kernel-doc

2023-12-21 Thread Ira Weiny
gt; Signed-off-by: Randy Dunlap > Cc: Vishal Verma > Cc: Dan Williams > Cc: Dave Jiang > Cc: Ira Weiny Reviewed-by: Ira Weiny > Cc: nvd...@lists.linux.dev > --- > drivers/nvdimm/btt.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [PATCH v3] ACPI: NFIT: Use cleanup.h helpers instead of devm_*()

2023-12-21 Thread Ira Weiny
Rafael J. Wysocki wrote: > On Wed, Oct 18, 2023 at 6:28 AM Dan Williams wrote: > > > > Michal Wilczynski wrote: > > > The new cleanup.h facilities that arrived in v6.5-rc1 can replace the > > > the usage of devm semantics in acpi_nfit_init_interleave_set(). That > > > routine appears to only be

Re: [PATCH] [v2] nvdimm-btt: fix several memleaks

2023-12-19 Thread Ira Weiny
dinghao.liu@ wrote: > > Ira Weiny wrote: > > > Dinghao Liu wrote: > > > > [snip] > > > > -static int btt_freelist_init(struct arena_info *arena) > > +static int btt_freelist_init(struct device *dev, struct arena_info *arena) > > > >

Re: [PATCH] [v2] nvdimm-btt: fix several memleaks

2023-12-15 Thread Ira Weiny
Ira Weiny wrote: > Dinghao Liu wrote: [snip] > > > > -static int btt_maplocks_init(struct arena_info *arena) > > +static int btt_maplocks_init(struct device *dev, struct arena_info *arena) > > { > > u32 i; > > > > - arena->map_locks =

Re: [PATCH] [v2] nvdimm-btt: fix several memleaks

2023-12-14 Thread Ira Weiny
Dinghao Liu wrote: > Resources allocated by kcalloc() in btt_freelist_init(), > btt_rtt_init(), and btt_maplocks_init() are not correctly > released in their callers when an error happens. For > example, when an error happens in btt_freelist_init(), its > caller discover_arenas() will directly

Re: [PATCH] driver core: Add a guard() definition for the device_lock()

2023-12-13 Thread Ira Weiny
prevent new ones from appearing. > > Link: > http://lore.kernel.org/r/657897453dda8_269bd29...@dwillia2-mobl3.amr.corp.intel.com.notmuch > Link: > http://lore.kernel.org/r/6577b0c2a02df_a04c529...@dwillia2-xfh.jf.intel.com.notmuch > Cc: Vishal Verma > Cc: Ira Weiny Reviewed-b

Re: [PATCH v4 2/3] dax/bus: Introduce guard(device) for device_{lock,unlock} flows

2023-12-12 Thread Ira Weiny
e, so change these > where applicable. > > Cc: Joao Martins > Suggested-by: Dan Williams > Signed-off-by: Vishal Verma > Reviewed-by: Ira Weiny

Re: [PATCH] nvdimm-btt: fix a potential memleak in btt_freelist_init

2023-12-08 Thread Ira Weiny
dinghao.liu@ wrote: > > Dave Jiang wrote: [snip] > > That said, this patch does not completely fix freelist from leaking in the > > following error path. > > > > discover_arenas() > > btt_freelist_init() -> ok (memory allocated) > > btt_rtt_init() -> fail > >

Re: [PATCH] nvdimm-btt: fix a potential memleak in btt_freelist_init

2023-12-07 Thread Ira Weiny
Dave Jiang wrote: > [snip] First off thanks for the patch. This code seems to have a few things to clean up. > > On 12/6/23 20:43, Dinghao Liu wrote: > > When an error happens in btt_freelist_init(), its caller > > discover_arenas() will directly free arena, which makes > > arena->freelist

Re: [PATCH] tools/testing/nvdimm: Add compile-test coverage for ndtest

2023-12-06 Thread Ira Weiny
p://lore.kernel.org/r/2023112729-aids-drainable-5744@gregkh > Cc: Greg KH > Cc: Yi Zhang > Cc: Dave Jiang > Cc: Ira Weiny Reviewed-by: Ira Weiny

Re: [PATCH ndctl RESEND 1/2] ndctl/test: Add destroy region test

2023-12-05 Thread Ira Weiny
Verma, Vishal L wrote: [snip] > > > > +# Find a memory device to create regions on to test the destroy > > > > +readarray -t mems < <("$CXL" list -b cxl_test -M | jq -r '.[].memdev') > > > > +for mem in ${mems[@]}; do > > > > +    ramsize=$($CXL list -m $mem | jq -r '.[].ram_size') > > > > + 

Re: [PATCH ndctl RESEND 1/2] ndctl/test: Add destroy region test

2023-12-04 Thread Ira Weiny
Alison Schofield wrote: > On Thu, Nov 30, 2023 at 08:06:13PM -0800, Ira Weiny wrote: [snip] > > + > > +check_destroy_devdax() > > +{ > > + mem=$1 > > + decoder=$2 > > + > > + region=$($CXL create-region -d "$decoder" -m &q

RE: [PATCH v2] daxctl: Remove unused memory_zone and mem_zone

2023-11-30 Thread Ira Weiny
emove unused memory_zone and mem_zone > > The enum memory_zone definition and mem_zone variable have never been used so > remove them. NIT: I don't know that they have never been used but they certainly seem to have been moved to the library. > > Signed-off-by: Xiao Yang Reviewed-by: Ira Weiny

[PATCH ndctl RESEND 2/2] cxl/region: Fix memory device teardown in disable-region

2023-11-30 Thread Ira Weiny
as is the case for a region with only devdax devices. Such devices do not need to be off-lined explicitly. Skip non-system-ram devices rather than error the operation. Fixes: 9399aa667ab0 ("cxl/region: Add -f option for disable-region") Cc: Dave Jiang Signed-off-by: Ira Weiny --- cx

[PATCH ndctl RESEND 1/2] ndctl/test: Add destroy region test

2023-11-30 Thread Ira Weiny
Commit 9399aa667ab0 ("cxl/region: Add -f option for disable-region") introduced a regression when destroying a region. Add a tests for destroying a region. Cc: Dave Jiang Signed-off-by: Ira Weiny --- test/cxl-destroy-region.sh | 76 ++

[PATCH ndctl RESEND 0/2] ndctl: Fix ups for region destroy

2023-11-30 Thread Ira Weiny
The patch to force device tear down on region disable caused a regression for regions without system ram. Add a test for such a case and a fix to the patch. Signed-off-by: Ira Weiny --- [djiang: RESEND with proper mailing lists.] --- Ira Weiny (2): ndctl/test: Add destroy region test

Re: [PATCH] ndtest: fix typo class_regster -> class_register

2023-11-27 Thread Ira Weiny
Greg KH wrote: > On Mon, Nov 27, 2023 at 10:00:14AM -0700, Dave Jiang wrote: > > > > [snip] > Ick, sorry about that, obviously this test isn't actually built by any > bots :( Indeed. I'm looking through the tests I ran now. > > I'll go queue this up now, Thanks, Ira

Re: [PATCH v3 0/9] Enabling DCD emulation support in Qemu

2023-11-16 Thread Ira Weiny
nifan.cxl@ wrote: > From: Fan Ni > > > The patch series are based on Jonathan's branch cxl-2023-09-26. Finally getting around to trying this new series and the patch series does not seem to apply on top of this branch? Just to verify is this the top commit this work was based on?

[GIT PULL] NVDIMM for 6.7

2023-11-01 Thread Ira Weiny
Hi Linus, please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git tags/libnvdimm-for-6.7 ... to get updates to the nvdimm tree. They are a mix of bug fixes and updates to interfaces used by nvdimm. Bug fixes include: Fix a sleep during spinlock in

Re: [PATCH] Install Notify() handler before getting NFIT table

2023-10-20 Thread Ira Weiny
Rafael J. Wysocki wrote: > On Thu, Oct 19, 2023 at 2:57 PM chenxiang wrote: > > > > From: Xiang Chen > > > > If there is no NFIT at startup, it will return 0 immediately in function > > acpi_nfit_add() and will not install Notify() handler. If hotplugging > > a nvdimm device later, it will not

Re: [PATCH] testing: nvdimm: make struct class structures constant

2023-10-11 Thread Ira Weiny
Dan Williams > Cc: Vishal Verma > Cc: Dave Jiang > Cc: Ira Weiny Tested-by: Ira Weiny Reviewed-by: Ira Weiny > Signed-off-by: Greg Kroah-Hartman > --- > tools/testing/nvdimm/test/ndtest.c | 17 + > tools/testing/nvdimm/test/nfit.c | 14 +++--- &

[PATCH ndctl] ndctl/cxl/region: Report max size for region creation

2023-09-26 Thread Ira Weiny
When creating a region if the size exceeds the max an error is printed. However, the max available space is not reported which makes it harder to determine what is wrong. Add the max size available to the output error. Signed-off-by: Ira Weiny --- cxl/region.c | 4 ++-- 1 file changed, 2

[PATCH ndctl RESEND] test/cxl-event: Skip cxl event testing if cxl-test is not available

2023-09-25 Thread Ira Weiny
CXL event testing is only appropriate when the cxl-test modules are available. Return error 77 (skip) if cxl-test modules are not available. Reported-by: Dave Jiang Signed-off-by: Ira Weiny --- Changes for resend: - iweiny: properly cc the mailing lists --- test/cxl-events.sh | 3 +++ 1 file

Re: [PATCH v2] nd_btt: Make BTT lanes preemptible

2023-09-25 Thread Ira Weiny
> Fixes: 5212e11fde4d ("nd_btt: atomic sector updates") > Signed-off-by: Tomas Glozar Thanks for the clarification. Reviewed-by: Ira Weiny

Re: [PATCH] nd_btt: Make BTT lanes preemptible

2023-09-18 Thread Ira Weiny
Tomas Glozar wrote: > čt 14. 9. 2023 v 22:18 odesílatel Ira Weiny napsal: > > Is the bug in 1 of 2 places? > > > > 1) When btt_write_pg()->lock_map() (when the number of lanes is < number > >of cpus) and the lane is acquired is called? > > > >

Re: [PATCH 2/3] hw/mem/cxl_type3: Add missing copyright and license notice

2023-09-18 Thread Ira Weiny
ave let more gpl-2-only code into the > > codebase without a rationale...) I'm curious about this statement. Does the qemu project not want gpl v2 only code? I agree with Jonathan that this is the intention of Ben's initial submission; so from that PoV. Acked-by: Ira Weiny Going forwar

Re: [PATCH v3] libnvdimm/of_pmem: Use devm_kstrdup instead of kstrdup and check its return value

2023-09-15 Thread Ira Weiny
Chen Ni wrote: > Use devm_kstrdup() instead of kstrdup() and check its return value to > avoid memory leak. > > Fixes: 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique name for bus > provider") > Signed-off-by: Chen Ni Reviewed-by: Ira Weiny > --- > Cha

Re: [PATCH v2 2/2] ACPI: NFIT: use struct_size() helper

2023-09-15 Thread Ira Weiny
Yu Liao wrote: > Make use of the struct_size() helper instead of an open-coded version, > in order to avoid any potential type mistakes or integer overflows that, > in the worst scenario, could lead to heap overflows. > > Signed-off-by: Yu Liao > Reviewed-by: Dave Jiang Revi

Re: [PATCH v2 1/2] ACPI: NFIT: Fix incorrect calculation of idt size

2023-09-15 Thread Ira Weiny
ddDVKsqQX@kreacher/ > > Fixes: 2a5ab99847bd ("ACPICA: struct acpi_nfit_interleave: Replace 1-element > array with flexible array") > Cc: sta...@vger.kernel.org # v6.4+ > Signed-off-by: Yu Liao > Reviewed-by: Dave Jiang Reviewed-by: Ira Weiny > --- > v1 ->

Re: [PATCH] nd_btt: Make BTT lanes preemptible

2023-09-14 Thread Ira Weiny
Tomáš Glozar wrote: > From: Tomas Glozar > > nd_region_acquire_lane uses get_cpu, which disables preemption. This is > an issue on PREEMPT_RT kernels, since btt_write_pg and also > nd_region_acquire_lane itself take a spin lock, resulting in BUG: > sleeping function called from invalid context.

Re: [PATCH v3] libnvdimm/of_pmem: Use devm_kstrdup instead of kstrdup and check its return value

2023-09-14 Thread Ira Weiny
Dave Jiang wrote: > > > On 9/14/23 00:03, Chen Ni wrote: [snip] > > diff --git a/drivers/nvdimm/of_pmem.c b/drivers/nvdimm/of_pmem.c > > index 1b9f5b8a6167..5765674b36f2 100644 > > --- a/drivers/nvdimm/of_pmem.c > > +++ b/drivers/nvdimm/of_pmem.c > > @@ -30,7 +30,13 @@ static int

Re: [PATCH v2] nvdimm: of_pmem: Check return value and add kfree for kstrdup

2023-08-29 Thread Ira Weiny
Chen Ni wrote: > Check the return value of kstrdup() and add kfree() for kstrdup() to > avoid memory leak. > > Fixes: 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique name for bus > provider") > Signed-off-by: Chen Ni > --- > Changelog: > > v1 -> v2: > > 1.Add a fixes tag. > 2.Update

Re: [PATCH ndctl v2] ndctl/cxl/test: Add CXL event test

2023-08-01 Thread Ira Weiny
Verma, Vishal L wrote: > On Mon, 2023-07-31 at 16:53 -0700, Ira Weiny wrote: > > Previously CXL event testing was run by hand.  This reduces testing > > Reduces or increases / improves? Or did you mean running by hand > reduced coverage. Running by hand reduces test cov

[PATCH ndctl v2] ndctl/cxl/test: Add CXL event test

2023-07-31 Thread Ira Weiny
are not checked. Signed-off-by: Ira Weiny --- Changes in v2: [djiang] run shellcheck and fix as needed [vishal] quote variables [vishal

Re: [PATCH ndctl] ndctl/cxl/test: Add CXL event test

2023-07-31 Thread Ira Weiny
Verma, Vishal L wrote: > On Thu, 2023-07-27 at 14:21 -0700, Ira Weiny wrote: > > Previously CXL event testing was run by hand.  This reduces testing > > coverage including a lack of regression testing. > > > > Add a CXL test as part of the meson test infrastructure.

Re: [PATCH ndctl] ndctl/cxl/test: Add CXL event test

2023-07-27 Thread Ira Weiny
Dave Jiang wrote: > > > On 7/27/23 14:21, Ira Weiny wrote: > > Previously CXL event testing was run by hand. This reduces testing > > coverage including a lack of regression testing. > > > > Add a CXL test as part of the meson test infrastructure. Passi

[PATCH ndctl] ndctl/cxl/test: Add CXL event test

2023-07-27 Thread Ira Weiny
. Signed-off-by: Ira Weiny --- test/cxl-events.sh | 68 ++ test/meson.build | 2 ++ 2 files changed, 70 insertions(+) diff --git a/test/cxl-events.sh b/test/cxl-events.sh new file mode 100644 index ..f51046ec39ad --- /dev/null

Re: [Qemu RFC 0/7] Early enabling of DCD emulation in Qemu

2023-07-25 Thread Ira Weiny
Fan Ni wrote: > On Thu, May 11, 2023 at 05:56:40PM +, Fan Ni wrote: > > FYI. > > I have updated the patch series and sent out again. > > I suggested anyone who are interested in DCD and using this patch series to > use the new series. Quite a few things has been fixed. > >

Re: [PATCH] Remove unnecessary calls to kmap{,_local_page}() when acquiring pages using GFP_DMA32.

2023-07-23 Thread Ira Weiny
ion. > > [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com/ > [2]: https://lwn.net/Articles/836503/ > > Suggested-by: Ira Weiny Reviewed-by: Ira Weiny > Signed-off-by: Sumitra Sharma > --- > drivers/gpu/drm/gma500/mmu.c | 11 +++ > 1 file c

Re: [Qemu PATCH 0/9] Enabling DCD emulation support in Qemu

2023-07-22 Thread Ira Weiny
nifan@ wrote: > From: Fan Ni > > The patch series provides dynamic capacity device (DCD) emulation in Qemu. > More specifically, it provides the following functionalities: > 1. Extended type3 memory device to support DC regions and extents. > 2. Implemented DCD related mailbox command support in

Re: [Qemu PATCH 0/9] Enabling DCD emulation support in Qemu

2023-07-22 Thread Ira Weiny
nifan@ wrote: > From: Fan Ni > > The patch series provides dynamic capacity device (DCD) emulation in Qemu. I don't the patches on the list. https://lore.kernel.org/all/sg2pr06mb33976bb3f9c47cbe08f02d09b2...@sg2pr06mb3397.apcprd06.prod.outlook.com/ Did they get sent? Ira > More

Re: [PATCH v3] libnvdimm/of_pmem: Replace kstrdup with devm_kstrdup and add check

2023-07-10 Thread Ira Weiny
;) > Signed-off-by: Jiasheng Jiang LTGM Reviewed-by: Ira Weiny > --- > Changelog: > > v2 -> v3: > > 1. Correct the usage of devm_kstrdup(). > > v1 -> v2: > > 1. Replace kstrdup() with devm_kstrdup(). > --- > drivers/nvdimm/of_pmem.c | 7 ++- &g

Re: [PATCH] libnvdimm/of_pmem: Add check and kfree for kstrdup

2023-06-23 Thread Ira Weiny
Jiasheng Jiang wrote: > On Wed, Jun 21, 2023 at 00:04:36 +0800, Ira Weiny wrote: > > Ira Weiny wrote: > >> Jiasheng Jiang wrote: [snip] > >> > >> Nice catch! > >> > >> However, this free needs to happen in of_pmem_region_remove() as wel

Re: [PATCH] libnvdimm/of_pmem: Replace kstrdup with devm_kstrdup and add check

2023-06-23 Thread Ira Weiny
Jiasheng Jiang wrote: > Replace kstrdup() with devm_kstrdup() to avoid memory leak and > add check for the return value of the devm_kstrdup() to avoid > NULL pointer dereference > > Fixes: 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique name for bus > provider") > Signed-off-by: Jiasheng

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-21 Thread Ira Weiny
Thomas Hellström (Intel) wrote: > > I think one thing worth mentioning in the context of this patch is that > IIRC kmap_local_page() will block offlining of the mapping CPU until > kunmap_local(), so while I haven't seen any guidelines around the usage > of this api for long-held mappings, I

Re: [Intel-gfx] [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-21 Thread Ira Weiny
Thomas Hellström (Intel) wrote: > > I think one thing worth mentioning in the context of this patch is that > IIRC kmap_local_page() will block offlining of the mapping CPU until > kunmap_local(), so while I haven't seen any guidelines around the usage > of this api for long-held mappings, I

Re: [PATCH] libnvdimm/of_pmem: Add check and kfree for kstrdup

2023-06-20 Thread Ira Weiny
Ira Weiny wrote: > Jiasheng Jiang wrote: > > Add check for the return value of kstrdup() and return the error > > if it fails in order to avoid NULL pointer dereference. > > Moreover, use kfree() in the later error handling in order to avoid > > memory leak. &

Re: [PATCH] libnvdimm/of_pmem: Add check and kfree for kstrdup

2023-06-20 Thread Ira Weiny
Jiasheng Jiang wrote: > Add check for the return value of kstrdup() and return the error > if it fails in order to avoid NULL pointer dereference. > Moreover, use kfree() in the later error handling in order to avoid > memory leak. > > Fixes: 49bddc73d15c ("libnvdimm/of_pmem: Provide a unique

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-20 Thread Ira Weiny
Sumitra Sharma wrote: > On Sun, Jun 18, 2023 at 11:11:08AM -0700, Ira Weiny wrote: > > Sumitra Sharma wrote: > > > kmap() has been deprecated in favor of the kmap_local_page() > > > due to high cost, restricted mapping space, the overhead of a > > > global

Re: [Intel-gfx] [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-20 Thread Ira Weiny
Sumitra Sharma wrote: > On Sun, Jun 18, 2023 at 11:11:08AM -0700, Ira Weiny wrote: > > Sumitra Sharma wrote: > > > kmap() has been deprecated in favor of the kmap_local_page() > > > due to high cost, restricted mapping space, the overhead of a > > > global

Re: [Intel-gfx] [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-18 Thread Ira Weiny
ction > “i915_vma_coredump_create” in i915_gpu_error.c > > Therefore, replace kmap() with kmap_local_page(). > > Suggested-by: Ira Weiny > NIT: No need for the line break between Suggested-by and your signed off line. > Signed-off-by: Sumitra Sharma > --- > &g

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-18 Thread Ira Weiny
ction > “i915_vma_coredump_create” in i915_gpu_error.c > > Therefore, replace kmap() with kmap_local_page(). > > Suggested-by: Ira Weiny > NIT: No need for the line break between Suggested-by and your signed off line. > Signed-off-by: Sumitra Sharma > --- > &g

Re: [PATCH 3/4] dax: Introduce alloc_dev_dax_id()

2023-06-16 Thread Ira Weiny
Dan Williams wrote: > Ira Weiny wrote: > > Dan Williams wrote: > > > The reference counting of dax_region objects is needlessly complicated, > > > has lead to confusion [1], and has hidden a bug [2]. Towards cleaning up > > > that mess introduce alloc_

Re: [PATCH] dax: include bus.h for definition of run_dax()

2023-06-16 Thread Ira Weiny
Ben Dooks wrote: > The run_dax() prototype is defined in "bus.h" but drivers/dax/super.c > does not include this. Include bus.h to silece the following sparse > warning: > > drivers/dax/super.c:337:6: warning: symbol 'run_dax' was not declared. Should > it be static? A different version of this

Re: [PATCH] nvdimm: make nd_class variable static

2023-06-16 Thread Ira Weiny
Ben Dooks wrote: > The nd_class is not used outside of drivers/nvdimm/bus.c and thus sparse > is generating the following warning. Remove this by making it static: > > drivers/nvdimm/bus.c:28:14: warning: symbol 'nd_class' was not declared. > Should it be static? Reviewe

Re: [Qemu RFC 0/7] Early enabling of DCD emulation in Qemu

2023-06-09 Thread Ira Weiny
ni...@outlook.com wrote: > The 06/08/2023 08:43, Ira Weiny wrote: > > Shesha Bhushan Sreenivasamurthy wrote: [snip] > > Hi Ira & Shesha, > FYI. I reabased my patch series on top of the above branch and created a new > branch here: > > https://github.com/moking/q

Re: [Qemu RFC 0/7] Early enabling of DCD emulation in Qemu

2023-06-08 Thread Ira Weiny
Shesha Bhushan Sreenivasamurthy wrote: > Hi Fan, >I am implementing DCD FMAPI commands and planning to start pushing changes > to the below branch. That requires the contributions you have made. Can your > changes be pushed to the below branch ? > >

Re: [PATCH 4/4] dax: Cleanup extra dax_region references

2023-06-06 Thread Ira Weiny
Fan Ni wrote: > The 06/02/2023 23:14, Dan Williams wrote: > > Now that free_dev_dax_id() internally manages the references it needs > > the extra references taken by the dax_region drivers are not needed. > > > > Reported-by: Ira Weiny > > Signed-off-by: Dan W

Re: [Qemu RFC 0/7] Early enabling of DCD emulation in Qemu

2023-06-05 Thread Ira Weiny
Fan Ni wrote: > Since the early draft of DCD support in kernel is out > (https://lore.kernel.org/linux-cxl/20230417164126.GA1904906@bgt-140510-bm03/T/#t), > this patch series provide dcd emulation in qemu so people who are interested > can have an early try. It is noted that the patch series may

Re: [PATCH 4/4] dax: Cleanup extra dax_region references

2023-06-03 Thread Ira Weiny
Dan Williams wrote: > Now that free_dev_dax_id() internally manages the references it needs > the extra references taken by the dax_region drivers are not needed. > > Reported-by: Ira Weiny Reviewed-by: Ira Weiny > Signed-off-by: Dan Williams > --- > drivers/d

Re: [PATCH 3/4] dax: Introduce alloc_dev_dax_id()

2023-06-03 Thread Ira Weiny
9c-2ecc3d496...@hpe.com > [2] > Reported-by: Yongqiang Liu > Reported-by: Paul Cassella > Reported-by: Ira Weiny > Signed-off-by: Dan Williams > --- > drivers/dax/bus.c | 56 > +++-- > drivers/dax/dax-private.h |

Re: [PATCH 2/4] dax: Use device_unregister() in unregister_dax_mapping()

2023-06-03 Thread Ira Weiny
Dan Williams wrote: > Replace an open-coded device_unregister() sequence with the helper. > Reviewed-by: Ira Weiny > Signed-off-by: Dan Williams > ---

Re: [PATCH 1/4] dax: Fix dax_mapping_release() use after free

2023-06-03 Thread Ira Weiny
their parent while > registered. If a child needs a parent object to complete its release it > needs to hold a reference that it drops from its release callback. > Arrange for a dax_mapping to pin its parent dev_dax instance until > dax_mapping_release(). > > Fixes: 0b07ce872a9e ("device-dax: introduce 'mapping' devices") Reviewed-by: Ira Weiny

[PATCH RFC 4/4] dax/bus: Remove unnecessary reference in alloc_dax_region()

2023-06-02 Thread Ira Weiny
later. Cc: Yongqiang Liu Cc: Dan Williams Cc: Paul Cassella Signed-off-by: Ira Weiny --- drivers/dax/bus.c | 13 ++--- drivers/dax/cxl.c | 4 drivers/dax/hmem/hmem.c | 3 --- drivers/dax/pmem.c | 8 +--- 4 files changed, 7 insertions(+), 21 deletions(-) diff

[PATCH RFC 3/4] dax/cxl: Fix refcount leak in cxl_dax_region_probe()

2023-06-02 Thread Ira Weiny
: 09d09e04d2fc ("cxl/dax: Create dax devices for CXL RAM regions") Cc: Dan Williams Cc: linux-...@vger.kernel.org Signed-off-by: Ira Weiny --- This work was inspired by Yongqiang Liu here: https://lore.kernel.org/all/20221203095858.612027-1-liuyongqian...@huawei.com/ --- drivers/dax/cxl.c |

[PATCH RFC 1/4] dax/bus: Fix leaked reference in alloc_dax_region()

2023-06-02 Thread Ira Weiny
") Cc: Dan Williams Signed-off-by: Ira Weiny --- drivers/dax/bus.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 227800053309..899e29d107b4 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -583,6 +583,7 @@ s

[PATCH RFC 2/4] dax/hmem: Fix refcount leak in dax_hmem_probe()

2023-06-02 Thread ira . weiny
evice to hmem_register_device") Reviewed-by: Ira Weiny Signed-off-by: Yongqiang Liu --- drivers/dax/hmem/hmem.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dax/hmem/hmem.c b/drivers/dax/hmem/hmem.c index e5fe8b39fb94..b4831a3d3934 100644 --- a/drivers/dax/h

[PATCH RFC 0/4] dax: Clean up dax_region references

2023-06-02 Thread Ira Weiny
/20221203095858.612027-1-liuyongqian...@huawei.com/ Signed-off-by: Ira Weiny --- Ira Weiny (3): dax/bus: Fix leaked reference in alloc_dax_region() dax/cxl: Fix refcount leak in cxl_dax_region_probe() dax/bus: Remove unnecessary reference in alloc_dax_region() Yongqiang Liu (1): dax/hmem

Re: [PATCH] dax/hmem: Fix refcount leak in dax_hmem_probe()

2023-06-02 Thread Ira Weiny
Paul Cassella wrote: > On Fri, 2 Jun 2023, Ira Weiny wrote: > > Paul Cassella wrote: > > > On Sat, 3 Dec 2022, Ira Weiny wrote: > > > > On Sat, Dec 03, 2022 at 09:58:58AM +, Yongqiang Liu wrote: > > > > > > We should always ca

Re: [PATCH] dax/hmem: Fix refcount leak in dax_hmem_probe()

2023-06-02 Thread Ira Weiny
Paul Cassella wrote: > On Sat, 3 Dec 2022, Ira Weiny wrote: > > On Sat, Dec 03, 2022 at 09:58:58AM +, Yongqiang Liu wrote: > > > > We should always call dax_region_put() whenever devm_create_dev_dax() > > > succeed or fail to avoid refcount leak of dax_regio

Re: [PATCH v7 3/7] hw/cxl/events: Wire up get/clear event mailbox commands

2023-05-23 Thread Ira Weiny
Fan Ni wrote: > The 05/22/2023 16:09, Jonathan Cameron wrote: > > From: Ira Weiny > > > > CXL testing is benefited from an artificial event log injection > > mechanism. > > > > Add an event log infrastructure to insert, get, and clear events from >

Re: [PATCH RFC 1/5] hw/cxl: Use define for build bug detection

2023-05-23 Thread Ira Weiny
Jonathan Cameron wrote: > On Thu, 18 May 2023 13:19:12 -0700 > Ira Weiny wrote: > > > Jonathan Cameron wrote: > > > On Wed, 17 May 2023 19:45:54 -0700 > > > Ira Weiny wrote: > > > > > > > Magic numbers can be confusing. > > > &g

Re: [PATCH v6 6/7] hw/cxl/events: Add injection of DRAM events

2023-05-23 Thread Ira Weiny
"transaction-type": 192, > > > "channel": 3, > > > "rank": 17, > > > "nibble-mask": 37421234, > > > "bank-group": 7, > > > "bank": 11, >

Re: [PATCH v6 4/4] hw/cxl: Add clear poison mailbox command support.

2023-05-19 Thread Ira Weiny
Jonathan Cameron wrote: > Current implementation is very simple so many of the corner > cases do not exist (e.g. fragmenting larger poison list entries) > > Reviewed-by: Fan Ni Minor nit below. Otherwise looks good. Reviewed-by: Ira Weiny > diff --git a/hw/mem/cxl_type3.c b/h

Re: [PATCH RFC 1/5] hw/cxl: Use define for build bug detection

2023-05-18 Thread Ira Weiny
Jonathan Cameron wrote: > On Wed, 17 May 2023 19:45:54 -0700 > Ira Weiny wrote: > > > Magic numbers can be confusing. > > > > Use the range size define for CXL.cachemem rather than a magic number. > > Update/add spec references. > > > > Signed

[PATCH RFC 3/5] hw/cxl: Derive a CXL accelerator device from Type-3

2023-05-17 Thread Ira Weiny
-by: Ira Weiny --- The device ID and class code are completely made up by me. As discussed in the last community call perhaps these could be declared in some more official capacity? --- docs/system/devices/cxl.rst | 11 +++ hw/mem/cxl_type3.c | 28

  1   2   3   4   5   6   7   8   9   10   >