libnvdimm fixes 5.9-rc6

2020-09-20 Thread Dan Williams
to quiet the generic_fsdax_supported() path and make it bail out before logging "dax capability not found" errors. Adrian Huang (1): dax: Fix stack overflow when mounting fsdax pmem device Dan Williams (1): dm/dax:

[PATCH v3] dm: Call proper helper to determine dax support

2020-09-18 Thread Dan Williams
r dax_supported check to span multiple devices") Cc: Tested-by: Adrian Huang Signed-off-by: Jan Kara Acked-by: Mike Snitzer Reported-by: kernel test robot Signed-off-by: Dan Williams --- Changes since v2 [1]: - Add dummy definitions for dax_read_{lock,unlock} in the CONFIG_DAX=n case (0da

[PATCH] dm/dax: Fix table reference counts

2020-09-18 Thread Dan Williams
r Kergon Cc: Mike Snitzer Reported-by: Adrian Huang Signed-off-by: Dan Williams --- drivers/md/dm.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index fb0255d25e4b..4a40df8af7d3 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1136,

Re: [dm-devel] [PATCH v2] dm: Call proper helper to determine dax support

2020-09-18 Thread Dan Williams
On Fri, Sep 18, 2020 at 8:31 AM Darrick J. Wong wrote: > > On Thu, Sep 17, 2020 at 10:30:03PM -0700, Dan Williams wrote: > > From: Jan Kara > > > > DM was calling generic_fsdax_supported() to determine whether a device > > referenced in the DM table supports

[PATCH v2] dm: Call proper helper to determine dax support

2020-09-17 Thread Dan Williams
r dax_supported check to span multiple devices") Cc: Tested-by: Adrian Huang Signed-off-by: Jan Kara Acked-by: Mike Snitzer Signed-off-by: Dan Williams --- Changes since v1 [1]: - Add missing dax_read_lock() around dax_supported() [1]: http://lore.kernel.org/r/20200916151445.450-1-j...@s

Re: [PATCH] pmem: fix __copy_user_flushcache

2020-09-17 Thread Dan Williams
On Wed, Sep 16, 2020 at 11:57 AM Mikulas Patocka wrote: > > > > On Wed, 16 Sep 2020, Dan Williams wrote: > > > On Wed, Sep 16, 2020 at 10:24 AM Mikulas Patocka > > wrote: > > > > > > > > > > > > On Wed, 16 Sep 2020, Dan Willia

Re: [PATCH] mm: remove extra ZONE_DEVICE struct page refcount

2020-09-16 Thread Dan Williams
uses normal pages to fake this up, so > > I was wrong about the third caller. But I think we can just call > > set_page_count just before freeing the page there with a comment > > explaining what is goin on. > > Dan Williams thought that having the ZONE_DEVICE struct pages >

Re: [PATCH] pmem: export the symbols __copy_user_flushcache and __copy_from_user_flushcache

2020-09-16 Thread Dan Williams
On Wed, Sep 16, 2020 at 3:57 AM Mikulas Patocka wrote: > > > > On Tue, 15 Sep 2020, Mikulas Patocka wrote: > > > > > > > On Tue, 15 Sep 2020, Mikulas Patocka wrote: > > > > > > > - __copy_from_user_inatomic_nocache doesn't flush cache for leading > > > > > and > > > > > trailing bytes. > > > > >

Re: [PATCH] pmem: export the symbols __copy_user_flushcache and __copy_from_user_flushcache

2020-09-16 Thread Dan Williams
On Wed, Sep 16, 2020 at 10:24 AM Mikulas Patocka wrote: > > > > On Wed, 16 Sep 2020, Dan Williams wrote: > > > On Wed, Sep 16, 2020 at 3:57 AM Mikulas Patocka wrote: > > > > > > > > > > > > I'm submitting this patch t

Re: [RFC] nvfs: a filesystem for persistent memory

2020-09-15 Thread Dan Williams
On Tue, Sep 15, 2020 at 5:35 AM Mikulas Patocka wrote: > > Hi > > I am developing a new filesystem suitable for persistent memory - nvfs. Nice! > The goal is to have a small and fast filesystem that can be used on > DAX-based devices. Nvfs maps the whole device into linear address space > and

Re: [PATCH] mm: remove extra ZONE_DEVICE struct page refcount

