Re: [PATCH v3 1/5] maple_tree: add mas_for_each_rev() helper

2024-10-15 Thread Suren Baghdasaryan
On Tue, Oct 15, 2024 at 6:48 PM 'Liam R. Howlett' via kernel-team wrote: > > * Suren Baghdasaryan [241014 16:36]: > > Add mas_for_each_rev() function to iterate maple tree nodes in reverse > > order. > > > > Suggested-by: Liam R. Howlett > > Signed-off-by: Suren Baghdasaryan > > I am now sure I

Re: [PATCH v3 1/5] maple_tree: add mas_for_each_rev() helper

2024-10-15 Thread Liam R. Howlett
* Suren Baghdasaryan [241014 16:36]: > Add mas_for_each_rev() function to iterate maple tree nodes in reverse > order. > > Suggested-by: Liam R. Howlett > Signed-off-by: Suren Baghdasaryan I am now sure I added a R-B in a reply to this :) > --- > include/linux/maple_tree.h | 14 +

Re: [PATCH RESEND v3 2/3] kasan: migrate copy_user_test to kunit

2024-10-15 Thread Andrey Konovalov
On Tue, Oct 15, 2024 at 12:52 PM Sabyrzhan Tasbolatov wrote: > > > Too bad. I guess we have to duplicate both kasan_check_write and > > check_object_size before both do_strncpy_from_user calls in > > strncpy_from_user. > > Shall we do it once in strncpy_from_user() as I did in v1? > Please let me

Re: [PATCH v3 2/5] alloc_tag: load module tags into separate contiguous memory

2024-10-15 Thread Suren Baghdasaryan
On Tue, Oct 15, 2024 at 2:08 PM Shakeel Butt wrote: > > On Mon, Oct 14, 2024 at 07:10:56PM GMT, Suren Baghdasaryan wrote: > > On Mon, Oct 14, 2024 at 4:51 PM Andrew Morton > > wrote: > > > > > > On Mon, 14 Oct 2024 13:36:43 -0700 Suren Baghdasaryan > > > wrote: > > > > > > > When a module gets

Re: [PATCH v3 2/5] alloc_tag: load module tags into separate contiguous memory

2024-10-15 Thread Shakeel Butt
On Mon, Oct 14, 2024 at 07:10:56PM GMT, Suren Baghdasaryan wrote: > On Mon, Oct 14, 2024 at 4:51 PM Andrew Morton > wrote: > > > > On Mon, 14 Oct 2024 13:36:43 -0700 Suren Baghdasaryan > > wrote: > > > > > When a module gets unloaded there is a possibility that some of the > > > allocations it

Re: [PATCH 2/7] KVM: x86: Implement Hyper-V's vCPU suspended state

2024-10-15 Thread Sean Christopherson
On Tue, Oct 15, 2024, Nikolas Wipper wrote: > On 15.10.24 17:58, Sean Christopherson wrote: > > ... > > > > And from a performance perspective, synchronizing on kvm->srcu is going to > > be > > susceptible to random slowdowns, because writers will have to wait until > > all vCPUs > > drop SRCU, e

[RFC PATCH 0/7] mm/damon: remove DAMON debugfs interface

2024-10-15 Thread SeongJae Park
DAMON debugfs interface was the only user interface of DAMON at the beginning[1]. However, it turned out the interface would be not good enough for long-term flexibility and stability. In Feb 2022[2], we therefore introduced DAMON sysfs interface as an alternative user interface that aims long-te

Re: [PATCH 2/7] KVM: x86: Implement Hyper-V's vCPU suspended state

2024-10-15 Thread Sean Christopherson
On Tue, Oct 15, 2024, Nicolas Saenz Julienne wrote: > Hi Sean, > > On Tue Oct 15, 2024 at 3:58 PM UTC, Sean Christopherson wrote: > > Before we spend too much time cleaning things up, I want to first settle on > > the > > overall design, because it's not clear to me that punting > > HvTranslateV

