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

[PATCH RFC 4/5] hw/cxl/accel: Add Back-Invalidate decoder capbility structure

2023-05-17 Thread Ira Weiny
The presence of the Back-Invalidate (BI) decoder capability structure indicates a CXL downstream port, root port, or device supports the BI messages. Add the BI capability structure to the accelerator device. Not-Yet-Signed-off-by: Ira Weiny --- hw/cxl/cxl-component-utils.c | 5 + hw

[PATCH RFC 5/5] hw/cxl: Add UIO HDM decoder register fields

2023-05-17 Thread Ira Weiny
to support UIO for testing. Not-Yet-Signed-off-by: Ira Weiny --- hw/cxl/cxl-component-utils.c | 6 ++ include/hw/cxl/cxl_component.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c index a9efa252b4ae..252b2beb2110 100644

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

2023-05-17 Thread Ira Weiny
Magic numbers can be confusing. Use the range size define for CXL.cachemem rather than a magic number. Update/add spec references. Signed-off-by: Ira Weiny --- include/hw/cxl/cxl_component.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/hw/cxl

[PATCH RFC 2/5] hw/cxl: Refactor component register initialization

2023-05-17 Thread Ira Weiny
by a device type. Any capability which is not specified by the type is left NULL'ed out which complies with the packed nature of the register array. Update all spec references to 3.0. No functional changes should be seen with this patch. Signed-off-by: Ira Weiny --- hw/cxl/cxl-component-utils.c

[PATCH RFC 0/5] hw/cxl: Type 2 Device RFC

2023-05-17 Thread Ira Weiny
-ac-mem5,id=cxl-dev5,sn=0xCAFE0005 ... NOTE: I'm leaving off Michael Tsirkin for now because this is really rough and I'm mainly sending it out because it was talked about in the CXL community call on 5/16. Not-Yet-Signed-off-by: Ira Weiny --- Ira Weiny (5): hw/cxl: Use define for build bug

Re: [PATCH 1/1] pmem: allow user to set QUEUE_FLAG_NOWAIT

2023-05-12 Thread Ira Weiny
uot; > > +static bool g_nowait; > +module_param_named(nowait, g_nowait, bool, 0444); > +MODULE_PARM_DESC(nowait, "set QUEUE_FLAG_NOWAIT. Default: False"); Module parameters should be avoided. Since I'm not clear on the performance benefit I can't comment on alternatives.

Re: [MOPO] MOPO- still alivein Toledo

2023-05-03 Thread Ira Rubenstein
God bless you ! I am glad you are recovering. Stay positive. Ira Sent via mobile.Please excuse typos and autocorrects. > On May 3, 2023, at 7:53 PM, Tom Martin > wrote: > > CAUTION: This email originated from outside of PBS. Do not click links or > open att

Re: [RFC PATCH v2 2/3] drivers/nvdimm: export memmap of namespace to vmcoreinfo

2023-04-27 Thread Ira Weiny
Li Zhijian wrote: > Each namespace has its own memmap, it will be udpated when > namespace initializing/creating, updating, and deleting. > > CC: Dan Williams > CC: Vishal Verma > CC: Dave Jiang > CC: Ira Weiny > Signed-off-by: Li Zhijian > --- > drive

Re: [PATCH v3 6/6] PCI/AER: Unmask RCEC internal errors to enable RCH downstream port error handling