2020-09-14 Thread Dan Williams
On Mon, Sep 14, 2020 at 3:45 PM Ralph Campbell wrote: > > ZONE_DEVICE struct pages have an extra reference count that complicates the > code for put_page() and several places in the kernel that need to check the > reference count to see that a page is not being used (gup, compaction, > migration,

Re: [PATCH v3] x86/uaccess: Use pointer masking to limit uaccess speculation

2020-09-14 Thread Dan Williams
a0510ea..d35f6dc22341 100644 > --- a/arch/x86/include/asm/uaccess.h > +++ b/arch/x86/include/asm/uaccess.h > @@ -6,6 +6,7 @@ > */ > #include > #include > +#include > #include > #include > #include > @@ -66,12 +67,23 @@ static inline bool pagefault_disabled(void); > * Return: true (nonzero) if the memory block may be valid, false (zero) > * if it is definitely invalid. > */ > -#define access_ok(addr, size) \ unnecessary whitespace change? Other than that and the optional s/force/enforce/ rename + cast collapse you can add: Reviewed-by: Dan Williams

Re: [PATCH v3] x86/uaccess: Use pointer masking to limit uaccess speculation

2020-09-14 Thread Dan Williams
On Mon, Sep 14, 2020 at 10:56 AM Borislav Petkov wrote: > > On Thu, Sep 10, 2020 at 12:22:53PM -0500, Josh Poimboeuf wrote: > > +/* > > + * Sanitize a user pointer such that it becomes NULL if it's not a valid > > user > > + * pointer. This prevents speculative dereferences of user-controlled

Re: [PATCH] PCI/ASPM: Enable ASPM for links under VMD domain

2020-08-27 Thread Dan Williams
On Thu, Aug 27, 2020 at 9:46 AM Derrick, Jonathan wrote: > > On Thu, 2020-08-27 at 17:23 +0100, h...@infradead.org wrote: > > On Thu, Aug 27, 2020 at 04:13:44PM +, Derrick, Jonathan wrote: > > > On Thu, 2020-08-27 at 06:34 +, h...@infradead.org wrote: > > > > On Wed, Aug 26, 2020 at

Re: [PATCH v4 00/23] device-dax: Support sub-dividing soft-reserved ranges

2020-08-21 Thread Dan Williams
On Fri, Aug 21, 2020 at 11:30 AM David Hildenbrand wrote: > > On 21.08.20 20:27, Dan Williams wrote: > > On Fri, Aug 21, 2020 at 3:15 AM David Hildenbrand wrote: > >> > >>>> > >>>> 1. On x86-64, e820 indicates "soft-reserved" memo

Re: [PATCH v4 00/23] device-dax: Support sub-dividing soft-reserved ranges

2020-08-21 Thread Dan Williams
On Fri, Aug 21, 2020 at 3:15 AM David Hildenbrand wrote: > > >> > >> 1. On x86-64, e820 indicates "soft-reserved" memory. This memory is not > >> automatically used in the buddy during boot, but remains untouched > >> (similar to pmem). But as it involves ACPI as well, it could also be > >> used

Re: [PATCH v4 00/23] device-dax: Support sub-dividing soft-reserved ranges

2020-08-19 Thread Dan Williams
On Mon, Aug 3, 2020 at 12:48 AM David Hildenbrand wrote: > > [...] > > > Well, no v5.8-rc8 to line this up for v5.9, so next best is early > > integration into -mm before other collisions develop. > > > > Chatted with Justin offline and it currently appears that the missing > > numa information

Re: [PATCH] dma-debug: fix debug_dma_assert_idle(), use rcu_read_lock()

2020-08-13 Thread Dan Williams
On Thu, Aug 13, 2020 at 12:03 PM Linus Torvalds wrote: > > On Wed, Aug 12, 2020 at 8:17 PM Hugh Dickins wrote: > > > > Since commit 2a9127fcf229 ("mm: rewrite wait_on_page_bit_common() logic") > > improved unlock_page(), it has become more noticeable how cow_user_page() > > in a kernel with

Re: [x86/copy_mc] a0ac629ebe: fio.read_iops -43.3% regression

2020-08-06 Thread Dan Williams
6/copy_mc: Introduce > > copy_mc_generic()") > > url: > > https://github.com/0day-ci/linux/commits/Dan-Williams/Renovate-memcpy_mcsafe-with-copy_mc_to_-user-kernel/20200802-014046 > > > > > > in testcase: fio-basic > > on test machine: 96 threads

[PATCH v4 16/23] mm/memremap_pages: Convert to 'struct range'

2020-08-02 Thread Dan Williams
lerman Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: Ben Skeggs Cc: David Airlie Cc: Daniel Vetter Cc: Ira Weiny Cc: Jason Gunthorpe Signed-off-by: Dan Williams --- arch/powerpc/kvm/book3s_hv_uvmem.c | 13 +++-- drivers/dax/bus.c

[PATCH v4 18/23] device-dax: Add dis-contiguous resource support

2020-08-02 Thread Dan Williams
d-by: Joao Martins Signed-off-by: Dan Williams --- drivers/dax/bus.c | 230 +++- drivers/dax/dax-private.h |9 +- drivers/dax/device.c | 55 ++ drivers/dax/kmem.c | 132 +++ tools/test

[PATCH v4 17/23] mm/memremap_pages: Support multiple ranges per invocation

2020-08-02 Thread Dan Williams
In support of device-dax growing the ability to front physically dis-contiguous ranges of memory, update devm_memremap_pages() to track multiple ranges with a single reference counter and devm instance. Cc: Paul Mackerras Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc

[PATCH v4 14/23] drivers/base: Make device_find_child_by_name() compatible with sysfs inputs

2020-08-02 Thread Dan Williams
iewed-by: Greg Kroah-Hartman Signed-off-by: Dan Williams --- drivers/base/core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 2169c5132558..231189dd6599 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -3328,7 +332

[PATCH v4 19/23] device-dax: Introduce 'mapping' devices

2020-08-02 Thread Dan Williams
is enabled. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 191 + drivers/dax/dax-private.h | 14 +++ 2 files changed, 203 insertions(+), 2 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 8dd82ea9d53d

[PATCH v4 22/23] dax/hmem: Introduce dax_hmem.region_idle parameter

2020-08-02 Thread Dan Williams
-off-by: Joao Martins Link: https://lore.kernel.org/r/20200716172913.19658-4-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/hmem/hmem.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dax/hmem/hmem.c b/drivers/dax/hmem/hmem.c index

[PATCH v4 23/23] device-dax: Add a range mapping allocation attribute

2020-08-02 Thread Dan Williams
9658-5-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/bus.c | 64 + 1 file changed, 64 insertions(+) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index b984213c315f..092112bba6ed 100644 --- a/drivers/dax/bus.c +++ b/d

[PATCH v4 21/23] device-dax: Add an 'align' attribute

2020-08-02 Thread Dan Williams
with 2M and then we switch to 1G. So, we validate all ranges against the new value being attempted, post resizing. Signed-off-by: Joao Martins Link: https://lore.kernel.org/r/20200716172913.19658-3-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/bus.c | 93

[PATCH v4 15/23] device-dax: Add resize support

2020-08-02 Thread Dan Williams
_dax,kmem}/bind echo dax0.1 > ../drivers/{device_dax,kmem}/bind Instances can be destroyed by: echo $device > $(readlink -f $device)../dax_region/delete Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 161 ++---

[PATCH v4 20/23] device-dax: Make align a per-device property

2020-08-02 Thread Dan Williams
: https://lore.kernel.org/r/20200716172913.19658-2-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/bus.c |1 + drivers/dax/dax-private.h |3 +++ drivers/dax/device.c | 37 +++-- 3 files changed, 19 insertions(+), 22

[PATCH v4 11/23] device-dax: Kill dax_kmem_res

2020-08-02 Thread Dan Williams
. - The "Hot-remove not yet implemented." comment is stale since hotremove support is now included. Cc: David Hildenbrand Cc: Vishal Verma Cc: Dave Hansen Cc: Pavel Tatashin Signed-off-by: Dan Williams --- drivers/dax/dax-private.h |3 - drivers/dax/kmem.c

[PATCH v4 03/23] efi/fake_mem: Arrange for a resource entry per efi_fake_mem instance

2020-08-02 Thread Dan Williams
Anvin" Cc: x...@kernel.org Acked-by: Ard Biesheuvel Signed-off-by: Dan Williams --- arch/x86/kernel/e820.c | 16 +++- drivers/firmware/efi/x86_fake_mem.c | 12 +--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/e820.c

[PATCH v4 13/23] device-dax: Introduce 'seed' devices

2020-08-02 Thread Dan Williams
not request. For now just add the device creation, teardown, and ->probe() prevention. A later patch will arrange for the 'dax/size' attribute to be writable to allocate capacity from the region. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c |

[PATCH v4 10/23] device-dax: Make pgmap optional for instance creation

2020-08-02 Thread Dan Williams
the resource range via a new @range property of 'struct dev_dax_data'. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 29 +++-- drivers/dax/bus.h |2 ++ drivers/dax/dax-private.h |9 - drivers/dax/device.c

[PATCH v4 08/23] device-dax: Drop the dax_region.pfn_flags attribute

2020-08-02 Thread Dan Williams
All callers specify the same flags to alloc_dax_region(), so there is no need to allow for anything other than PFN_DEV|PFN_MAP, or carry a ->pfn_flags around on the region. Device-dax instances are always page backed. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bu

[PATCH v4 09/23] device-dax: Move instance creation parameters to 'struct dev_dax_data'

2020-08-02 Thread Dan Williams
In preparation for adding more parameters to instance creation, move existing parameters to a new struct. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 14 +++--- drivers/dax/bus.h | 16 drivers/dax/hmem/hmem.c |8

[PATCH v4 05/23] resource: Report parent to walk_iomem_res_desc() callback

2020-08-02 Thread Dan Williams
Cc: Wei Yang Cc: Tom Lendacky Signed-off-by: Dan Williams --- kernel/resource.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kernel/resource.c b/kernel/resource.c index 841737bbda9e..f1175ce93a1d 100644 --- a/kernel/resource.c +++ b/kernel/resource.c

[PATCH v4 06/23] mm/memory_hotplug: Introduce default phys_to_target_node() implementation

2020-08-02 Thread Dan Williams
message in the generic memory_add_physaddr_to_nid() implementation is fixed up to properly reflect that memory_add_physaddr_to_nid() communicates "online" node info and phys_to_target_node() indicates "target / to-be-onlined" node info. Cc: David Hildenbrand Cc: Mike Rapoport Cc: Jia He Signed-of

[PATCH v4 04/23] ACPI: HMAT: Refactor hmat_register_target_device to hmem_register_device

2020-08-02 Thread Dan Williams
ain values and instead relies on numa_map_to_online_node() to determine the numa node for the device. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/158318761484.2216124.2049322072599482736.st...@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams --- drivers/acpi

[PATCH v4 07/23] ACPI: HMAT: Attach a device for each soft-reserved range

2020-08-02 Thread Dan Williams
uvel Cc: "Rafael J. Wysocki" Cc: Jeff Moyer Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Joao Martins Signed-off-by: Dan Williams --- drivers/dax/hmem/Makefile |3 ++- drivers/dax/hmem/device.c | 35 +++ 2 files changed, 37 insertions(+), 1

[PATCH v4 12/23] device-dax: Add an allocation interface for device-dax instances

2020-08-02 Thread Dan Williams
. This is per Jeff's feedback the last time dynamic device-dax capacity allocation support was discussed. Link: https://lore.kernel.org/linux-nvdimm/x49shpp3zn8@segfault.boston.devel.redhat.com Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 120

[PATCH v4 00/23] device-dax: Support sub-dividing soft-reserved ranges

2020-08-02 Thread Dan Williams
rnel.org/r/154899811738.3165233.12325692939590944259.st...@dwillia2-desk3.amr.corp.intel.com [5]: http://lore.kernel.org/r/20200110190313.17144-1-joao.m.mart...@oracle.com --- Dan Williams (19): x86/numa: Cleanup configuration dependent command-line options x86/numa: Add 'nohmat' option ef

[PATCH v4 02/23] x86/numa: Add 'nohmat' option

2020-08-02 Thread Dan Williams
ov Cc: "H. Peter Anvin" Signed-off-by: Dan Williams --- Documentation/x86/x86_64/boot-options.rst |4 arch/x86/mm/numa.c|2 ++ drivers/acpi/numa/hmat.c |8 +++- include/acpi/acpi_numa.h |8 4 files ch

[PATCH v4 01/23] x86/numa: Cleanup configuration dependent command-line options

2020-08-02 Thread Dan Williams
at compile-time. Suggested-by: Rafael J. Wysocki Signed-off-by: Dan Williams --- arch/x86/include/asm/numa.h |8 +++- arch/x86/mm/numa.c |8 ++-- arch/x86/mm/numa_emulation.c |3 ++- arch/x86/xen/enlighten_pv.c |2 +- drivers/acpi/numa/srat.c |9

[PATCH v8 1/2] x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user, kernel}()

2020-08-01 Thread Dan Williams
Apr 30, 2020 at 6:21 PM Dan Williams wrote: > > > > However now I see that copy_user_generic() works for the wrong reason. > > It works because the exception on the source address due to poison > > looks no different than a write fault on the user address to the

[PATCH v8 2/2] x86/copy_mc: Introduce copy_mc_generic()

2020-08-01 Thread Dan Williams
Cc: Linus Torvalds Reviewed-by: Tony Luck Reported-by: Erwin Tsaur Tested-by: Erwin Tsaur Fixes: 92b0729c34ca ("x86/mm, x86/mce: Add memcpy_mcsafe()") Signed-off-by: Dan Williams --- arch/x86/include/asm/uaccess.h |3 +++ arch/x86/lib/copy_mc.c | 12 +--- arch/

[PATCH v8 0/2] Renovate memcpy_mcsafe with copy_mc_to_{user, kernel}

2020-08-01 Thread Dan Williams
longer accurate and copy_safe() is proposed as its replacement. x86 grows a copy_safe_fast() implementation as a default implementation that is independent of detecting the presence of x86-MCA. --- Dan Williams (2): x86, powerpc: Rename memcpy_mcsafe() to copy_mc_to_{user,kernel}() x86/co

Re: [PATCH v3 02/23] x86/numa: Add 'nohmat' option

2020-08-01 Thread Dan Williams
On Fri, Jul 31, 2020 at 8:51 PM Randy Dunlap wrote: > > On 7/31/20 8:25 PM, Dan Williams wrote: > > Disable parsing of the HMAT for debug, to workaround broken platform > > instances, or cases where it is otherwise not wanted. > > > > --- > > arch/x86/mm/numa

[PATCH v3 17/23] mm/memremap_pages: Support multiple ranges per invocation

2020-07-31 Thread Dan Williams
In support of device-dax growing the ability to front physically dis-contiguous ranges of memory, update devm_memremap_pages() to track multiple ranges with a single reference counter and devm instance. Cc: Paul Mackerras Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc

[PATCH v3 16/23] mm/memremap_pages: Convert to 'struct range'

2020-07-31 Thread Dan Williams
lerman Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: Ben Skeggs Cc: David Airlie Cc: Daniel Vetter Cc: Ira Weiny Cc: Jason Gunthorpe Signed-off-by: Dan Williams --- arch/powerpc/kvm/book3s_hv_uvmem.c | 13 +++-- drivers/dax/bus.c

[PATCH v3 22/23] dax/hmem: Introduce dax_hmem.region_idle parameter

2020-07-31 Thread Dan Williams
-off-by: Joao Martins Link: https://lore.kernel.org/r/20200716172913.19658-4-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/hmem/hmem.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/dax/hmem/hmem.c b/drivers/dax/hmem/hmem.c index

[PATCH v3 21/23] device-dax: Add an 'align' attribute

2020-07-31 Thread Dan Williams
with 2M and then we switch to 1G. So, we validate all ranges against the new value being attempted, post resizing. Signed-off-by: Joao Martins Link: https://lore.kernel.org/r/20200716172913.19658-3-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/bus.c | 102

[PATCH v3 20/23] device-dax: Make align a per-device property

2020-07-31 Thread Dan Williams
: https://lore.kernel.org/r/20200716172913.19658-2-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/bus.c |1 + drivers/dax/dax-private.h |1 + drivers/dax/device.c | 35 +++ 3 files changed, 17 insertions(+), 20 deletions

[PATCH v3 23/23] device-dax: Add a range mapping allocation attribute

2020-07-31 Thread Dan Williams
9658-5-joao.m.mart...@oracle.com Signed-off-by: Dan Williams --- drivers/dax/bus.c | 64 + 1 file changed, 64 insertions(+) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index 7a9439132573..aa67555ba183 100644 --- a/drivers/dax/bus.c +++ b/d

[PATCH v3 18/23] device-dax: Add dis-contiguous resource support

2020-07-31 Thread Dan Williams
d-by: Joao Martins Signed-off-by: Dan Williams --- drivers/dax/bus.c | 230 +++- drivers/dax/dax-private.h |9 +- drivers/dax/device.c | 55 ++ drivers/dax/kmem.c | 132 +++ tools/test

[PATCH v3 19/23] device-dax: Introduce 'mapping' devices

2020-07-31 Thread Dan Williams
is enabled. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 191 + drivers/dax/dax-private.h | 14 +++ 2 files changed, 203 insertions(+), 2 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index f342e36c69a1

[PATCH v3 09/23] device-dax: Move instance creation parameters to 'struct dev_dax_data'

2020-07-31 Thread Dan Williams
In preparation for adding more parameters to instance creation, move existing parameters to a new struct. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 14 +++--- drivers/dax/bus.h | 16 drivers/dax/hmem/hmem.c |8

[PATCH v3 10/23] device-dax: Make pgmap optional for instance creation

2020-07-31 Thread Dan Williams
the resource range via a new @range property of 'struct dev_dax_data'. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 29 +++-- drivers/dax/bus.h |2 ++ drivers/dax/dax-private.h |9 - drivers/dax/device.c

[PATCH v3 13/23] device-dax: Introduce 'seed' devices

2020-07-31 Thread Dan Williams
not request. For now just add the device creation, teardown, and ->probe() prevention. A later patch will arrange for the 'dax/size' attribute to be writable to allocate capacity from the region. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c |

[PATCH v3 15/23] device-dax: Add resize support

2020-07-31 Thread Dan Williams
_dax,kmem}/bind echo dax0.1 > ../drivers/{device_dax,kmem}/bind Instances can be destroyed by: echo $device > $(readlink -f $device)../dax_region/delete Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 161 ++---

[PATCH v3 11/23] device-dax: Kill dax_kmem_res

2020-07-31 Thread Dan Williams
. - The "Hot-remove not yet implemented." comment is stale since hotremove support is now included. Cc: David Hildenbrand Cc: Vishal Verma Cc: Dave Hansen Cc: Pavel Tatashin Signed-off-by: Dan Williams --- drivers/dax/dax-private.h |3 - drivers/dax/kmem.c

[PATCH v3 14/23] drivers/base: Make device_find_child_by_name() compatible with sysfs inputs

2020-07-31 Thread Dan Williams
iewed-by: Greg Kroah-Hartman Signed-off-by: Dan Williams --- drivers/base/core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 2169c5132558..231189dd6599 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -3328,7 +332

[PATCH v3 04/23] ACPI: HMAT: Refactor hmat_register_target_device to hmem_register_device

2020-07-31 Thread Dan Williams
ain values and instead relies on numa_map_to_online_node() to determine the numa node for the device. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/158318761484.2216124.2049322072599482736.st...@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams --- drivers/acpi

[PATCH v3 06/23] mm/memory_hotplug: Introduce default phys_to_target_node() implementation

2020-07-31 Thread Dan Williams
message in the generic memory_add_physaddr_to_nid() implementation is fixed up to properly reflect that memory_add_physaddr_to_nid() communicates "online" node info and phys_to_target_node() indicates "target / to-be-onlined" node info. Cc: David Hildenbrand Cc: Mike Rapoport Cc: Jia He Signed-of

[PATCH v3 12/23] device-dax: Add an allocation interface for device-dax instances

2020-07-31 Thread Dan Williams
. This is per Jeff's feedback the last time dynamic device-dax capacity allocation support was discussed. Link: https://lore.kernel.org/linux-nvdimm/x49shpp3zn8@segfault.boston.devel.redhat.com Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 120

[PATCH v3 07/23] ACPI: HMAT: Attach a device for each soft-reserved range

2020-07-31 Thread Dan Williams
uvel Cc: "Rafael J. Wysocki" Cc: Jeff Moyer Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Joao Martins Signed-off-by: Dan Williams --- drivers/dax/hmem/Makefile |3 ++- drivers/dax/hmem/device.c | 35 +++ 2 files changed, 37 insertions(+), 1

[PATCH v3 01/23] x86/numa: Cleanup configuration dependent command-line options

2020-07-31 Thread Dan Williams
at compile-time. Suggested-by: Rafael J. Wysocki Signed-off-by: Dan Williams --- arch/x86/include/asm/numa.h |8 +++- arch/x86/mm/numa.c |8 ++-- arch/x86/mm/numa_emulation.c |3 ++- arch/x86/xen/enlighten_pv.c |2 +- drivers/acpi/numa/srat.c |9

[PATCH v3 03/23] efi/fake_mem: Arrange for a resource entry per efi_fake_mem instance

2020-07-31 Thread Dan Williams
Anvin" Cc: x...@kernel.org Acked-by: Ard Biesheuvel Signed-off-by: Dan Williams --- arch/x86/kernel/e820.c | 16 +++- drivers/firmware/efi/x86_fake_mem.c | 12 +--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/e820.c

[PATCH v3 02/23] x86/numa: Add 'nohmat' option

2020-07-31 Thread Dan Williams
ov Cc: "H. Peter Anvin" Signed-off-by: Dan Williams --- arch/x86/mm/numa.c |2 ++ drivers/acpi/numa/hmat.c |8 +++- include/acpi/acpi_numa.h |8 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index 87c528

[PATCH v3 08/23] device-dax: Drop the dax_region.pfn_flags attribute

2020-07-31 Thread Dan Williams
All callers specify the same flags to alloc_dax_region(), so there is no need to allow for anything other than PFN_DEV|PFN_MAP, or carry a ->pfn_flags around on the region. Device-dax instances are always page backed. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bu

[PATCH v3 05/23] resource: Report parent to walk_iomem_res_desc() callback

2020-07-31 Thread Dan Williams
Cc: Wei Yang Cc: Tom Lendacky Signed-off-by: Dan Williams --- kernel/resource.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kernel/resource.c b/kernel/resource.c index 841737bbda9e..f1175ce93a1d 100644 --- a/kernel/resource.c +++ b/kernel/resource.c

[PATCH v3 00/23] device-dax: Support sub-dividing soft-reserved ranges

2020-07-31 Thread Dan Williams
rnel.org/r/20200110190313.17144-1-joao.m.mart...@oracle.com --- Dan Williams (19): x86/numa: Cleanup configuration dependent command-line options x86/numa: Add 'nohmat' option efi/fake_mem: Arrange for a resource entry per efi_fake_mem instance ACPI: HMAT: Refactor hmat_register_tar

[PATCH] ACPI: NFIT: Fix ARS zero-sized allocation

2020-07-31 Thread Dan Williams
x180 [nfit] acpi_nfit_scrub+0x36/0xb0 [nfit] process_one_work+0x23c/0x580 worker_thread+0x50/0x3b0 Otherwise the implementation correctly aborts when NULL is returned from devm_kzalloc() in ars_status_alloc(). Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Da

Re: [PATCH v3 0/6] Fix and enable pmem as RAM device on arm64

2020-07-31 Thread Dan Williams
On Wed, Jul 8, 2020 at 7:06 PM Jia He wrote: > > This fixies a few issues when I tried to enable pmem as RAM device on arm64. What NVDIMM bus driver is being used in this case? The ACPI NFIT driver? I'm just looking to see if currently deployed phys_to_target_node() is sufficient, or if this is

Re: [PATCH v1 2/4] device-dax: Add an 'align' attribute

2020-07-31 Thread Dan Williams
On Thu, Jul 16, 2020 at 10:31 AM Joao Martins wrote: > > Introduce a device align attribute. While doing so, > rename the region align attribute to be more explicitly > named as so, but keep it named as @align to retain the API > for tools like daxctl. > > Changes on align may not always be

Re: [PATCH RFC v2 00/18] Add VFIO mediated device support and DEV-MSI support for the idxd driver

2020-07-21 Thread Dan Williams
On Tue, Jul 21, 2020 at 9:29 AM Greg KH wrote: > > On Tue, Jul 21, 2020 at 09:02:15AM -0700, Dave Jiang wrote: > > v2: > > "RFC" to me means "I don't really think this is mergable, so I'm > throwing it out there." Which implies you know it needs more work > before others should review it as you

Re: [PATCH v3 10/11] PM, libnvdimm: Add runtime firmware activation support

2020-07-20 Thread Dan Williams
On Mon, Jul 20, 2020 at 5:14 PM Vishal Verma wrote: > > On Mon, 2020-07-20 at 17:02 -0700, Randy Dunlap wrote: > > Hi Dan, > > > > Documentation comments below: > > Dan, Randy, > > I'm happy to fix these up when applying. Sounds good. Thanks Vishal.

Re: [PATCH v3 10/11] PM, libnvdimm: Add runtime firmware activation support

2020-07-20 Thread Dan Williams
On Mon, Jul 20, 2020 at 5:02 PM Randy Dunlap wrote: > > Hi Dan, > > Documentation comments below: > > On 7/20/20 3:08 PM, Dan Williams wrote: > > Abstract platform specific mechanics for nvdimm firmware activation > > behind a handful of generic ops. At

[PATCH v3 03/11] ACPI: NFIT: Define runtime firmware activation commands

2020-07-20 Thread Dan Williams
/documents/IntelOptanePMem_DSM_Interface-V2.0.pdf Signed-off-by: Dan Williams --- drivers/acpi/nfit/core.c | 86 ++-- drivers/acpi/nfit/intel.h | 53 +++ drivers/acpi/nfit/nfit.h | 25 - include/uapi/linux/ndctl.h |3 +

[PATCH v3 08/11] driver-core: Introduce DEVICE_ATTR_ADMIN_{RO,RW}

2020-07-20 Thread Dan Williams
these sensitive attributes add an explicit helper with the _ADMIN_ identifier for DEVICE_ATTR_ADMIN_{RO,RW}. Reviewed-by: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Dan Williams --- include/linux/device.h |4 include/linux/sysfs.h |7 +++ 2 files c

[PATCH v3 04/11] tools/testing/nvdimm: Cleanup dimm index passing

2020-07-20 Thread Dan Williams
The ND_CMD_CALL path only applies to the nfit_test0 emulated DIMMs. Cleanup occurrences of (i - t->dcr_idx) since that offset fixup only applies to cases where nfit_test1 needs a bus-local index. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams --- tools/test

[PATCH v3 09/11] libnvdimm: Convert to DEVICE_ATTR_ADMIN_RO()

2020-07-20 Thread Dan Williams
Move libnvdimm sysfs attributes that currently use an open coded DEVICE_ATTR() to hide sensitive root-only information (physical memory layout) to the new DEVICE_ATTR_ADMIN_RO() helper. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams --- drivers/nvdimm

[PATCH v3 11/11] ACPI: NFIT: Add runtime firmware activate support

2020-07-20 Thread Dan Williams
E timeouts and the like. Cc: Dave Jiang Cc: Ira Weiny Cc: Vishal Verma Signed-off-by: Dan Williams --- Documentation/ABI/testing/sysfs-bus-nfit | 19 + drivers/acpi/nfit/core.c | 41 +++ drivers/acpi/nfit/intel.c| 386 ++ drivers/acpi/nf

[PATCH v3 06/11] tools/testing/nvdimm: Prepare nfit_ctl_test() for ND_CMD_CALL emulation

2020-07-20 Thread Dan Williams
In preparation for adding a mocked implementation of the firmware-activate bus-info command, rework nfit_ctl_test() to operate on a local command payload wrapped in a 'struct nd_cmd_pkg'. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams --- tools/testing/nvdimm/test

[PATCH v3 07/11] tools/testing/nvdimm: Emulate firmware activation commands

2020-07-20 Thread Dan Williams
in parallel. Simulate that DIMM activation happens serially, 1 second per-DIMM, and limit the max at 3 seconds. The nfit_test0 bus emulates 5 DIMMs so it will take 2 activations to update all DIMMs. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Reported-by: Andy Shevchenko Signed-off-by: Dan Williams

[PATCH v3 10/11] PM, libnvdimm: Add runtime firmware activation support

2020-07-20 Thread Dan Williams
Cc: Len Brown Cc: Jonathan Corbet Cc: Dave Jiang Cc: Vishal Verma [rafael: hibernate_quiet_exec() proposal] Co-developed-by: "Rafael J. Wysocki" Signed-off-by: Dan Williams --- Documentation/ABI/testing/sysfs-bus-nvdimm |2 .../driver-api/nvdimm/firmware-a

[PATCH v3 05/11] tools/testing/nvdimm: Add command debug messages

2020-07-20 Thread Dan Williams
Arrange the for nfit_test_ctl() path to dump command payloads similarly to the acpi_nfit_ctl() path. This is useful for comparing the sequence of command events between an emulated ACPI-NFIT platform and a real one. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams

[PATCH v3 00/11] ACPI/NVDIMM: Runtime Firmware Activation

2020-07-20 Thread Dan Williams
", or can be forced to "live" if there is a explicit knowledge that allowing applications and devices to race the quiesce timeout will have no adverse effects. ndctl activate-firmware nfit_test.0 [--force] These patches are passing an updated version of the ndctl "firm

[PATCH v3 02/11] ACPI: NFIT: Move bus_dsm_mask out of generic nvdimm_bus_descriptor

2020-07-20 Thread Dan Williams
k. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams --- drivers/acpi/nfit/core.c |8 drivers/acpi/nfit/nfit.h |2 +- include/linux/libnvdimm.h|1 - tools/testing/nvdimm/test/nfit.c | 16 4 files chang

[PATCH v3 01/11] libnvdimm: Validate command family indices

2020-07-20 Thread Dan Williams
ted/whitelisted dimm command marshaling mechanism") Cc: Signed-off-by: Dan Williams --- drivers/acpi/nfit/core.c | 11 +-- drivers/acpi/nfit/nfit.h |1 - drivers/nvdimm/bus.c | 16 include/linux/libnvdimm.h |2 ++ include/uapi/linux/ndctl.h

Re: [PATCH v2 22/22] device-dax: Introduce 'mapping' devices

2020-07-16 Thread Dan Williams
On Thu, Jul 16, 2020 at 6:19 AM Joao Martins wrote: > > On 7/12/20 5:28 PM, Dan Williams wrote: > > In support of interrogating the physical address layout of a device with > > dis-contiguous ranges, introduce a sysfs directory with 'start', 'end', > > and

Re: [PATCH] /dev/mem: Add missing memory barriers for devmem_inode

2020-07-16 Thread Dan Williams
l dependency, i.e. if all memory being "published" is > transitively reachable via the pointer itself. But this pairing is > somewhat confusing and error-prone. So just upgrade the read side to > smp_load_acquire() so that it clearly pairs with smp_store_release(). > > Cc: D

Re: [PATCH v2 19/22] mm/memremap_pages: Convert to 'struct range'

2020-07-13 Thread Dan Williams
On Mon, Jul 13, 2020 at 9:36 AM Ralph Campbell wrote: > > > On 7/12/20 9:27 AM, Dan Williams wrote: > > The 'struct resource' in 'struct dev_pagemap' is only used for holding > > resource span information. The other fields, 'name', 'flags', 'desc', > > 'parent', 'si

Re: [PATCH v2 17/22] drivers/base: Make device_find_child_by_name() compatible with sysfs inputs

2020-07-13 Thread Dan Williams
On Mon, Jul 13, 2020 at 9:13 AM Greg Kroah-Hartman wrote: > > On Mon, Jul 13, 2020 at 09:09:18AM -0700, Dan Williams wrote: > > On Mon, Jul 13, 2020 at 8:52 AM Greg Kroah-Hartman > > wrote: > > > > > > On Mon, Jul 13, 2020 at 08:39:43AM -0700, Dan Williams

Re: [PATCH v2 17/22] drivers/base: Make device_find_child_by_name() compatible with sysfs inputs

2020-07-13 Thread Dan Williams
On Mon, Jul 13, 2020 at 8:52 AM Greg Kroah-Hartman wrote: > > On Mon, Jul 13, 2020 at 08:39:43AM -0700, Dan Williams wrote: > > On Sun, Jul 12, 2020 at 10:09 AM Greg Kroah-Hartman > > wrote: > > > > > > On Sun, Jul 12, 2020 at 09:27:37AM -0700, Dan Wil

Re: [Ksummit-discuss] [PATCH] CodingStyle: Inclusive Terminology

2020-07-13 Thread Dan Williams
On Sun, Jul 12, 2020 at 9:26 PM Vinod Koul wrote: > > Hi Mauro, > > On 09-07-20, 13:11, Mauro Carvalho Chehab wrote: > > Em Mon, 06 Jul 2020 06:30:01 -0700 > > Joe Perches escreveu: > > > > > > $ git grep -i -w -P '\w*slave\w*' drivers | \ > > > cut -f1,2 -d/ | uniq -c | sort -rn | head -20 |

Re: [PATCH v2 08/22] memblock: Introduce a generic phys_addr_to_target_node()

2020-07-13 Thread Dan Williams
On Mon, Jul 13, 2020 at 12:04 AM Mike Rapoport wrote: > > Hi Dan, > > On Sun, Jul 12, 2020 at 09:26:48AM -0700, Dan Williams wrote: > > Similar to how generic memory_add_physaddr_to_nid() interrogates > > memblock data for numa information, introduce > > g

Re: [PATCH v2 07/22] numa: Introduce a generic memory_add_physaddr_to_nid()

2020-07-13 Thread Dan Williams
On Sun, Jul 12, 2020 at 11:58 PM Mike Rapoport wrote: > > Hi Dan, > > On Sun, Jul 12, 2020 at 09:26:43AM -0700, Dan Williams wrote: > > For architectures that opt into storing their numa data in memblock > > (only ARM64 currently), add a memblock generic way to i

Re: [PATCH v2 17/22] drivers/base: Make device_find_child_by_name() compatible with sysfs inputs

2020-07-13 Thread Dan Williams
On Sun, Jul 12, 2020 at 10:09 AM Greg Kroah-Hartman wrote: > > On Sun, Jul 12, 2020 at 09:27:37AM -0700, Dan Williams wrote: > > Use sysfs_streq() in device_find_child_by_name() to allow it to use a > > sysfs input string that might contain a trailing newline. > > >

[PATCH v2 20/22] mm/memremap_pages: Support multiple ranges per invocation

2020-07-12 Thread Dan Williams
In support of device-dax growing the ability to front physically dis-contiguous ranges of memory, update devm_memremap_pages() to track multiple ranges with a single reference counter and devm instance. Cc: Paul Mackerras Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Dan Williams Cc

[PATCH v2 22/22] device-dax: Introduce 'mapping' devices

2020-07-12 Thread Dan Williams
is enabled. Cc: Vishal Verma Signed-off-by: Dan Williams --- drivers/dax/bus.c | 191 + drivers/dax/dax-private.h | 14 +++ 2 files changed, 203 insertions(+), 2 deletions(-) diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index f342e36c69a1

<    3   4   5   6   7   8   9   10   11   12   >