Re: [PATCH 2/7] KVM: x86: Implement Hyper-V's vCPU suspended state

2024-10-15 Thread Nikolas Wipper
On 15.10.24 17:58, Sean Christopherson wrote: > ... > > And from a performance perspective, synchronizing on kvm->srcu is going to be > susceptible to random slowdowns, because writers will have to wait until all > vCPUs > drop SRCU, even if they have nothing to do with PV TLB flushes. E.g. if vC

Re: [PATCH 2/7] KVM: x86: Implement Hyper-V's vCPU suspended state

2024-10-15 Thread Nicolas Saenz Julienne
Hi Sean, On Tue Oct 15, 2024 at 3:58 PM UTC, Sean Christopherson wrote: > Before we spend too much time cleaning things up, I want to first settle on > the > overall design, because it's not clear to me that punting > HvTranslateVirtualAddress > to userspace is a net positive. We agreed that VT

Re: [PATCH v5 4/5] KVM: selftests: Add test for PSCI SYSTEM_OFF2

2024-10-15 Thread Oliver Upton
On Tue, Oct 15, 2024 at 09:05:18AM -0700, Oliver Upton wrote: > On Sat, Oct 12, 2024 at 10:28:10AM +0100, David Woodhouse wrote: > > On Tue, 2024-10-01 at 08:33 -0700, Oliver Upton wrote: > > > On Thu, Sep 26, 2024 at 07:37:59PM +0100, David Woodhouse wrote: > > > > +   vm = setup_vm(guest_test

Re: [PATCH v3 0/5] page allocation tag compression

2024-10-15 Thread Suren Baghdasaryan
On Mon, Oct 14, 2024 at 6:48 PM Suren Baghdasaryan wrote: > > On Mon, Oct 14, 2024 at 4:32 PM Andrew Morton > wrote: > > > > On Mon, 14 Oct 2024 13:36:41 -0700 Suren Baghdasaryan > > wrote: > > > > > Patch #2 copies module tags into virtually contiguous memory which > > > serves two purposes:

Re: [PATCH v5 4/5] KVM: selftests: Add test for PSCI SYSTEM_OFF2

2024-10-15 Thread Oliver Upton
On Sat, Oct 12, 2024 at 10:28:10AM +0100, David Woodhouse wrote: > On Tue, 2024-10-01 at 08:33 -0700, Oliver Upton wrote: > > On Thu, Sep 26, 2024 at 07:37:59PM +0100, David Woodhouse wrote: > > > +   vm = setup_vm(guest_test_system_off2, &source, &target); > > > +   vcpu_get_reg(target, KV

Re: [PATCH v3 5/5] alloc_tag: config to store page allocation tag refs in page flags

2024-10-15 Thread Suren Baghdasaryan
On Tue, Oct 15, 2024 at 8:42 AM David Hildenbrand wrote: > > On 15.10.24 16:59, Suren Baghdasaryan wrote: > > On Tue, Oct 15, 2024 at 12:32 AM David Hildenbrand wrote: > >> > >> On 15.10.24 01:53, John Hubbard wrote: > >>> On 10/14/24 4:48 PM, Yosry Ahmed wrote: > On Mon, Oct 14, 2024 at 1:3

Re: [PATCH 2/7] KVM: x86: Implement Hyper-V's vCPU suspended state

2024-10-15 Thread Sean Christopherson
On Tue, Oct 15, 2024, Vitaly Kuznetsov wrote: > Nikolas Wipper writes: > > > On 10.10.24 10:57, Vitaly Kuznetsov wrote: > > ... > > >>> int kvm_hv_vcpu_flush_tlb(struct kvm_vcpu *vcpu); > >>> + > >>> +static inline bool kvm_hv_vcpu_suspended(struct kvm_vcpu *vcpu) > >>> +{ > >>> + return vcpu-

Re: [PATCH v3 5/5] alloc_tag: config to store page allocation tag refs in page flags

2024-10-15 Thread David Hildenbrand
On 15.10.24 16:59, Suren Baghdasaryan wrote: On Tue, Oct 15, 2024 at 12:32 AM David Hildenbrand wrote: On 15.10.24 01:53, John Hubbard wrote: On 10/14/24 4:48 PM, Yosry Ahmed wrote: On Mon, Oct 14, 2024 at 1:37 PM Suren Baghdasaryan wrote: Add CONFIG_PGALLOC_TAG_USE_PAGEFLAGS to store all

Re: [PATCH v2 4/7] s390/physmem_info: query diag500(STORAGE LIMIT) to support QEMU/KVM memory devices

2024-10-15 Thread Heiko Carstens
On Tue, Oct 15, 2024 at 11:01:44AM -0400, Eric Farman wrote: > On Mon, 2024-10-14 at 20:43 +0200, Heiko Carstens wrote: > > On Mon, Oct 14, 2024 at 04:46:16PM +0200, David Hildenbrand wrote: ... > > +#define DIAG500_SC_STOR_LIMIT 4 ... > I like the idea of a defined constant here instead of hardcod

Re: [PATCH v3 5/5] alloc_tag: config to store page allocation tag refs in page flags

2024-10-15 Thread Suren Baghdasaryan
On Tue, Oct 15, 2024 at 1:10 AM Yosry Ahmed wrote: > > On Mon, Oct 14, 2024 at 6:58 PM Suren Baghdasaryan wrote: > > > > On Mon, Oct 14, 2024 at 5:03 PM 'John Hubbard' via kernel-team > > wrote: > > > > > > On 10/14/24 4:56 PM, Yosry Ahmed wrote: > > > > On Mon, Oct 14, 2024 at 4:53 PM John Hubb

Re: [PATCH v2 4/7] s390/physmem_info: query diag500(STORAGE LIMIT) to support QEMU/KVM memory devices

2024-10-15 Thread Eric Farman
On Mon, 2024-10-14 at 20:43 +0200, Heiko Carstens wrote: > On Mon, Oct 14, 2024 at 04:46:16PM +0200, David Hildenbrand wrote: > > To support memory devices under QEMU/KVM, such as virtio-mem, > > we have to prepare our kernel virtual address space accordingly and > > have to know the highest possib

Re: [PATCH v3 5/5] alloc_tag: config to store page allocation tag refs in page flags

2024-10-15 Thread Suren Baghdasaryan
On Tue, Oct 15, 2024 at 12:32 AM David Hildenbrand wrote: > > On 15.10.24 01:53, John Hubbard wrote: > > On 10/14/24 4:48 PM, Yosry Ahmed wrote: > >> On Mon, Oct 14, 2024 at 1:37 PM Suren Baghdasaryan > >> wrote: > >>> > >>> Add CONFIG_PGALLOC_TAG_USE_PAGEFLAGS to store allocation tag > >>> refe

Re: [PATCH v3 3/5] alloc_tag: populate memory for module tags as needed

2024-10-15 Thread Suren Baghdasaryan
On Tue, Oct 15, 2024 at 5:19 AM 'Mike Rapoport' via kernel-team wrote: > > On Mon, Oct 14, 2024 at 01:36:44PM -0700, Suren Baghdasaryan wrote: > > The memory reserved for module tags does not need to be backed by > > physical pages until there are tags to store there. Change the way > > we reserve

Re: [PATCH] docs/dev-tools: fix a typo

2024-10-15 Thread Marco Elver
On Tue, 15 Oct 2024 at 16:11, Dongliang Mu wrote: > > On Tue, Oct 15, 2024 at 10:09 PM Haoyang Liu > wrote: > > > > fix a typo in dev-tools/kmsan.rst > > > > Signed-off-by: Haoyang Liu > > --- > > Documentation/dev-tools/kmsan.rst | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > >

Re: [PATCH] docs/dev-tools: fix a typo

2024-10-15 Thread Dongliang Mu
On Tue, Oct 15, 2024 at 10:09 PM Haoyang Liu wrote: > > fix a typo in dev-tools/kmsan.rst > > Signed-off-by: Haoyang Liu > --- > Documentation/dev-tools/kmsan.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/dev-tools/kmsan.rst > b/Documentation/dev-too

[PATCH] docs/dev-tools: fix a typo

2024-10-15 Thread Haoyang Liu
fix a typo in dev-tools/kmsan.rst Signed-off-by: Haoyang Liu --- Documentation/dev-tools/kmsan.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/dev-tools/kmsan.rst b/Documentation/dev-tools/kmsan.rst index 6a48d96c5c85..0dc668b183f6 100644 --- a/Documentatio

Re: [RFC PATCH v3 4/4] sched+mm: Use hazard pointers to track lazy active mm existence

2024-10-15 Thread Mathieu Desnoyers
On 2024-10-14 04:27, kernel test robot wrote: Hello, kernel test robot noticed "WARNING:at_kernel/hazptr.c:#hazptr_scan" on: commit: c1508707268498a6fd3ca5853ad65f9482c12374 ("[RFC PATCH v3 4/4] sched+mm: Use hazard pointers to track lazy active mm existence") url: https://github.com/intel-

Re: [PATCH v13 11/40] arm64/gcs: Provide basic EL2 setup to allow GCS usage at EL0 and EL1

2024-10-15 Thread Catalin Marinas
On Thu, Oct 10, 2024 at 04:18:13PM +0100, Marc Zyngier wrote: > From 20c98d2647c11db1e40768f92c5998ff5d764a3a Mon Sep 17 00:00:00 2001 > From: Marc Zyngier > Date: Thu, 10 Oct 2024 16:13:26 +0100 > Subject: [PATCH] KVM: arm64: Shave a few bytes from the EL2 idmap code > > Our idmap is becoming to

Re: [PATCH v3 3/5] alloc_tag: populate memory for module tags as needed

2024-10-15 Thread Mike Rapoport
On Mon, Oct 14, 2024 at 01:36:44PM -0700, Suren Baghdasaryan wrote: > The memory reserved for module tags does not need to be backed by > physical pages until there are tags to store there. Change the way > we reserve this memory to allocate only virtual area for the tags > and populate it with phy

Re: [PATCH RESEND v3 2/3] kasan: migrate copy_user_test to kunit

2024-10-15 Thread Sabyrzhan Tasbolatov
On Tue, Oct 15, 2024 at 6:18 AM Andrey Konovalov wrote: > > On Tue, Oct 15, 2024 at 1:10 AM Andrew Morton > wrote: > > > > On Mon, 14 Oct 2024 07:57:00 +0500 Sabyrzhan Tasbolatov > > wrote: > > > > > Migrate the copy_user_test to the KUnit framework to verify out-of-bound > > > detection via K

Re: [PATCH v2 1/7] s390/kdump: implement is_kdump_kernel()

2024-10-15 Thread David Hildenbrand
On 15.10.24 12:08, Heiko Carstens wrote: On Tue, Oct 15, 2024 at 10:41:21AM +0200, David Hildenbrand wrote: On 15.10.24 10:30, Heiko Carstens wrote: On Mon, Oct 14, 2024 at 09:26:03PM +0200, David Hildenbrand wrote: On 14.10.24 20:20, Heiko Carstens wrote: Looks like this could work. But the

Re: [PATCH v2 1/7] s390/kdump: implement is_kdump_kernel()

2024-10-15 Thread Heiko Carstens
On Tue, Oct 15, 2024 at 10:41:21AM +0200, David Hildenbrand wrote: > On 15.10.24 10:30, Heiko Carstens wrote: > > On Mon, Oct 14, 2024 at 09:26:03PM +0200, David Hildenbrand wrote: > > > On 14.10.24 20:20, Heiko Carstens wrote: > > > > Looks like this could work. But the comment in smp.c above > >

Re: [PATCH v2 1/7] s390/kdump: implement is_kdump_kernel()

2024-10-15 Thread David Hildenbrand
On 15.10.24 10:53, David Hildenbrand wrote: On 15.10.24 10:41, David Hildenbrand wrote: On 15.10.24 10:30, Heiko Carstens wrote: On Mon, Oct 14, 2024 at 09:26:03PM +0200, David Hildenbrand wrote: On 14.10.24 20:20, Heiko Carstens wrote: Looks like this could work. But the comment in smp.c abo

Re: [PATCH v2 1/7] s390/kdump: implement is_kdump_kernel()

2024-10-15 Thread David Hildenbrand
On 15.10.24 10:41, David Hildenbrand wrote: On 15.10.24 10:30, Heiko Carstens wrote: On Mon, Oct 14, 2024 at 09:26:03PM +0200, David Hildenbrand wrote: On 14.10.24 20:20, Heiko Carstens wrote: Looks like this could work. But the comment in smp.c above dump_available() needs to be updated. A

Re: [PATCH v2 2/7] Documentation: s390-diag.rst: make diag500 a generic KVM hypercall

2024-10-15 Thread David Hildenbrand
On 15.10.24 10:46, Heiko Carstens wrote: On Tue, Oct 15, 2024 at 10:32:43AM +0200, David Hildenbrand wrote: On 15.10.24 10:21, Heiko Carstens wrote: On Tue, Oct 15, 2024 at 10:16:20AM +0200, David Hildenbrand wrote: On 15.10.24 10:12, Heiko Carstens wrote: On Mon, Oct 14, 2024 at 09:35:27PM +

Re: [PATCH v2 2/7] Documentation: s390-diag.rst: make diag500 a generic KVM hypercall

2024-10-15 Thread Heiko Carstens
On Tue, Oct 15, 2024 at 10:32:43AM +0200, David Hildenbrand wrote: > On 15.10.24 10:21, Heiko Carstens wrote: > > On Tue, Oct 15, 2024 at 10:16:20AM +0200, David Hildenbrand wrote: > > > On 15.10.24 10:12, Heiko Carstens wrote: > > > > On Mon, Oct 14, 2024 at 09:35:27PM +0200, David Hildenbrand wro

Re: [PATCH v2 1/7] s390/kdump: implement is_kdump_kernel()

2024-10-15 Thread David Hildenbrand
On 15.10.24 10:30, Heiko Carstens wrote: On Mon, Oct 14, 2024 at 09:26:03PM +0200, David Hildenbrand wrote: On 14.10.24 20:20, Heiko Carstens wrote: Looks like this could work. But the comment in smp.c above dump_available() needs to be updated. A right, I remember that there was some outdate

Re: [PATCH v2 5/7] virtio-mem: s390 support

2024-10-15 Thread Heiko Carstens
On Mon, Oct 14, 2024 at 09:16:45PM +0200, David Hildenbrand wrote: > On 14.10.24 20:48, Heiko Carstens wrote: > > On Mon, Oct 14, 2024 at 04:46:17PM +0200, David Hildenbrand wrote: > > > to dump. Based on this, support for dumping virtio-mem memory can be > > Hm.. who will add this support? This lo

Re: [PATCH v2 2/7] Documentation: s390-diag.rst: make diag500 a generic KVM hypercall

2024-10-15 Thread David Hildenbrand
On 15.10.24 10:21, Heiko Carstens wrote: On Tue, Oct 15, 2024 at 10:16:20AM +0200, David Hildenbrand wrote: On 15.10.24 10:12, Heiko Carstens wrote: On Mon, Oct 14, 2024 at 09:35:27PM +0200, David Hildenbrand wrote: On 14.10.24 20:04, Heiko Carstens wrote: "If only there would be a query subc

Re: [PATCH v2 1/7] s390/kdump: implement is_kdump_kernel()

2024-10-15 Thread Heiko Carstens
On Mon, Oct 14, 2024 at 09:26:03PM +0200, David Hildenbrand wrote: > On 14.10.24 20:20, Heiko Carstens wrote: > > Looks like this could work. But the comment in smp.c above > > dump_available() needs to be updated. > > A right, I remember that there was some outdated documentation. > > > > > Are

Re: [PATCH v2 2/7] Documentation: s390-diag.rst: make diag500 a generic KVM hypercall

2024-10-15 Thread Heiko Carstens
On Tue, Oct 15, 2024 at 10:16:20AM +0200, David Hildenbrand wrote: > On 15.10.24 10:12, Heiko Carstens wrote: > > On Mon, Oct 14, 2024 at 09:35:27PM +0200, David Hildenbrand wrote: > > > On 14.10.24 20:04, Heiko Carstens wrote: > > "If only there would be a query subcode available, so that the prog

Re: [PATCH 2/7] KVM: x86: Implement Hyper-V's vCPU suspended state

2024-10-15 Thread Vitaly Kuznetsov
Nikolas Wipper writes: > On 10.10.24 10:57, Vitaly Kuznetsov wrote: ... >>> int kvm_hv_vcpu_flush_tlb(struct kvm_vcpu *vcpu); >>> + >>> +static inline bool kvm_hv_vcpu_suspended(struct kvm_vcpu *vcpu) >>> +{ >>> + return vcpu->arch.hyperv_enabled && >>> + READ_ONCE(vcpu->arch.hyperv

Re: [PATCH v2 2/7] Documentation: s390-diag.rst: make diag500 a generic KVM hypercall

2024-10-15 Thread David Hildenbrand
On 15.10.24 10:12, Heiko Carstens wrote: On Mon, Oct 14, 2024 at 09:35:27PM +0200, David Hildenbrand wrote: On 14.10.24 20:04, Heiko Carstens wrote: On Mon, Oct 14, 2024 at 04:46:14PM +0200, David Hildenbrand wrote: If so, it would be nice to document that too; but that is not necessarily your

Re: [PATCH v2 2/7] Documentation: s390-diag.rst: make diag500 a generic KVM hypercall

2024-10-15 Thread Heiko Carstens
On Mon, Oct 14, 2024 at 09:35:27PM +0200, David Hildenbrand wrote: > On 14.10.24 20:04, Heiko Carstens wrote: > > On Mon, Oct 14, 2024 at 04:46:14PM +0200, David Hildenbrand wrote: > > If so, it would be nice to document that too; but that is not > > necessarily your problem. > > I can squash: >

Re: [PATCH v3 5/5] alloc_tag: config to store page allocation tag refs in page flags

2024-10-15 Thread Yosry Ahmed
On Mon, Oct 14, 2024 at 6:58 PM Suren Baghdasaryan wrote: > > On Mon, Oct 14, 2024 at 5:03 PM 'John Hubbard' via kernel-team > wrote: > > > > On 10/14/24 4:56 PM, Yosry Ahmed wrote: > > > On Mon, Oct 14, 2024 at 4:53 PM John Hubbard wrote: > > >> > > >> On 10/14/24 4:48 PM, Yosry Ahmed wrote: >

Re: [PATCH v2 0/7] virtio-mem: s390 support

2024-10-15 Thread Claudio Imbrenda
On Mon, 14 Oct 2024 20:56:59 +0200 Heiko Carstens wrote: > On Mon, Oct 14, 2024 at 04:46:12PM +0200, David Hildenbrand wrote: > > Let's finally add s390 support for virtio-mem; my last RFC was sent > > 4 years ago, and a lot changed in the meantime. > > > > The latest QEMU series is available at

Re: [PATCH v3 5/5] alloc_tag: config to store page allocation tag refs in page flags

2024-10-15 Thread David Hildenbrand
On 15.10.24 01:53, John Hubbard wrote: On 10/14/24 4:48 PM, Yosry Ahmed wrote: On Mon, Oct 14, 2024 at 1:37 PM Suren Baghdasaryan wrote: Add CONFIG_PGALLOC_TAG_USE_PAGEFLAGS to store allocation tag references directly in the page flags. This eliminates memory overhead caused by page_ext and r