2023-04-13 Thread Ira Weiny
pcie_walk_rcec(rcec, handles_cxl_error_iter, _cxl); > > > + > > > + return !!handles_cxl; > > > +} > > > + > > > +static int __cxl_unmask_internal_errors(struct pci_dev *rcec) > > > +{ > > > + int aer, rc; > > > + u32 mask; > > >

Re: [Intel-gfx] [PATCH v2 9/9] drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c

2023-03-30 Thread Ira Weiny
> > [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com > > v2: No code change since v1. Added description of the motivation of > using kmap_local_page() and "Suggested-by" tag of Fabio. > > Suggested-by: Ira Weiny > Suggested-by: Fa

Re: [PATCH v2 9/9] drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c

2023-03-30 Thread Ira Weiny
> > [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com > > v2: No code change since v1. Added description of the motivation of > using kmap_local_page() and "Suggested-by" tag of Fabio. > > Suggested-by: Ira Weiny > Suggested-by: Fa

Re: [Intel-gfx] [PATCH v2 8/9] drm/i915: Use kmap_local_page() in i915_cmd_parser.c

2023-03-30 Thread Ira Weiny
ropped hot plug related description since it has nothing to do with > kmap_local_page(). > * No code change since v1, and added description of the motivation of > using kmap_local_page(). > > Suggested-by: Dave Hansen > Suggested-by: Ira Weiny Reviewed-by: Ira Weiny

Re: [PATCH v2 8/9] drm/i915: Use kmap_local_page() in i915_cmd_parser.c

2023-03-30 Thread Ira Weiny
ropped hot plug related description since it has nothing to do with > kmap_local_page(). > * No code change since v1, and added description of the motivation of > using kmap_local_page(). > > Suggested-by: Dave Hansen > Suggested-by: Ira Weiny Reviewed-by: Ira Weiny

Re: [PATCH v2 6/9] drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_context.c

2023-03-30 Thread Ira Weiny
.org/all/20220813220034.806698-1-ira.we...@intel.com > > v2: > * Dropped hot plug related description since it has nothing to do with > kmap_local_page(). > * No code change since v1, and added description of the motivation of > using kmap_local_page(). > > Suggested

Re: [Intel-gfx] [PATCH v2 6/9] drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_context.c

2023-03-30 Thread Ira Weiny
.org/all/20220813220034.806698-1-ira.we...@intel.com > > v2: > * Dropped hot plug related description since it has nothing to do with > kmap_local_page(). > * No code change since v1, and added description of the motivation of > using kmap_local_page(). > > Suggested

Re: [Intel-gfx] [PATCH v2 5/9] drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_coherency.c

2023-03-30 Thread Ira Weiny
_local_page() / kunmap_local(). > > [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com > > v2: > * Dropped hot plug related description since it has nothing to do with > kmap_local_page(). > * No code change since v1, and added description of t

Re: [PATCH v2 5/9] drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_coherency.c

2023-03-30 Thread Ira Weiny
_local_page() / kunmap_local(). > > [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com > > v2: > * Dropped hot plug related description since it has nothing to do with > kmap_local_page(). > * No code change since v1, and added description of t

Re: [PATCH v2 4/9] drm/i915: Use kmap_local_page() in gem/selftests/huge_pages.c

2023-03-30 Thread Ira Weiny
page() / kunmap_local(). > > [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com > > v2: > * Dropped hot plug related description since it has nothing to do with > kmap_local_page(). > * No code change since v1, and added description of the motivation of > using kmap_local_page(). > > Suggested-by: Dave Hansen > Suggested-by: Ira Weiny Reviewed-by: Ira Weiny

Re: [Intel-gfx] [PATCH v2 4/9] drm/i915: Use kmap_local_page() in gem/selftests/huge_pages.c

2023-03-30 Thread Ira Weiny
page() / kunmap_local(). > > [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.we...@intel.com > > v2: > * Dropped hot plug related description since it has nothing to do with > kmap_local_page(). > * No code change since v1, and added description of the motivation of > using kmap_local_page(). > > Suggested-by: Dave Hansen > Suggested-by: Ira Weiny Reviewed-by: Ira Weiny

Re: [PATCH v2 2/9] drm/i915: Use memcpy_[from/to]_page() in gem/i915_gem_pyhs.c

2023-03-30 Thread Ira Weiny
0813220034.806698-1-ira.we...@intel.com > > v2: > * Used memcpy_from_page() and memcpy_to_page() to replace > kmap_local_page() + memcpy(). > * Dropped hot plug related description since it has nothing to do with > kmap_local_page(). > * Added description of the motivation of using kmap_local_page(). > > Suggested-by: Dave Hansen > Suggested-by: Ira Weiny Reviewed-by: Ira Weiny

Re: [Intel-gfx] [PATCH v2 2/9] drm/i915: Use memcpy_[from/to]_page() in gem/i915_gem_pyhs.c

2023-03-30 Thread Ira Weiny
0813220034.806698-1-ira.we...@intel.com > > v2: > * Used memcpy_from_page() and memcpy_to_page() to replace > kmap_local_page() + memcpy(). > * Dropped hot plug related description since it has nothing to do with > kmap_local_page(). > * Added description of the motivation of using kmap_local_page(). > > Suggested-by: Dave Hansen > Suggested-by: Ira Weiny Reviewed-by: Ira Weiny

Re: [Intel-gfx] [PATCH v2 1/9] drm/i915: Use kmap_local_page() in gem/i915_gem_object.c

2023-03-30 Thread Ira Weiny
to do with > kmap_local_page(). > * Rebased on f47e630 (drm/i915/gem: Typecheck page lookups) to keep > the "idx" variable of type pgoff_t here. > * Added description of the motivation of using kmap_local_page(). > > Suggested-by: Dave Hansen > Suggested-by: Ira Weiny Reviewed-by: Ira Weiny

Re: [PATCH v2 1/9] drm/i915: Use kmap_local_page() in gem/i915_gem_object.c

2023-03-30 Thread Ira Weiny
to do with > kmap_local_page(). > * Rebased on f47e630 (drm/i915/gem: Typecheck page lookups) to keep > the "idx" variable of type pgoff_t here. > * Added description of the motivation of using kmap_local_page(). > > Suggested-by: Dave Hansen > Suggested-by: Ira Weiny Reviewed-by: Ira Weiny

Re: [PATCH 0/3] COVER: Remove memcpy_page_flushcache()

2023-03-16 Thread Ira Weiny
+ Konstantin Michael Ellerman wrote: > Ira Weiny writes: > > Dave Hansen wrote: > >> On 3/15/23 16:20, Ira Weiny wrote: > >> > Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray > >> > callbacks") removed the calls to

Re: [PATCH 0/3] COVER: Remove memcpy_page_flushcache()

2023-03-15 Thread Ira Weiny
Dave Hansen wrote: > On 3/15/23 16:20, Ira Weiny wrote: > > Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray > > callbacks") removed the calls to memcpy_page_flushcache(). > > > > kmap_atomic() is deprecated and used in the x86

[PATCH 3/3] arm: uaccess: Remove memcpy_page_flushcache()

2023-03-15 Thread Ira Weiny
@lists.infradead.org Signed-off-by: Ira Weiny --- arch/arm64/include/asm/uaccess.h| 2 -- arch/arm64/lib/uaccess_flushcache.c | 6 -- 2 files changed, 8 deletions(-) diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h index 5c7b2f9d5913..4bf2c0975a82 100644 ---

[PATCH 2/3] powerpc: Remove memcpy_page_flushcache()

2023-03-15 Thread Ira Weiny
t; Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Ira Weiny --- arch/powerpc/include/asm/uaccess.h | 2 -- arch/powerpc/lib/pmem.c| 7 --- 2 files changed, 9 deletions(-) diff --git a/arch/powerpc/include/asm/uaccess.h b/arch/powerpc/include/asm/uaccess.h index 3ddc65c63a49.

[PATCH 1/3] x86, uaccess: Remove memcpy_page_flushcache()

2023-03-15 Thread Ira Weiny
ms" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x...@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Ira Weiny --- arch/x86/include/asm/uaccess_64.h | 2 -- arch/x86/lib/usercopy_64.c| 9 - 2 files changed, 11 deletions(-) diff --git a/arch/x86/includ

[PATCH 0/3] COVER: Remove memcpy_page_flushcache()

2023-03-15 Thread Ira Weiny
Signed-off-by: Ira Weiny --- Ira Weiny (3): x86, uaccess: Remove memcpy_page_flushcache() powerpc: Remove memcpy_page_flushcache() arm: uaccess: Remove memcpy_page_flushcache() arch/arm64/include/asm/uaccess.h| 2 -- arch/arm64/lib/uaccess_flushcache.c | 6 -- arch/power

Re: [Kgdb-bugreport] [PATCH] module/decompress: Never use kunmap() for local un-mappings

2023-03-15 Thread Ira Weiny
as its argument. > > In module_zstd_decompress() we currently map with kmap_local_page() and > unmap with kunmap(). This breaks the code and so it should be fixed. > > Cc: Piotr Gorski > Cc: Dmitry Torokhov > Cc: Luis Chamberlain > Cc: Stephen Boyd > Cc: Ira Weiny Revi

Re: [PATCH v4 6/6] hw/cxl: Add clear poison mailbox command support.

2023-03-03 Thread Ira Weiny
g_new0(CXLPoison, 1); frag->start = dpa + 64; frag->length = found->start + found->length - frag->start; frag->type = found->type; QLIST_INSERT_HEAD(poison_list, frag, node); ct3d->poison_list_cnt++; } } g_free(found); } ... > +/* Clearing a region with no poison is not an error so always do so */ > +if (cvc->set_cacheline) For QEMU coding style you still need '{' '}'. Ira

Re: [PATCH v4 4/6] hw/cxl: QMP based poison injection support

2023-03-03 Thread Ira Weiny
n your machine. > > Note that the poison list supported is kept short enough to avoid the > complexity of state machine that is needed to handle the MORE flag. > Reviewed-by: Ira Weiny > Signed-off-by: Jonathan Cameron > > --- > v4: > - Widen the mask on Poison source (lower bits of the address) >to allow for Vendor Defined. Change will make it easier to potentially >add a means to inject such poison in the future. Today it has no >impact. [...]

Re: [PATCH v3 6/6] hw/cxl: Add clear poison mailbox command support.

2023-03-02 Thread Ira Weiny
3.c > +++ b/hw/mem/cxl_type3.c > @@ -919,6 +919,41 @@ static void set_lsa(CXLType3Dev *ct3d, const void *buf, > uint64_t size, > */ > } > > +static bool set_cacheline(CXLType3Dev *ct3d, uint64_t dpa_offset, uint8_t > *data) > +{ > +MemoryRegion *vmr = NULL, *pmr = NULL; >

Re: [PATCH v3 5/6] hw/cxl: Add poison injection via the mailbox.

2023-03-02 Thread Ira Weiny
s of the kernel code. > > Signed-off-by: Jonathan Cameron Reviewed-by: Ira Weiny

Re: [PATCH v3 4/6] hw/cxl: QMP based poison injection support

2023-03-02 Thread Ira Weiny
uery_length || > +ent->start + ent->length <= query_start) { > +continue; > +} > + > +/* Deal with overlap */ > +start = MAX(ent->start & 0xffffffc0, query_start); > +stop = MIN((ent->start & 0xf

Re: [PATCH v3 7/7] hw/cxl/events: Add injection of Memory Module Events

2023-03-01 Thread Ira Weiny
ce the usefulness of this more basic generation of the events. Seems very reasonable to me. One spelling issue below. With that. Reviewed-by: Ira Weiny > > Signed-off-by: Jonathan Cameron > --- > hw/mem/cxl_type3.c | 61 + > hw/mem/cxl

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

2023-03-01 Thread Ira Weiny
lds = >cxl_dstate; > + > +rc = ct3d_qmp_cxl_event_log_enc(log); > +if (rc < 0) { > +error_setg(errp, "Unhandled error log type"); > +return; > +} > +enc_log = rc; > + > +memset(, 0, sizeof(dram)); > +cxl_

Re: [PATCH ndctl 2/2] cxl/event-trace: use the wrapped util_json_new_u64()

2023-02-23 Thread Ira Weiny
nt64 version at compile time. > Replace the direct uint64 calls with this wrapped version. > > Link: https://github.com/pmem/ndctl/issues/233 > Fixes: 8dedc6cf5e85 ("cxl: add a helper to parse trace events into a json > object") > Reported-by: Michal Suchánek > Cc: Dave J

Re: [PATCH ndctl 1/2] cxl/monitor: fix include paths for tracefs and traceevent

2023-02-23 Thread Ira Weiny
ub.com/pmem/ndctl/issues/234 > Fixes: 8dedc6cf5e85 ("cxl: add a helper to parse trace events into a json > object") > Fixes: 7b237bc7a8ae ("cxl: add a helper to go through all current events and > parse them") > Reported-by: Michal Suchánek > Cc: Dave Jiang &

Re: [PATCH -next] libnvdimm: Fix some kernel-doc comments

2023-02-23 Thread Ira Weiny
ter 'nvdimm' > description in 'nvdimm_allocated_dpa > > Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4118 Reviewed-by: Ira Weiny > Signed-off-by: Yang Li > --- > drivers/nvdimm/dimm_devs.c | 4 ++-- > 1 file changed, 2 insertions(+),

Re: [PATCH ndctl 2/3] cxl/monitor: retain error code in monitor_event()

2023-02-21 Thread Ira Weiny
@@ static int monitor_event(struct cxl_ctx *ctx) > } > > parse_err: > - rc = cxl_event_tracing_disable(inst); > + if (cxl_event_tracing_disable(inst) < 0) > + err(, "failed to disable tracing\n"); Is this even worth printing? Perhap

Re: [PATCH ndctl 1/3] cxl/event_trace: fix a resource leak in cxl_event_to_json()

2023-02-21 Thread Ira Weiny
race events into a json > object") > Cc: Dave Jiang > Cc: Dan Williams Reviewed-by: Ira Weiny > Signed-off-by: Vishal Verma > --- > cxl/event_trace.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/cxl/event_trace.c b/cxl/ev

Re: [PATCH 2/6] hw/cxl: rename mailbox return code type from ret_code to CXLRetCode

2023-02-21 Thread Ira Weiny
/6 but still. Reviewed-by: Ira Weiny > > Signed-off-by: Jonathan Cameron > --- > hw/cxl/cxl-mailbox-utils.c | 62 ++--- > include/hw/cxl/cxl_device.h | 2 +- > 2 files changed, 32 insertions(+), 32 deletions(-) >

Re: [PATCH 1/6] hw/cxl: Move enum ret_code definition to cxl_device.h

2023-02-21 Thread Ira Weiny
a good clarification. Reviewed-by: Ira Weiny > > Signed-off-by: Jonathan Cameron > --- > hw/cxl/cxl-mailbox-utils.c | 28 > include/hw/cxl/cxl_device.h | 28 > 2 files changed, 28 insertions(+), 28 deletions(-) >

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

2023-02-21 Thread Ira Weiny
mp;& !pmr) { > +return false; > +} > + > +if (dpa_offset + 64 > int128_get64(ct3d->cxl_dstate.mem_size)) { > +return false; > +} > + > +if (vmr) { > +if (dpa_offset <= int128_get64(vmr->size)) { > +as = >hostvm

Re: [PATCH 5/6] hw/cxl: Add poison injection via the mailbox.

2023-02-21 Thread Ira Weiny
t; +uint64_t dpa; > +}; > +struct inject_poison_pl *in = (void *)cmd->payload; > +CXLPoison *p; > + > +QLIST_FOREACH(ent, poison_list, node) { > +if (ent->start == in->dpa && ent->length == 64) { How does this interact with the QMP i

Re: [PATCH 4/6] hw/cxl: QMP based poison injection support

2023-02-21 Thread Ira Weiny
t; @@ -292,6 +304,12 @@ struct CXLType3Dev { > > /* Error injection */ > CXLErrorList error_list; > + > +/* Poison Injection - cache */ > +CXLPoisonList poison_list; > +unsigned int poison_list_cnt; > +bool poison_list_overflowed; > +uint64_t poison_list_overflow_ts; > }; > > #define TYPE_CXL_TYPE3 "cxl-type3" > @@ -317,4 +335,6 @@ MemTxResult cxl_type3_write(PCIDevice *d, hwaddr > host_addr, uint64_t data, > > uint64_t cxl_device_get_timestamp(CXLDeviceState *cxlds); > > +void cxl_set_poison_list_overflowed(CXLType3Dev *ct3d); > + > #endif > diff --git a/qapi/cxl.json b/qapi/cxl.json > index ac7e167fa2..bc099d695e 100644 > --- a/qapi/cxl.json > +++ b/qapi/cxl.json > @@ -5,6 +5,22 @@ > # = CXL devices > ## > > +## > +# @cxl-inject-poison: > +# > +# Poison records indicate that a CXL memory device knows that a particular > +# memory region may be corrupted. This may be because of locally detected > +# errors (e.g. ECC failure) or poisoned writes received from other components > +# in the system. This injection mechanism enables testing of the OS handling > +# of poison records which may be queried via the CXL mailbox. > +# > +# @path: CXL type 3 device canonical QOM path > +# @start: Start address NIT: "Must be 64 bytes aligned." > +# @length: Length of poison to inject NIT: "Must be in multiples of 64 bytes." Ira > +## > +{ 'command': 'cxl-inject-poison', > + 'data': { 'path': 'str', 'start': 'uint64', 'length': 'uint64' }} > + > ## > # @CxlUncorErrorType: > # > -- > 2.37.2 >

Re: [PATCH 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page()

2023-02-16 Thread Ira Weiny
Zhao Liu wrote: > On Tue, Feb 14, 2023 at 08:25:08PM -0800, Ira Weiny wrote: > > Date: Tue, 14 Feb 2023 20:25:08 -0800 > > From: Ira Weiny > > Subject: Re: [PATCH 0/9] drm/i915: Replace kmap_atomic() with > > kmap_local_page() > > > > Zhao Liu wrote: >

Re: [Intel-gfx] [PATCH 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page()

2023-02-16 Thread Ira Weiny
Zhao Liu wrote: > On Tue, Feb 14, 2023 at 08:25:08PM -0800, Ira Weiny wrote: > > Date: Tue, 14 Feb 2023 20:25:08 -0800 > > From: Ira Weiny > > Subject: Re: [PATCH 0/9] drm/i915: Replace kmap_atomic() with > > kmap_local_page() > > > > Zhao Liu wrote: >

Re: [PATCH] cxl/pmem: Fix nvdimm registration races

2023-02-15 Thread Ira Weiny
> Fixes: 21083f51521f ("cxl/pmem: Register 'pmem' / cxl_nvdimm devices") > Cc: > Reported-by: Dave Jiang Reviewed-by: Ira Weiny > Tested-by: Dave Jiang > Signed-off-by: Dan Williams > --- > drivers/cxl/pmem.c |1 + > drivers/nvdimm/bus.c | 19

Re: [PATCH 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page()

2023-02-14 Thread Ira Weiny
Zhao Liu wrote: > From: Zhao Liu > > The use of kmap_atomic() is being deprecated in favor of > kmap_local_page()[1]. Zhao, Was there ever a v2 of this series? I'm not finding it on Lore. Thanks, Ira > > In the following patches, we can convert the calls of kmap_atomic()

Re: [Intel-gfx] [PATCH 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page()

2023-02-14 Thread Ira Weiny
Zhao Liu wrote: > From: Zhao Liu > > The use of kmap_atomic() is being deprecated in favor of > kmap_local_page()[1]. Zhao, Was there ever a v2 of this series? I'm not finding it on Lore. Thanks, Ira > > In the following patches, we can convert the calls of kmap_atomic()

Re: [PATCH RFC] PCI/AER: Enable internal AER errors by default

2023-02-14 Thread Ira Weiny
Bjorn Helgaas wrote: > On Fri, Feb 10, 2023 at 02:33:23PM -0800, Ira Weiny wrote: > > The CXL driver expects internal error reporting to be enabled via > > pci_enable_pcie_error_reporting(). It is likely other drivers expect the > > same. > > Dave submitted a pat

[PATCH RFC] PCI/AER: Enable internal AER errors by default

2023-02-10 Thread Ira Weiny
aonkar Cc: Oliver O'Halloran Cc: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Ira Weiny --- This is RFC to see if it is acceptable to be part of the standard pci_enable_pcie_error_reporting() call or perhaps

Re: [PATCH ndctl v2 3/7] cxl: add core plumbing for creation of ram regions

2023-02-09 Thread Ira Weiny
t; 1/ Use the above create_ram_region API, and > 2/ Elide setting the UUID, since ram regions don't have one > > Cc: Dan Williams > Reviewed-by: Dan Williams Reviewed-by: Ira Weiny > Signed-off-by: Vishal Verma > --- > Documentation/cxl/cxl-create-region.txt | 3 ++- >

Re: [PATCH ndctl 5/7] cxl/region: determine region type based on root decoder capability

2023-02-08 Thread Ira Weiny
Verma, Vishal L wrote: > On Tue, 2023-02-07 at 20:07 -0800, Ira Weiny wrote: > > Vishal Verma wrote: > > > > > > diff --git a/cxl/region.c b/cxl/region.c > > > index 9079b2d..1c8ccc7 100644 > > > --- a/cxl/region.c > > > +++ b/cxl/region.c

Re: [PATCH ndctl 3/7] cxl: add core plumbing for creation of ram regions

2023-02-08 Thread Ira Weiny
Verma, Vishal L wrote: > On Tue, 2023-02-07 at 19:55 -0800, Ira Weiny wrote: > > Vishal Verma wrote: > <..> > > > > > > diff --git a/cxl/region.c b/cxl/region.c > > > index 38aa142..0945a14 100644 > > > --- a/cxl/region.c > >

Re: [PATCH ndctl 7/7] cxl/list: Enumerate device-dax properties for regions

2023-02-07 Thread Ira Weiny
Vishal Verma wrote: > From: Dan Williams > > Recently the kernel added support for routing newly mapped CXL regions to > device-dax. Include the json representation of a DAX region beneath its > host CXL region. > Reviewed-by: Ira Weiny > Signed-off-by: Dan Williams &

Re: [PATCH ndctl 6/7] cxl/list: Include regions in the verbose listing

2023-02-07 Thread Ira Weiny
Vishal Verma wrote: > From: Dan Williams > > When verbose listing was added, region listing support was not available, so > it got missed. Add it now. > Reviewed-by: Ira Weiny > Signed-off-by: Dan Williams > Signed-off-by: Vishal Verma > --- > cxl/list.c

Re: [PATCH ndctl 5/7] cxl/region: determine region type based on root decoder capability

2023-02-07 Thread Ira Weiny
efault for p->mode should be moved here from parse_create_options(). But I'm not sure what the flows might be like in that case. That means p->mode would default to NONE until here. That would make the man page behavior and this function match up nicely for future maintenance. But I do

Re: [PATCH ndctl 4/7] cxl/region: accept user-supplied UUIDs for pmem regions

2023-02-07 Thread Ira Weiny
pplied UUIDs, even though the man page for cxl-create-region > advertised the option. > > Fix this by actually adding this option now, and add checks to validate > the user-supplied UUID, and refuse it for ram regions. > > Cc: Dan Williams Reviewed-by: Ira Weiny > Signed-of

Re: [PATCH ndctl 3/7] cxl: add core plumbing for creation of ram regions

2023-02-07 Thread Ira Weiny
break; > + default: > + /* > + * This will 'poison' ep_min_size with a 0, and > + * subsequently cause the region creation to fail. > + */ > + s

Re: [PATCH ndctl 2/7] cxl: add a type attribute to region listings

2023-02-07 Thread Ira Weiny
lder kernels that > lack this, region listings will simply omit emitting this attribute, > but otherwise not treat it as a failure. > > Cc: Dan Williams Reviewed-by: Ira Weiny > Signed-off-by: Vishal Verma > --- > Documentation/cxl/lib/libcxl.txt | 1 + > cxl/lib/pr

Re: [PATCH ndctl 1/7] cxl/region: skip region_actions for region creation

2023-02-07 Thread Ira Weiny
> > Since there's no need to walk through the topology after creating a > region, and especially not to perform an invalid 'action', switch > back to retuening early for create-region. > > Fixes: 3d6cd829ec08 ("cxl/region: Use cxl_filter_walk() to gather > create-region ta

Re: [PATCH 1/2] hw/cxl: Fix event log time stamp fields

2023-01-26 Thread Ira Weiny
Jonathan Cameron wrote: > On Wed, 25 Jan 2023 21:37:27 -0800 > Ira Weiny wrote: > > > CXL 3.0 8.2.9.4.2 Set Timestamp and 8.2.9.4.1 Get Timestamp define the > > way for software to set and get the time stamp of a device. Events > > should use a time stamp consis

Re: [PATCH v2 0/7] hw/cxl: RAS error emulation and injection

2023-01-25 Thread Ira Weiny
overs the protocol > related errors reported via PCIE AER - Ira Weiny has posted support for > Event log based injection and I will post an update of Poison list injection > shortly. My proposal is to upstream this one first, followed by Ira's Event > Log series, then finally the Poiso

[PATCH 1/2] hw/cxl: Fix event log time stamp fields

2023-01-25 Thread Ira Weiny
w/cxl/events: Wire up get/clear event mailbox commands") Reported-by: Jonathan Cameron Signed-off-by: Ira Weiny --- hw/cxl/cxl-device-utils.c | 15 +++ hw/cxl/cxl-events.c | 4 +++- hw/cxl/cxl-mailbox-utils.c | 11 +-- hw/mem/cxl_type3.c | 1 - incl

[PATCH 0/2] hw/cxl: CXL Event processing fixups

2023-01-25 Thread Ira Weiny
://lore.kernel.org/all/20221221-ira-cxl-events-2022-11-17-v2-0-2ce2ecc06...@intel.com/ To: Jonathan Cameron Cc: Michael Tsirkin Cc: Ben Widawsky Cc: Peter Maydell Cc: Cc: Signed-off-by: Ira Weiny --- Ira Weiny (2): hw/cxl: Fix event log time stamp fields hw/cxl: Remove check for g_new0

[PATCH 2/2] hw/cxl: Remove check for g_new0() failure

2023-01-25 Thread Ira Weiny
g_new0() will terminate the application if it fails. Remove the check. Fixes: fb64c5661d5f ("hw/cxl/events: Wire up get/clear event mailbox commands") Reported-by: Jonathan Cameron Signed-off-by: Ira Weiny --- hw/cxl/cxl-events.c | 6 -- 1 file changed, 6 deletions(-) diff --gi

Re: [PATCH 5/8] hw/i386/acpi: Drop duplicate _UID entry for CXL root bridge

2023-01-11 Thread Ira Weiny
On Wed, Jan 11, 2023 at 02:24:37PM +, Jonathan Cameron wrote: > Noticed as this prevents iASL disasembling the DSDT table. > > Signed-off-by: Jonathan Cameron Reviewed-by: Ira Weiny > --- > hw/i386/acpi-build.c | 1 - > 1 file changed, 1 deletion(-) > > diff --gi

Re: [PATCH 3/8] hw/cxl: set cxl-type3 device type to PCI_CLASS_MEMORY_CXL

2023-01-11 Thread Ira Weiny
On Wed, Jan 11, 2023 at 02:24:35PM +, Jonathan Cameron wrote: > From: Gregory Price > > Current code sets to STORAGE_EXPRESS and then overrides it. > > Signed-off-by: Gregory Price > Reviewed-by: Davidlohr Bueso Reviewed-by: Ira Weiny > Signed-off-by: Jonathan Cam

Re: [PATCH 2/8] hw/pci-bridge/cxl_downstream: Fix type naming mismatch

2023-01-11 Thread Ira Weiny
On Wed, Jan 11, 2023 at 02:24:34PM +, Jonathan Cameron wrote: > Fix capitalization difference between struct name and typedef. > > Signed-off-by: Jonathan Cameron Reviewed-by: Ira Weiny > --- > hw/pci-bridge/cxl_downstream.c | 2 +- > 1 file changed, 1 insert

Re: [PATCH 1/8] hw/mem/cxl_type3: Improve error handling in realize()

2023-01-11 Thread Ira Weiny
On Wed, Jan 11, 2023 at 02:24:33PM +, Jonathan Cameron wrote: > msix_init_exclusive_bar() can fail, so if it does cleanup the address space. > > Signed-off-by: Jonathan Cameron Reviewed-by: Ira Weiny > --- > hw/mem/cxl_type3.c | 12 ++-- > 1 file changed, 1

Re: [PATCH v2 8/8] hw/cxl/events: Add in inject general media event

2023-01-09 Thread Ira Weiny
On Tue, Jan 03, 2023 at 06:07:19PM +, Jonathan Cameron wrote: > On Wed, 21 Dec 2022 20:24:38 -0800 > Ira Weiny wrote: > > > To facilitate testing provide a QMP command to inject a general media > > event. The event can be added to the log specified. > > &

Re: Connection center

2023-01-05 Thread Ira
rought up an empty log. As I spend most of my time looking at virtual mailboxes, I don't usually see a status bar with any information and at some level was not even aware it existed. -- Ira 'Using TBBETA' information: http://www.silverstones.c

Re: Connection center

2023-01-05 Thread Ira
clicking on the status bar would bring that up. I've probably only cared about that log a couple of time in the many years I've been using The Bat, rarely enough I would never remember a secret button like that. -- Ira 'Using TBBETA' informat

Connection center

2023-01-05 Thread Ira
impossible to see what went wrong. Could that be changed so that the results of the last attempt can be reviewed? -- Ira 'Using TBBETA' information: http://www.silverstones.com/thebat/TBUDLInfo.html

Re: [PATCH] fs/hostfs: Replace kmap() with kmap_local_page()

2022-12-30 Thread Ira Weiny
herefore, replace kmap() with kmap_local_page() in hostfs_kern.c, it > being the only file with kmap() call sites currently left in fs/hostfs. > > Cc: "Venkataramanan, Anirudh" > Suggested-by: Ira Weiny What can we do to move this patch along? I'm not an expert but it looks ok to m

Re: [MOPO] mopo- merry Christmas in case power goes out

2022-12-22 Thread Ira Rubenstein
Merry Christmas and happy Birthday Tommy ! As we know. He shares the day with my son Ravi. Sent via mobile.Please excuse typos and autocorrects. > On Dec 22, 2022, at 8:29 PM, Tom Martin > wrote: > > CAUTION: This email originated from outside of PBS. Do not click links

[PATCH v2 8/8] hw/cxl/events: Add in inject general media event

2022-12-21 Thread Ira Weiny
To facilitate testing provide a QMP command to inject a general media event. The event can be added to the log specified. Signed-off-by: Ira Weiny --- Changes from RFC: Add all fields for this event irq happens automatically when log transitions from 0 to 1 --- hw/mem

[PATCH v2 0/8] QEMU CXL Provide mock CXL events and irq support

2022-12-21 Thread Ira Weiny
tor=127 type=3 transactiontype=192 \ channel=3 rank=-1 device=5 componentid='Iras mem'" | $qmpcmd View events on the guest: $ cat /sys/kernel/tracing/trace To: Jonathan Cameron Cc: Michael Tsirkin Cc: Ben Widawsky Cc: Ira Weiny Cc: qemu-devel@nongnu.org Cc: linux-...@v

[PATCH v2 4/8] hw/cxl/events: Add event status register

2022-12-21 Thread Ira Weiny
3.0 the version of the device status register block needs to be 2. Change the macro to allow for setting the version. Signed-off-by: Ira Weiny --- Changes from RFC: New patch to cover this register which was not being used before. --- hw/cxl/cxl-device-utils.c | 50

[PATCH v2 6/8] hw/cxl/events: Add event interrupt support

2022-12-21 Thread Ira Weiny
Replace the stubbed out CXL Get/Set Event interrupt policy mailbox commands. Enable those commands to control interrupts for each of the event log types. Skip the standard input mailbox length on the Set command due to DCD being optional. Perform the checks separately. Signed-off-by: Ira Weiny

<    1   2   3   4   5   6   7   8   9   10   >