led with error -22
This fixes it by using fallback memory_add_physaddr_to_nid() as nid.
Suggested-by: David Hildenbrand
Signed-off-by: Jia He
---
v2: - rebase it based on David's "memory group" patch.
- drop the changes in dev_dax_kmem_remove() since nid had been
removed in
userspace "segment fault" error can be easily
triggered by running simple gVisor runsc cases on an Ampere Altra
server:
docker run --runtime=runsc -it --rm ubuntu /bin/bash
In container:
for i in `seq 1 100`;do ls;done
Reported-by: Howard Zhang
Signed-off-by: Jia He
---
nds on static key enable api.
Percpu helpers should be avoided in cpuinfo_store_boot_cpu() before percpu
init at main.c::setup_per_cpu_areas()
Signed-off-by: Jia He
---
arch/arm64/include/asm/cpu.h | 1 +
arch/arm64/kernel/cpuinfo.c | 13 ++---
arch/arm64/kernel/setup.c|
ecause I want to resolve any other points which I have
misconerned.
Jia He (2):
arm64/cpuinfo: Move init_cpu_features() ahead of early_fixmap_init()
arm64: kpti: Update arm64_use_ng_mappings before pagetable mapping
arch/arm64/include/asm/cpu.h | 1 +
arch/arm64/kernel/cpuinfo.c | 13 ++--
earlier than before. Hence we can avoid this stall
by updating arm64_use_ng_mappings.
Signed-off-by: Jia He
---
arch/arm64/kernel/setup.c | 4
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index e078ab068f3b..51098ceb7159 100644
--- a/arch
EMAG server:
"VFIO_MAP_DMA failed: Bad address"
[1]
https://gitlab.com/virtio-fs/qemu/-/blob/virtio-fs-dev/hw/virtio/vhost-user-fs.c#L502
Signed-off-by: Jia He
---
drivers/vfio/vfio_iommu_type1.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio
ause a panic.
Fixes: 0ea683931adb ("gpio: dwapb: Convert driver to using the
GPIO-lib-based IRQ-chip")
Signed-off-by: Jia He
---
drivers/gpio/gpio-dwapb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
in
The alignment check has been done by check_hotplug_memory_range(). Hence
the redundant one in create_memory_block_devices() can be removed.
The similar redundant check is removed in remove_memory_block_devices().
Signed-off-by: Jia He
---
drivers/base/memory.c | 8
1 file changed, 8
The helper is to find the lowest iomem resource that covers part of
[@start..@end]
It is useful when relaxing the alignment check for dax pmem kmem.
Signed-off-by: Jia He
---
include/linux/ioport.h | 3 +++
kernel/resource.c | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff
which causes big memory space wasting.
This changes it by relaxing the alignment check for dax pmem kmem in the
path of online/offline memory blocks.
Signed-off-by: Jia He
---
drivers/base/memory.c | 16
mm/memory_hotplug.c | 39 ++-
2 files
) is fe0007e9.
Without this patch, vmemmap_populate(fe0007e9, ...) will incorrectly
create a pmd mapping [fe0007e0, fe000800] which contains
fe0007e9.
This adds the check and then falls back to vmemmap_populate_basepages()
Signed-off-by: Jia He
---
arch/arm64/mm
range.
Without this patch, the check of __init_single_page when doing online memory
will be failed because those pages haven't been mapped in mmu(not present
from mmu's point of view).
Signed-off-by: Jia He
---
mm/page_alloc.c | 14 ++
1 file changed, 14 insertions(+)
diff --git
y hotplug added.
This patches remove the tight alignment constraint of
memory_block_size_bytes(), but still keep the constraint from
online_pages_range().
Signed-off-by: Jia He
---
drivers/dax/kmem.c | 22 +-
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/dr
/lkml.org/lkml/2020/7/8/1546
Jia He (6):
mm/memory_hotplug: remove redundant memory block size alignment check
resource: export find_next_iomem_res() helper
mm/memory_hotplug: allow pmem kmem not to align with memory_block_size
mm/page_alloc: adjust the start,end in dax pmem kmem case
d
to set a fallback value for dev_dax->target_node.
Reviewed-by: David Hildenbrand
Signed-off-by: Jia He
---
arch/arm64/mm/numa.c | 10 --
arch/ia64/mm/numa.c | 2 --
arch/sh/mm/init.c| 9 -
arch/x86/mm/numa.c | 1 -
mm/memory_hotplug.c | 10 ++
5 files chan
device_release_driver_internal+0x100/0x1c0
driver_detach+0x4c/0x8f
bus_remove_driver+0x5c/0xd0
driver_unregister+0x31/0x50
dax_pmem_exit+0x10/0xfe0 [dax_pmem]
Fixes: f1037ec0cc8a ("mm/memory_hotplug: fix remove_memory() lockdep splat")
Cc: sta...@vger.kernel.org # v5.6+
Signed-off-
ecific one
- fix an uninitialization bug in v2 device-dax patch
v2: https://lkml.org/lkml/2020/7/7/71
- Drop unnecessary patch to harden try_offline_node
- Use new solution(by David) to fix dev->target_node=-1 during probing
- Refine the mem_hotplug_begin/done patch
v1: https://lkml.org/lkml/
-22
This fixes it by using fallback memory_add_physaddr_to_nid() as nid.
Suggested-by: David Hildenbrand
Signed-off-by: Jia He
---
drivers/dax/kmem.c | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index 275aa5f87
device_release_driver_internal+0x100/0x1c0
driver_detach+0x4c/0x8f
bus_remove_driver+0x5c/0xd0
driver_unregister+0x31/0x50
dax_pmem_exit+0x10/0xfe0 [dax_pmem]
Fixes: f1037ec0cc8a ("mm/memory_hotplug: fix remove_memory() lockdep splat")
Cc: sta...@vger.kernel.org # v5.6+
Signed-off-
.
Previous export was in vmlinux
Suggested-by: David Hildenbrand
Signed-off-by: Jia He
---
arch/ia64/mm/numa.c | 2 --
arch/x86/mm/numa.c | 1 -
2 files changed, 3 deletions(-)
diff --git a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c
index 5e1015eb6d0d..f34964271101 100644
--- a/arch/ia64/mm
This is to introduce a general dummy helper. memory_add_physaddr_to_nid()
is a fallback option to get the nid in case NUMA_NO_NID is detected.
After this patch, arm64/sh/s390 can simply use the general dummy version.
PowerPC/x86/ia64 will still use their specific version.
Signed-off-by: Jia He
After making default memory_add_physaddr_to_nid() in mm/memory_hotplug,
it is no use defining a similar one in arch specific directory.
Signed-off-by: Jia He
---
arch/arm64/mm/numa.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c
index
After making default memory_add_physaddr_to_nid in mm/memory_hotplug,
there is no use to define a similar one in arch specific directory.
Signed-off-by: Jia He
---
arch/sh/mm/init.c | 9 -
1 file changed, 9 deletions(-)
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index
hotplug_begin/done patch
v1: https://lkml.org/lkml/2020/7/5/381
Jia He (6):
mm/memory_hotplug: introduce default dummy
memory_add_physaddr_to_nid()
arm64/mm: use default dummy memory_add_physaddr_to_nid()
sh/mm: use default dummy memory_add_physaddr_to_nid()
mm:
to harden try_offline_node
- Use new solution(by David) to fix dev->target_node=-1 during probing
- Refine the mem_hotplug_begin/done patch
v1: https://lkml.org/lkml/2020/7/5/381
Jia He (3):
arm64/numa: export memory_add_physaddr_to_nid as EXPORT_SYMBOL_GPL
device-dax: use fallback nid w
led with error -22
This fixes it by using fallback memory_add_physaddr_to_nid() as nid.
Suggested-by: David Hildenbrand
Signed-off-by: Jia He
---
I noticed that on powerpc memory_add_physaddr_to_nid is not exported for module
driver. Set it to RFC due to this concern.
drivers/dax/kmem.c |
This exports memory_add_physaddr_to_nid() for module driver to use.
memory_add_physaddr_to_nid() is a fallback option to get the nid in case
NUMA_NO_NID is detected.
Suggested-by: David Hildenbrand
Signed-off-by: Jia He
---
arch/arm64/mm/numa.c | 5 +++--
1 file changed, 3 insertions(+), 2
device_release_driver_internal+0x100/0x1c0
driver_detach+0x4c/0x8f
bus_remove_driver+0x5c/0xd0
driver_unregister+0x31/0x50
dax_pmem_exit+0x10/0xfe0 [dax_pmem]
Fixes: f1037ec0cc8a ("mm/memory_hotplug: fix remove_memory() lockdep splat")
Cc: sta...@vger.kernel.org # v5.6+
Signed-off-
device_release_driver_internal+0x100/0x1c0
driver_detach+0x4c/0x8f
bus_remove_driver+0x5c/0xd0
driver_unregister+0x31/0x50
dax_pmem_exit+0x10/0xfe0 [dax_pmem]
This fixes it by moving mem_hotplug_done ahead of "done"
Signed-off-by: Jia He
---
mm/memory_hotplug.c | 2 +-
1 file changed, 1
This fix a few issues when I tried to enable pmem as RAM device on arm64.
Tested on ThunderX2 host/qemu "-M virt" guest.
Jia He (3):
arm64/numa: set numa_off to false when numa node is fake
mm/memory_hotplug: harden try_offline_node against bogus nid
mm/memory_hotplug: fi
.
Signed-off-by: Jia He
---
arch/arm64/mm/numa.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c
index aafcee3e3f7e..7689986020d9 100644
--- a/arch/arm64/mm/numa.c
+++ b/arch/arm64/mm/numa.c
@@ -440,7 +440,8 @@ static int __init
to numa_off, it is worth
hardening the codes in try_offline_node(), quiting if !pgdat.
Signed-off-by: Jia He
---
mm/memory_hotplug.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index da374cd3d45b..e1e290577b45 100644
--- a/mm/memory_hotplug.c
+++ b/mm
eck the data structure member "sk_shutdown" (suggested by Stefano)
after a call of the function "lock_sock" since this field is set to
"SHUTDOWN_MASK" under the protection of "lock_sock_nested".
Fixes: 06a8fc78367d ("VSOCK: Introduce virtio_vsock_common.
eck the data structure member “sk_shutdown” (suggested by Stefano)
after a call of the function “lock_sock” since this field is set to
“SHUTDOWN_MASK” under the protection of “lock_sock_nested”.
Fixes: 06a8fc78367d ("VSOCK: Introduce virtio_vsock_common.ko")
Signed-off-by: Jia He
Cc: sta
This fixes it by checking sk->sk_shutdown(suggested by Stefano) after
lock_sock since sk->sk_shutdown is set to SHUTDOWN_MASK under the
protection of lock_sock_nested.
Signed-off-by: Jia He
Cc: sta...@vger.kernel.org
Reviewed-by: Stefano Garzarella
---
v3: - describe the fix of race condition more cl
k_sock(). If there is __vsock_release() in another task, sk->sk_socket
will be set to NULL inadvertently.
This fixes it by checking sk->sk_shutdown.
Signed-off-by: Jia He
Cc: sta...@vger.kernel.org
Cc: Stefano Garzarella
---
v2: use lightweight checking suggested by Stefano Garzarella
n
virtio_transport_recv_connecting
sk->sk_socket->state (panic)
This fixes it by checking vsk again whether it is in bound/connected table.
Signed-off-by: Jia He
Cc: sta...@vger.kernel.org
---
net/vmw
to no fully support on arm64 qemu
yet
- Host nvdimm device hotplug
Hence from above result,
Tested-by: Jia He
This series applies after latest (v14) arm64 memory hot remove series
(https://lkml.org/lkml/2020/3/3/1746) on Linux 5.6.
Pending Question:
altmap_alloc_block_buf() does not have any other
h vsock enabled) boot time is reduced
from 3s to 1s on a ThunderX2 arm64 server.
[1] https://github.com/kata-containers/runtime/issues/1917
Reported-by: Ning Bo
Suggested-by: Stefano Garzarella
Signed-off-by: Jia He
---
v2: new solution suggested by Stefano Garzarella
drivers/vhost/vsoc
vq->mutex is to protect any vq accessing, hence adding mutex_lock/unlock
makes sense to avoid potential race condition.
Signed-off-by: Jia He
---
drivers/vhost/vhost.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index d450e16c5
from
3s to 1s on ThunderX2 arm64 server.
[1] https://github.com/kata-containers/runtime/issues/1917
Reported-by: Ning Bo
Signed-off-by: Jia He
---
drivers/vhost/vsock.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
index e36aaf
:19:05AM +, Justin He (Arm Technology
China) wrote:
> > > On Mon, Sep 30, 2019 at 09:57:40AM +0800, Jia He wrote:
> > > > diff --git a/mm/memory.c b/mm/memory.c
> > > > index b1ca51a079f2..1f56b0118ef5 100644
> > > > --- a/mm/memory.c
> >
arch_faults_on_old_pte is a helper to indicate that it might cause page
fault when accessing old pte. But on x86, there is feature to setting
pte access flag by hardware. Hence implement an overriding stub which
always returns false.
Signed-off-by: Jia He
Suggested-by: Will Deacon
---
arch/x86
me
fix kbuild test failed
v4: introduce cpu_has_hw_af (Suzuki)
bail out if !pte_same (Kirill)
v3: add vmf->ptl lock/unlock (Kirill A. Shutemov)
add arch_faults_on_old_pte (Matthew, Catalin)
v2: remove FAULT_FLAG_WRITE when setting pte access flag (Catalin)
Jia He (4):
arm64: cpufeatu
rill).
[1] https://github.com/pmem/pmdk/tree/master/src/test/vmmalloc_fork
Signed-off-by: Jia He
Reported-by: Yibo Cai
Reviewed-by: Catalin Marinas
Acked-by: Kirill A. Shutemov
---
mm/memory.c | 104
1 file changed, 89 insertions(+), 15
on arm64 to indicate that it might
cause page fault when accessing old pte.
Signed-off-by: Jia He
Reviewed-by: Catalin Marinas
---
arch/arm64/include/asm/pgtable.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
on this path, we can
turn it into a static label as with other CPU features.
Signed-off-by: Jia He
Suggested-by: Suzuki Poulose
Reviewed-by: Catalin Marinas
---
arch/arm64/include/asm/cpufeature.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/include/asm/cpufeature.h
b
arch_faults_on_old_pte is a helper to indicate that it might cause page
fault when accessing old pte. But on x86, there is feature to setting
pte access flag by hardware. Hence implement an overriding stub which
always returns false.
Signed-off-by: Jia He
Suggested-by: Will Deacon
---
arch/x86
on arm64 to indicate that it might
cause page fault when accessing old pte.
Signed-off-by: Jia He
Reviewed-by: Catalin Marinas
---
arch/arm64/include/asm/pgtable.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
rill).
[1] https://github.com/pmem/pmdk/tree/master/src/test/vmmalloc_fork
Signed-off-by: Jia He
Reported-by: Yibo Cai
Reviewed-by: Catalin Marinas
Acked-by: Kirill A. Shutemov
---
mm/memory.c | 104
1 file changed, 89 insertions(+), 15
We unconditionally set the HW_AFDBM capability and only enable it on
CPUs which really have the feature. But sometimes we need to know
whether this cpu has the capability of HW AF. So decouple AF from
DBM by a new helper cpu_has_hw_af().
Signed-off-by: Jia He
Suggested-by: Suzuki Poulose
3: add vmf->ptl lock/unlock (Kirill A. Shutemov)
add arch_faults_on_old_pte (Matthew, Catalin)
v2: remove FAULT_FLAG_WRITE when setting pte access flag (Catalin)
Jia He (4):
arm64: cpufeature: introduce helper cpu_has_hw_af()
arm64: mm: implement arch_faults_on_old_pte() on arm64
x86/
China)
Subject: Re: [PATCH v10 1/3] arm64: cpufeature: introduce helper
cpu_has_hw_af()
On Tue, 1 Oct 2019 13:54:47 +0100
Will Deacon wrote:
On Mon, Sep 30, 2019 at 09:57:38AM +0800, Jia He wrote:
We unconditionally set the HW_AFDBM capability and only enable it on
CPUs which really have
We unconditionally set the HW_AFDBM capability and only enable it on
CPUs which really have the feature. But sometimes we need to know
whether this cpu has the capability of HW AF. So decouple AF from
DBM by new helper cpu_has_hw_af().
Signed-off-by: Jia He
Suggested-by: Suzuki Poulose
Reviewed
on arm64 to indicate that it might
cause page fault when accessing old pte.
Signed-off-by: Jia He
Reviewed-by: Catalin Marinas
---
arch/arm64/include/asm/pgtable.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
fix kbuild test failed
v4: introduce cpu_has_hw_af (Suzuki)
bail out if !pte_same (Kirill)
v3: add vmf->ptl lock/unlock (Kirill A. Shutemov)
add arch_faults_on_old_pte (Matthew, Catalin)
v2: remove FAULT_FLAG_WRITE when setting pte access flag (Catalin)
Jia He (3):
arm64: cpufeatu
vmf should be passed to cow_user_page()
Add a WARN_ON_ONCE when __copy_from_user_inatomic() returns error
in case there can be some obscure use-case.(by Kirill)
[1] https://github.com/pmem/pmdk/tree/master/src/test/vmmalloc_fork
Signed-off-by: Jia He
Reported-by: Yibo Cai
Reviewed-by: Catalin Mari
on arm64 to indicate that it might
cause page fault when accessing old pte.
Signed-off-by: Jia He
Reviewed-by: Catalin Marinas
---
arch/arm64/include/asm/pgtable.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
vmf should be passed to cow_user_page()
Add a WARN_ON_ONCE when __copy_from_user_inatomic() returns error
in case there can be some obscure use-case.(by Kirill)
[1] https://github.com/pmem/pmdk/tree/master/src/test/vmmalloc_fork
Signed-off-by: Jia He
Reported-by: Yibo Cai
---
mm/mem
We unconditionally set the HW_AFDBM capability and only enable it on
CPUs which really have the feature. But sometimes we need to know
whether this cpu has the capability of HW AF. So decouple AF from
DBM by new helper cpu_has_hw_af().
Signed-off-by: Jia He
Suggested-by: Suzuki Poulose
Reported
3: add vmf->ptl lock/unlock (Kirill A. Shutemov)
add arch_faults_on_old_pte (Matthew, Catalin)
v2: remove FAULT_FLAG_WRITE when setting pte access flag (Catalin)
Jia He (3):
arm64: cpufeature: introduce helper cpu_has_hw_af()
arm64: mm: implement arch_faults_on_old_pte() on arm64
m
Hi Catalin
On 2019/9/24 18:33, Catalin Marinas wrote:
On Tue, Sep 24, 2019 at 06:43:06AM +, Justin He (Arm Technology China)
wrote:
Catalin Marinas wrote:
On Sat, Sep 21, 2019 at 09:50:54PM +0800, Jia He wrote:
@@ -2151,21 +2163,53 @@ static inline void cow_user_page(struct page *dst
vmf should be passed to cow_user_page()
Add a WARN_ON_ONCE when __copy_from_user_inatomic() returns error
in case there can be some obscure use-case.(by Kirill)
[1] https://github.com/pmem/pmdk/tree/master/src/test/vmmalloc_fork
Reported-by: Yibo Cai
Signed-off-by: Jia He
---
mm/mem
, Catalin)
v2: remove FAULT_FLAG_WRITE when setting pte access flag (Catalin)
Jia He (3):
arm64: cpufeature: introduce helper cpu_has_hw_af()
arm64: mm: implement arch_faults_on_old_pte() on arm64
mm: fix double page fault on arm64 if PTE_AF is cleared
arch/arm64/include/asm/cpufeature.h | 10
on arm64 to indicate that it might
cause page fault when accessing old pte.
Signed-off-by: Jia He
---
arch/arm64/include/asm/pgtable.h | 12
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index e09760ece844..4a9939615e41
Signed-off-by: Jia He
---
arch/arm64/include/asm/cpufeature.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/include/asm/cpufeature.h
b/arch/arm64/include/asm/cpufeature.h
index c96ffa4722d3..46caf934ba4e 100644
--- a/arch/arm64/include/asm/cpufeature.h
+++ b/arch
[On behalf of justin...@arm.com]
Hi Matthew
On 2019/9/20 23:53, Matthew Wilcox wrote:
On Fri, Sep 20, 2019 at 09:54:37PM +0800, Jia He wrote:
-static inline void cow_user_page(struct page *dst, struct page *src, unsigned
long va, struct vm_area_struct *vma)
+static inline int cow_user_page
e access flag (Catalin)
Jia He (3):
arm64: cpufeature: introduce helper cpu_has_hw_af()
arm64: mm: implement arch_faults_on_old_pte() on arm64
mm: fix double page fault on arm64 if PTE_AF is cleared
arch/arm64/include/asm/cpufeature.h | 10 +
arch/arm64/include/asm/pgtable.h|
vmf should be passed to cow_user_page()
Add a WARN_ON_ONCE when __copy_from_user_inatomic() returns error
in case there can be some obscure use-case.(by Kirill)
[1] https://github.com/pmem/pmdk/tree/master/src/test/vmmalloc_fork
Reported-by: Yibo Cai
Signed-off-by: Jia He
---
mm/mem
Signed-off-by: Jia He
---
arch/arm64/include/asm/cpufeature.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/include/asm/cpufeature.h
b/arch/arm64/include/asm/cpufeature.h
index c96ffa4722d3..46caf934ba4e 100644
--- a/arch/arm64/include/asm/cpufeature.h
+++ b/arch
on arm64 to indicate that it might
cause page fault when accessing old pte.
Signed-off-by: Jia He
---
arch/arm64/include/asm/pgtable.h | 12
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index e09760ece844..4a9939615e41
vmf should be passed to cow_user_page()
Add a WARN_ON_ONCE when __copy_from_user_inatomic() returns error
in case there can be some obscure use-case.(by Kirill)
[1] https://github.com/pmem/pmdk/tree/master/src/test/vmmalloc_fork
Reported-by: Yibo Cai
Signed-off-by: Jia He
---
mm/mem
Signed-off-by: Jia He
---
arch/arm64/include/asm/cpufeature.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/include/asm/cpufeature.h
b/arch/arm64/include/asm/cpufeature.h
index c96ffa4722d3..46caf934ba4e 100644
--- a/arch/arm64/include/asm/cpufeature.h
+++ b/arch
!pte_same
fix kbuild test failed
v4: introduce cpu_has_hw_af (Suzuki)
bail out if !pte_same (Kirill)
v3: add vmf->ptl lock/unlock (Kirill A. Shutemov)
add arch_faults_on_old_pte (Matthew, Catalin)
v2: remove FAULT_FLAG_WRITE when setting pte access flag (Catalin)
Jia He (3):
arm6
on arm64 to indicate that it might
cause page fault when accessing old pte.
Signed-off-by: Jia He
---
arch/arm64/include/asm/pgtable.h | 12
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index e09760ece844..4a9939615e41
on arm64 to indicate that it might
cause page fault when accessing old pte.
Signed-off-by: Jia He
---
arch/arm64/include/asm/pgtable.h | 12
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index e09760ece844..4a9939615e41
vmf should be passed to cow_user_page()
Add a WARN_ON_ONCE when __copy_from_user_inatomic() returns error
in case there can be some obscure use-case.(by Kirill)
[1] https://github.com/pmem/pmdk/tree/master/src/test/vmmalloc_fork
Reported-by: Yibo Cai
Signed-off-by: Jia He
---
mm/mem
->ptl lock/unlock (by Kirill A. Shutemov)
add arch_faults_on_old_pte (Matthew, Catalin)
v2: remove FAULT_FLAG_WRITE when setting pte access flag (by Catalin)
Jia He (3):
arm64: cpufeature: introduce helper cpu_has_hw_af()
arm64: mm: implement arch_faults_on_old_pte() on arm64
mm: fi
Signed-off-by: Jia He
---
arch/arm64/include/asm/cpufeature.h | 1 +
arch/arm64/kernel/cpufeature.c | 10 ++
2 files changed, 11 insertions(+)
diff --git a/arch/arm64/include/asm/cpufeature.h
b/arch/arm64/include/asm/cpufeature.h
index c96ffa4722d3..206b6e3954cf 100644
--- a/arch
Hi Kirill
[On behalf of justin...@arm.com because some mails are filted...]
On 2019/9/18 22:00, Kirill A. Shutemov wrote:
On Wed, Sep 18, 2019 at 09:19:14PM +0800, Jia He wrote:
When we tested pmdk unit test [1] vmmalloc_fork TEST1 in arm64 guest, there
will be a double page fault
vmf should be passed to cow_user_page()
[1] https://github.com/pmem/pmdk/tree/master/src/test/vmmalloc_fork
Reported-by: Yibo Cai
Signed-off-by: Jia He
---
mm/memory.c | 35 ++-
1 file changed, 30 insertions(+), 5 deletions(-)
diff --git a/mm/memory.c b/mm/memo
on arm64 to indicate that it might
cause page fault when accessing old pte.
Signed-off-by: Jia He
---
arch/arm64/include/asm/pgtable.h | 12
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index e09760ece844..4a9939615e41
We unconditionally set the HW_AFDBM capability and only enable it on
CPUs which really have the feature. But sometimes we need to know
whether this cpu has the capability of HW AF. So decouple AF from
DBM by new helper cpu_has_hw_af().
Signed-off-by: Jia He
Suggested-by: Suzuki Poulose
_pte (Matthew, Catalin)
v2: remove FAULT_FLAG_WRITE when setting pte access flag (by Catalin)
Jia He (3):
arm64: cpufeature: introduce helper cpu_has_hw_af()
arm64: mm: implement arch_faults_on_old_pte() on arm64
mm: fix double page fault on arm64 if PTE_AF is cleared
arch/arm64/include/asm
on arm64 to indicate that it might
cause page fault when accessing old pte.
Signed-off-by: Jia He
---
arch/arm64/include/asm/pgtable.h | 12
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index e09760ece844..b41399d758df
vmf should be passed to cow_user_page()
[1] https://github.com/pmem/pmdk/tree/master/src/test/vmmalloc_fork
Reported-by: Yibo Cai
Signed-off-by: Jia He
---
mm/memory.c | 30 +-
1 file changed, 25 insertions(+), 5 deletions(-)
diff --git a/mm/memory.c b/mm/memo
e access flag (by Catalin)
Jia He (2):
arm64: mm: implement arch_faults_on_old_pte() on arm64
mm: fix double page fault on arm64 if PTE_AF is cleared
arch/arm64/include/asm/pgtable.h | 11 +++
mm/memory.c | 29 -
2 files changed, 35 ins
vmf should be passed to cow_user_page()
[1] https://github.com/pmem/pmdk/tree/master/src/test/vmmalloc_fork
Reported-by: Yibo Cai
Signed-off-by: Jia He
---
Changes
v2: remove FAULT_FLAG_WRITE when setting pte access flag (by Catalin)
mm/memory.c | 21 -
1 file changed, 16
.
This patch fix it by calling pte_mkyoung. Also, the parameter is
changed because vmf should be passed to cow_user_page()
[1] https://github.com/pmem/pmdk/tree/master/src/test/vmmalloc_fork
Reported-by: Yibo Cai
Signed-off-by: Jia He
---
mm/memory.c | 21 -
1 file changed, 16
This patch set is to fix some dax kmem driver issues and then it can
support to use pmem as normal RAM in arm64 qemu guest.
Jia He (2):
drivers/dax/kmem: use default numa_mem_id if target_node is invalid
drivers/dax/kmem: give a warning if CONFIG_DEV_DAX_PMEM_COMPAT is
enabled
drivers
/device_dax/unbind
-bash: echo: write error: No such device
This gives a warning to notify the user.
Signed-off-by: Jia He
---
drivers/dax/kmem.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index ad62d551d94e..b77f0e880598 100644
--- a/drivers/dax/kmem
with it.
Signed-off-by: Jia He
---
drivers/dax/kmem.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index a02318c6d28a..ad62d551d94e 100644
--- a/drivers/dax/kmem.c
+++ b/drivers/dax/kmem.c
@@ -33,9 +33,9 @@ int dev_dax_kmem_probe(struct
n cause crash.
This patch fixes it with introducing a new file_dentry_name.
Signed-off-by: Jia He
---
lib/vsprintf.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 63937044c57d..b4a119176fdb 100644
--- a/lib/vsprintf.c
+++ b/l
This add some additional test cases of null/invalid pointer dereference
for dentry and file (%pd and %pD)
Signed-off-by: Jia He
---
lib/test_printf.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/lib/test_printf.c b/lib/test_printf.c
index 944eb50f3862..befedffeb476 100644
u mount with '-o dax'?\n");
return 1;
}
memset(addr, 0x55, 4096);
if (munmap(addr, 4096) == -1) {
perror("munmap");
return 1;
}
close(fd);
return 0;
}
Fixes: 73b20c84d42d ("arm64: mm: implement pte_devmap support")
Repo
) {
+ for_each_online_cpu(i) {
Have you considered the case in non-acpi mode? and setting "maxcpus=n" in host
kernel boot
parameters?
---
Cheers,
Justin (Jia He)
struct cpu *cpu = _cpu(cpu_data.cpu, i);
cpu->hotpluggable = 1;
regist
Hi Xiongfeng
Sorry, I missed your latter mail, you used a emulated SCI interrupt
---
Cheers,
Justin (Jia He)
On 2019/7/4 11:26, Xiongfeng Wang wrote:
Hi Justin,
On 2019/7/4 11:00, Jia He wrote:
Hi Xiongfeng
It is a little bit awkful that I am also investigating acpi based cpu hotplug
Hi Xiongfeng
On 2019/7/4 11:26, Xiongfeng Wang wrote:
Hi Justin,
On 2019/7/4 11:00, Jia He wrote:
Hi Xiongfeng
It is a little bit awkful that I am also investigating acpi based cpu hotplug
issue silimar with
your idea. My question is your purpose to implement the vcpu hotplug in arm64
Hi Xiongfeng
It is a little bit awkful that I am also investigating acpi based cpu hotplug
issue silimar with
your idea. My question is your purpose to implement the vcpu hotplug in arm64
qemu?
Thanks for the ellaboration
---
Cheers,
Justin (Jia He)
On 2019/6/28 19:13, Xiongfeng Wang
(),
and leading to this similar solution form Jia He, so I would like to bring this
thread back, please see my detail test result below.
On 2018/9/7 22:44, Will Deacon wrote:
On Thu, Sep 06, 2018 at 01:24:22PM +0200, Ard Biesheuvel wrote:
On 22 August 2018 at 05:07, Jia He wrote:
Commit
1 - 100 of 626 matches
Mail list logo