Re: [PATCH 0/4] Invalidate secondary IOMMU TLB on permission upgrade

2023-07-18 Thread Alistair Popple
"Tian, Kevin" writes: >> From: Anshuman Khandual >> Sent: Wednesday, July 19, 2023 11:04 AM >> >> On 7/18/23 13:26, Alistair Popple wrote: >> > The main change is to move secondary TLB invalidation mmu notifier >> > callbacks into the architecture specific TLB flushing functions. This >> >

Re: [PATCH v3 04/13] powerpc: assert_pte_locked() use pte_offset_map_nolock()

2023-07-18 Thread Aneesh Kumar K V
On 7/19/23 10:34 AM, Hugh Dickins wrote: > On Tue, 18 Jul 2023, Aneesh Kumar K.V wrote: >> Hugh Dickins writes: >> >>> Instead of pte_lockptr(), use the recently added pte_offset_map_nolock() >>> in assert_pte_locked(). BUG if pte_offset_map_nolock() fails: this is >>> stricter than the previous

Re: [PATCH v3 04/13] powerpc: assert_pte_locked() use pte_offset_map_nolock()

2023-07-18 Thread Hugh Dickins
On Tue, 18 Jul 2023, Aneesh Kumar K.V wrote: > Hugh Dickins writes: > > > Instead of pte_lockptr(), use the recently added pte_offset_map_nolock() > > in assert_pte_locked(). BUG if pte_offset_map_nolock() fails: this is > > stricter than the previous implementation, which skipped when

Re: [PATCH v2 2/2] PCI: layerscape: Add the workaround for lost link capablities during reset

2023-07-18 Thread Manivannan Sadhasivam
On Tue, Jul 18, 2023 at 02:21:42PM -0400, Frank Li wrote: > From: Xiaowei Bao > > A workaround for the issue where the PCI Express Endpoint (EP) controller > loses the values of the Maximum Link Width and Supported Link Speed from > the Link Capabilities Register, which initially configured by

RE: [PATCH 0/4] Invalidate secondary IOMMU TLB on permission upgrade

2023-07-18 Thread Tian, Kevin
> From: Anshuman Khandual > Sent: Wednesday, July 19, 2023 11:04 AM > > On 7/18/23 13:26, Alistair Popple wrote: > > The main change is to move secondary TLB invalidation mmu notifier > > callbacks into the architecture specific TLB flushing functions. This > > makes secondary TLB invalidation

Re: [PATCH 0/4] Invalidate secondary IOMMU TLB on permission upgrade

2023-07-18 Thread Anshuman Khandual
On 7/18/23 13:26, Alistair Popple wrote: > The main change is to move secondary TLB invalidation mmu notifier > callbacks into the architecture specific TLB flushing functions. This > makes secondary TLB invalidation mostly match CPU invalidation while > still allowing efficient range based

Re: [RFC PATCH v11 11/29] security: Export security_inode_init_security_anon() for use by KVM

2023-07-18 Thread Paul Moore
On Tue, Jul 18, 2023 at 7:48 PM Sean Christopherson wrote: > > Signed-off-by: Sean Christopherson > --- > security/security.c | 1 + > 1 file changed, 1 insertion(+) Acked-by: Paul Moore > diff --git a/security/security.c b/security/security.c > index b720424ca37d..7fc78f0f3622 100644 > ---

Re: [PATCH 1/4] mm_notifiers: Rename invalidate_range notifier

2023-07-18 Thread Alistair Popple
Andrew Morton writes: > On Tue, 18 Jul 2023 14:57:12 -0300 Jason Gunthorpe wrote: > >> On Tue, Jul 18, 2023 at 05:56:15PM +1000, Alistair Popple wrote: >> > diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h >> > index b466172..48c81b9 100644 >> > ---

[RFC PATCH v11 29/29] KVM: selftests: Test KVM exit behavior for private memory/access

2023-07-18 Thread Sean Christopherson
From: Ackerley Tng "Testing private access when memslot gets deleted" tests the behavior of KVM when a private memslot gets deleted while the VM is using the private memslot. When KVM looks up the deleted (slot = NULL) memslot, KVM should exit to userspace with KVM_EXIT_MEMORY_FAULT. In the

[RFC PATCH v11 28/29] KVM: selftests: Add basic selftest for guest_memfd()

2023-07-18 Thread Sean Christopherson
Add a selftest to verify the basic functionality of guest_memfd(): + file descriptor created with the guest_memfd() ioctl does not allow read/write/mmap operations + file size and block size as returned from fstat are as expected + fallocate on the fd checks that offset/length on

[RFC PATCH v11 27/29] KVM: selftests: Expand set_memory_region_test to validate guest_memfd()

2023-07-18 Thread Sean Christopherson
From: Chao Peng Expand set_memory_region_test to exercise various positive and negative testcases for private memory. - Non-guest_memfd() file descriptor for private memory - guest_memfd() from different VM - Overlapping bindings - Unaligned bindings Signed-off-by: Chao Peng

[RFC PATCH v11 26/29] KVM: selftests: Add KVM_SET_USER_MEMORY_REGION2 helper

2023-07-18 Thread Sean Christopherson
From: Chao Peng Provide a raw version as well as an assert-success version to reduce the amount of boilerplate code need for basic usage. Signed-off-by: Chao Peng Signed-off-by: Ackerley Tng --- .../selftests/kvm/include/kvm_util_base.h | 7 +

[RFC PATCH v11 25/29] KVM: selftests: Add x86-only selftest for private memory conversions

2023-07-18 Thread Sean Christopherson
From: Vishal Annapurve Add a selftest to exercise implicit/explicit conversion functionality within KVM and verify: - Shared memory is visible to host userspace - Private memory is not visible to host userspace - Host userspace and guest can communicate over shared memory - Data in shared

[RFC PATCH v11 24/29] KVM: selftests: Add GUEST_SYNC[1-6] macros for synchronizing more data

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- tools/testing/selftests/kvm/include/ucall_common.h | 12 1 file changed, 12 insertions(+) diff --git a/tools/testing/selftests/kvm/include/ucall_common.h b/tools/testing/selftests/kvm/include/ucall_common.h index 1a6aaef5ccae..8087c877fd58

[RFC PATCH v11 23/29] KVM: selftests: Introduce VM "shape" to allow tests to specify the VM type

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- tools/testing/selftests/kvm/dirty_log_test.c | 2 +- .../selftests/kvm/include/kvm_util_base.h | 54 +++ .../selftests/kvm/kvm_page_table_test.c | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c| 43 +++

[RFC PATCH v11 22/29] KVM: selftests: Add helpers to do KVM_HC_MAP_GPA_RANGE hypercalls (x86)

2023-07-18 Thread Sean Christopherson
From: Vishal Annapurve Signed-off-by: Vishal Annapurve [sean: drop shared/private helpers (let tests specify flags)] Signed-off-by: Sean Christopherson --- .../selftests/kvm/include/x86_64/processor.h | 15 +++ 1 file changed, 15 insertions(+) diff --git

[RFC PATCH v11 21/29] KVM: selftests: Add helpers to convert guest memory b/w private and shared

2023-07-18 Thread Sean Christopherson
From: Vishal Annapurve Signed-off-by: Vishal Annapurve Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson --- .../selftests/kvm/include/kvm_util_base.h | 48 +++ tools/testing/selftests/kvm/lib/kvm_util.c| 26 ++ 2 files changed, 74

[RFC PATCH v11 20/29] KVM: selftests: Add support for creating private memslots

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- .../selftests/kvm/include/kvm_util_base.h | 16 .../testing/selftests/kvm/include/test_util.h | 5 ++ tools/testing/selftests/kvm/lib/kvm_util.c| 85 --- 3 files changed, 75 insertions(+), 31 deletions(-) diff --git

[RFC PATCH v11 19/29] KVM: selftests: Convert lib's mem regions to KVM_SET_USER_MEMORY_REGION2

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- .../selftests/kvm/include/kvm_util_base.h | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 18 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/testing/selftests/kvm/include/kvm_util_base.h

[RFC PATCH v11 18/29] KVM: selftests: Drop unused kvm_userspace_memory_region_find() helper

2023-07-18 Thread Sean Christopherson
Drop kvm_userspace_memory_region_find(), it's unused and a terrible API (probably why it's unused). If anything outside of kvm_util.c needs to get at the memslot, userspace_mem_region_find() can be exposed to give others full access to all memory region/slot information. Signed-off-by: Sean

[RFC PATCH v11 17/29] KVM: x86: Add support for "protected VMs" that can utilize private memory

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- Documentation/virt/kvm/api.rst | 32 arch/x86/include/asm/kvm_host.h | 15 +-- arch/x86/include/uapi/asm/kvm.h | 3 +++ arch/x86/kvm/Kconfig| 12 arch/x86/kvm/mmu/mmu_internal.h | 1 +

[RFC PATCH v11 16/29] KVM: Allow arch code to track number of memslot address spaces per VM

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- arch/powerpc/kvm/book3s_hv.c| 2 +- arch/x86/include/asm/kvm_host.h | 8 +++- arch/x86/kvm/debugfs.c | 2 +- arch/x86/kvm/mmu/mmu.c | 8 arch/x86/kvm/mmu/tdp_mmu.c | 2 +- arch/x86/kvm/x86.c | 2 +-

[RFC PATCH v11 15/29] KVM: Drop superfluous __KVM_VCPU_MULTIPLE_ADDRESS_SPACE macro

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- arch/x86/include/asm/kvm_host.h | 1 - include/linux/kvm_host.h| 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index b87ff7b601fa..7a905e033932 100644 ---

[RFC PATCH v11 10/29] mm: Add AS_UNMOVABLE to mark mapping as completely unmovable

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- include/linux/pagemap.h | 11 +++ mm/compaction.c | 4 mm/migrate.c| 2 ++ 3 files changed, 17 insertions(+) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 716953ee1ebd..931d2f1da7d5 100644 ---

[RFC PATCH v11 14/29] KVM: x86/mmu: Handle page fault for private memory

2023-07-18 Thread Sean Christopherson
From: Chao Peng A KVM_MEM_PRIVATE memslot can include both fd-based private memory and hva-based shared memory. Architecture code (like TDX code) can tell whether the on-going fault is private or not. This patch adds a 'is_private' field to kvm_page_fault to indicate this and architecture code

[RFC PATCH v11 13/29] KVM: Add transparent hugepage support for dedicated guest memory

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- include/uapi/linux/kvm.h | 2 ++ virt/kvm/guest_mem.c | 52 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 9b344fc98598..17b12ee8b70e

[RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-07-18 Thread Sean Christopherson
TODO Cc: Fuad Tabba Cc: Vishal Annapurve Cc: Ackerley Tng Cc: Jarkko Sakkinen Cc: Maciej Szmigiero Cc: Vlastimil Babka Cc: David Hildenbrand Cc: Quentin Perret Cc: Michael Roth Cc: Wang Cc: Liam Merwick Cc: Isaku Yamahata Co-developed-by: Kirill A. Shutemov Signed-off-by: Kirill A.

[RFC PATCH v11 11/29] security: Export security_inode_init_security_anon() for use by KVM

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- security/security.c | 1 + 1 file changed, 1 insertion(+) diff --git a/security/security.c b/security/security.c index b720424ca37d..7fc78f0f3622 100644 --- a/security/security.c +++ b/security/security.c @@ -1654,6 +1654,7 @@ int

[RFC PATCH v11 09/29] KVM: x86: Disallow hugepages when memory attributes are mixed

2023-07-18 Thread Sean Christopherson
From: Chao Peng Disallow creating hugepages with mixed memory attributes, e.g. shared versus private, as mapping a hugepage in this case would allow the guest to access memory with the wrong attributes, e.g. overlaying private memory with a shared hugepage. Tracking whether or not attributes

[RFC PATCH v11 08/29] KVM: Introduce per-page memory attributes

2023-07-18 Thread Sean Christopherson
From: Chao Peng In confidential computing usages, whether a page is private or shared is necessary information for KVM to perform operations like page fault handling, page zapping etc. There are other potential use cases for per-page memory attributes, e.g. to make memory read-only (or no-exec,

[RFC PATCH v11 07/29] KVM: Add KVM_EXIT_MEMORY_FAULT exit

2023-07-18 Thread Sean Christopherson
From: Chao Peng This new KVM exit allows userspace to handle memory-related errors. It indicates an error happens in KVM at guest memory range [gpa, gpa+size). The flags includes additional information for userspace to handle the error. Currently bit 0 is defined as 'private memory' where '1'

[RFC PATCH v11 06/29] KVM: Introduce KVM_SET_USER_MEMORY_REGION2

2023-07-18 Thread Sean Christopherson
Cc: Jarkko Sakkinen Signed-off-by: Sean Christopherson --- arch/x86/kvm/x86.c | 2 +- include/linux/kvm_host.h | 4 ++-- include/uapi/linux/kvm.h | 13 + virt/kvm/kvm_main.c | 38 ++ 4 files changed, 46 insertions(+), 11 deletions(-)

[RFC PATCH v11 05/29] KVM: Convert KVM_ARCH_WANT_MMU_NOTIFIER to CONFIG_KVM_GENERIC_MMU_NOTIFIER

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- arch/arm64/include/asm/kvm_host.h | 2 -- arch/arm64/kvm/Kconfig | 2 +- arch/mips/include/asm/kvm_host.h| 2 -- arch/mips/kvm/Kconfig | 2 +- arch/powerpc/include/asm/kvm_host.h | 2 -- arch/powerpc/kvm/Kconfig

[RFC PATCH v11 04/29] KVM: PPC: Drop dead code related to KVM_ARCH_WANT_MMU_NOTIFIER

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- arch/powerpc/kvm/powerpc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 7197c8256668..5cf9e5e3112a 100644 --- a/arch/powerpc/kvm/powerpc.c +++

[RFC PATCH v11 03/29] KVM: Use gfn instead of hva for mmu_notifier_retry

2023-07-18 Thread Sean Christopherson
From: Chao Peng Currently in mmu_notifier invalidate path, hva range is recorded and then checked against by mmu_notifier_retry_hva() in the page fault handling path. However, for the to be introduced private memory, a page fault may not have a hva associated, checking gfn(gpa) makes more sense.

[RFC PATCH v11 02/29] KVM: Tweak kvm_hva_range and hva_handler_t to allow reusing for gfn ranges

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- virt/kvm/kvm_main.c | 34 +++--- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index d58b7a506d27..50aea855eeae 100644 --- a/virt/kvm/kvm_main.c +++

[RFC PATCH v11 01/29] KVM: Wrap kvm_gfn_range.pte in a per-action union

2023-07-18 Thread Sean Christopherson
Signed-off-by: Sean Christopherson --- arch/arm64/kvm/mmu.c | 2 +- arch/mips/kvm/mmu.c| 2 +- arch/riscv/kvm/mmu.c | 2 +- arch/x86/kvm/mmu/mmu.c | 2 +- arch/x86/kvm/mmu/tdp_mmu.c | 6 +++--- include/linux/kvm_host.h | 5 - virt/kvm/kvm_main.c| 16

[RFC PATCH v11 00/29] KVM: guest_memfd() and per-page attributes

2023-07-18 Thread Sean Christopherson
This is the next iteration of implementing fd-based (instead of vma-based) memory for KVM guests. If you want the full background of why we are doing this, please go read the v10 cover letter[1]. The biggest change from v10 is to implement the backing storage in KVM itself, and expose it via a

Re: [RFC PATCH 01/21] crypto: scomp - Revert "add support for deflate rfc1950 (zlib)"

2023-07-18 Thread Ard Biesheuvel
On Wed, 19 Jul 2023 at 00:54, Eric Biggers wrote: > > On Tue, Jul 18, 2023 at 03:32:39PM -0700, Eric Biggers wrote: > > On Tue, Jul 18, 2023 at 02:58:27PM +0200, Ard Biesheuvel wrote: > > > This reverts commit a368f43d6e3a001e684e9191a27df384fbff12f5. > > > > > > "zlib-deflate" was introduced 6

Re: [RFC PATCH 01/21] crypto: scomp - Revert "add support for deflate rfc1950 (zlib)"

2023-07-18 Thread Eric Biggers
On Tue, Jul 18, 2023 at 03:32:39PM -0700, Eric Biggers wrote: > On Tue, Jul 18, 2023 at 02:58:27PM +0200, Ard Biesheuvel wrote: > > This reverts commit a368f43d6e3a001e684e9191a27df384fbff12f5. > > > > "zlib-deflate" was introduced 6 years ago, but it does not have any > > users. So let's remove

Re: [RFC PATCH 05/21] ubifs: Pass worst-case buffer size to compression routines

2023-07-18 Thread Eric Biggers
On Tue, Jul 18, 2023 at 02:58:31PM +0200, Ard Biesheuvel wrote: > Currently, the ubifs code allocates a worst case buffer size to > recompress a data node, but does not pass the size of that buffer to the > compression code. This means that the compression code will never use > the additional

Re: [RFC PATCH 01/21] crypto: scomp - Revert "add support for deflate rfc1950 (zlib)"

2023-07-18 Thread Eric Biggers
On Tue, Jul 18, 2023 at 02:58:27PM +0200, Ard Biesheuvel wrote: > This reverts commit a368f43d6e3a001e684e9191a27df384fbff12f5. > > "zlib-deflate" was introduced 6 years ago, but it does not have any > users. So let's remove the generic implementation and the test vectors, > but retain the

Re: [PATCH 0/2] eventfd: simplify signal helpers

2023-07-18 Thread Jason Gunthorpe
On Mon, Jul 17, 2023 at 04:52:03PM -0600, Alex Williamson wrote: > On Mon, 17 Jul 2023 19:12:16 -0300 > Jason Gunthorpe wrote: > > > On Mon, Jul 17, 2023 at 01:08:31PM -0600, Alex Williamson wrote: > > > > > What would that mechanism be? We've been iterating on getting the > > > serialization

Re: [PATCH 1/4] mm_notifiers: Rename invalidate_range notifier

2023-07-18 Thread Andrew Morton
On Tue, 18 Jul 2023 14:57:12 -0300 Jason Gunthorpe wrote: > On Tue, Jul 18, 2023 at 05:56:15PM +1000, Alistair Popple wrote: > > diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h > > index b466172..48c81b9 100644 > > --- a/include/asm-generic/tlb.h > > +++

Re: [PATCH 3/4] mmu_notifiers: Call arch_invalidate_secondary_tlbs() when invalidating TLBs

2023-07-18 Thread Jason Gunthorpe
On Tue, Jul 18, 2023 at 11:17:59AM -0700, Andrew Morton wrote: > On Tue, 18 Jul 2023 17:56:17 +1000 Alistair Popple wrote: > > > The arch_invalidate_secondary_tlbs() is an architecture specific mmu > > notifier used to keep the TLB of secondary MMUs such as an IOMMU in > > sync with the CPU page

[PATCH v2 2/2] PCI: layerscape: Add the workaround for lost link capablities during reset

2023-07-18 Thread Frank Li
From: Xiaowei Bao A workaround for the issue where the PCI Express Endpoint (EP) controller loses the values of the Maximum Link Width and Supported Link Speed from the Link Capabilities Register, which initially configured by the Reset Configuration Word (RCW) during a link-down or hot reset

[PATCH v2 1/2] PCI: layerscape: Add support for Link down notification

2023-07-18 Thread Frank Li
Add support to pass Link down notification to Endpoint function driver so that the LINK_DOWN event can be processed by the function. Acked-by: Manivannan Sadhasivam Signed-off-by: Frank Li --- Change from v1 to v2 - move pci_epc_linkdown() after dev_dbg()

Re: [PATCH 3/4] mmu_notifiers: Call arch_invalidate_secondary_tlbs() when invalidating TLBs

2023-07-18 Thread Andrew Morton
On Tue, 18 Jul 2023 17:56:17 +1000 Alistair Popple wrote: > The arch_invalidate_secondary_tlbs() is an architecture specific mmu > notifier used to keep the TLB of secondary MMUs such as an IOMMU in > sync with the CPU page tables. Currently it is called from separate > code paths to the main

Re: [PATCH 1/4] mm_notifiers: Rename invalidate_range notifier

2023-07-18 Thread Jason Gunthorpe
On Tue, Jul 18, 2023 at 05:56:15PM +1000, Alistair Popple wrote: > diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h > index b466172..48c81b9 100644 > --- a/include/asm-generic/tlb.h > +++ b/include/asm-generic/tlb.h > @@ -456,7 +456,7 @@ static inline void

Re: linux-next: Tree for Jul 13 (drivers/video/fbdev/ps3fb.c)

2023-07-18 Thread Randy Dunlap
On 7/18/23 04:48, Michael Ellerman wrote: > Bagas Sanjaya writes: >> On Thu, Jul 13, 2023 at 09:11:10AM -0700, Randy Dunlap wrote: >>> on ppc64: >>> >>> In file included from ../include/linux/device.h:15, >>> from ../arch/powerpc/include/asm/io.h:22, >>> from

Re: [PATCH 07/12] arch/x86: Declare edid_info in

2023-07-18 Thread Arnd Bergmann
On Wed, Jul 5, 2023, at 10:18, Thomas Zimmermann wrote: > Am 30.06.23 um 13:53 schrieb Arnd Bergmann: >> On Fri, Jun 30, 2023, at 09:46, Thomas Zimmermann wrote: >>> Am 29.06.23 um 15:21 schrieb Arnd Bergmann: >> >> I definitely get it for the screen_info, which needs the complexity. >> For

[PATCH v2] powerpc: Explicitly include correct DT includes

2023-07-18 Thread Rob Herring
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result,

[PATCH v2] dmaengine: Explicitly include correct DT includes

2023-07-18 Thread Rob Herring
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result,

[PATCH v2] misc: Explicitly include correct DT includes

2023-07-18 Thread Rob Herring
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result,

[PATCH v2] usb: Explicitly include correct DT includes

2023-07-18 Thread Rob Herring
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result,

Re: [PATCH] powerpc/build: vdso linker warning for orphan sections

2023-07-18 Thread John Ogness
On 2023-07-18, Michael Ellerman wrote: >> ld: warning: discarding dynamic section .rela.opd >> >> and bisects to: >> >> 8ad57add77d3 ("powerpc/build: vdso linker warning for orphan sections") > > Can you test with a newer compiler/binutils? Testing the Debian release cross compilers/binutils:

Re: [PATCH] platforms: 52xx: Remove space after '(' and before ')'

2023-07-18 Thread Andy Shevchenko
On Tue, Jul 18, 2023 at 05:02:39PM +0800, hanyu...@208suo.com wrote: > The patch fixes the following errors detected by checkpatch: > > platforms/52xx/mpc52xx_pci.c:346:ERROR: space prohibited after that open > parenthesis '(' > platforms/52xx/mpc52xx_pci.c:347:ERROR: space prohibited after that

Re: Kernel Crash Dump (kdump) broken with 6.5

2023-07-18 Thread Michael Ellerman
Mahesh J Salgaonkar writes: > On 2023-07-17 20:15:53 Mon, Sachin Sant wrote: >> Kdump seems to be broken with 6.5 for ppc64le. >> >> [ 14.200412] systemd[1]: Starting dracut pre-pivot and cleanup hook... >> [[0;32m OK [0m] Started dracut pre-pivot and cleanup hook. >> Starting Kdump Vmcore Save

[RFC PATCH 21/21] crypto: scompress - Drop the use of per-cpu scratch buffers

2023-07-18 Thread Ard Biesheuvel
The scomp to acomp adaptation layer allocates 256k of scratch buffers per CPU in order to be able to present the input provided by the caller via scatterlists as linear byte arrays to the underlying synchronous compression drivers, most of which are thin wrappers around the various compression

[RFC PATCH 20/21] crypto: deflate - implement acomp API directly

2023-07-18 Thread Ard Biesheuvel
Drop the scomp implementation of deflate, which can only operate on contiguous in- and output buffer, and replace it with an implementation of acomp directly. This implementation walks the scatterlists, removing the need for the caller to use scratch buffers to present the input and output in a

[RFC PATCH 19/21] crypto: remove obsolete 'comp' compression API

2023-07-18 Thread Ard Biesheuvel
The 'comp' compression API has been superseded by the acomp API, which is a bit more cumbersome to use, but ultimately more flexible when it comes to hardware implementations. Now that all the users and implementations have been removed, let's remove the core plumbing of the 'comp' API as well.

[RFC PATCH 18/21] crypto: compress_null - drop obsolete 'comp' implementation

2023-07-18 Thread Ard Biesheuvel
The 'comp' API is obsolete and will be removed, so remove this comp implementation. Signed-off-by: Ard Biesheuvel --- crypto/crypto_null.c | 31 crypto/testmgr.c | 3 -- 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/crypto/crypto_null.c

[RFC PATCH 17/21] crypto: cavium/zip - drop obsolete 'comp' implementation

2023-07-18 Thread Ard Biesheuvel
The 'comp' API is obsolete and will be removed, so remove this comp implementation. Signed-off-by: Ard Biesheuvel --- drivers/crypto/cavium/zip/zip_crypto.c | 40 drivers/crypto/cavium/zip/zip_crypto.h | 10 drivers/crypto/cavium/zip/zip_main.c | 50 +---

[RFC PATCH 16/21] crypto: zstd - drop obsolete 'comp' implementation

2023-07-18 Thread Ard Biesheuvel
The 'comp' API is obsolete and will be removed, so remove this comp implementation. Signed-off-by: Ard Biesheuvel --- crypto/zstd.c | 56 +--- 1 file changed, 1 insertion(+), 55 deletions(-) diff --git a/crypto/zstd.c b/crypto/zstd.c index 154a969c83a82277..c6e6f135c5812c9c

[RFC PATCH 15/21] crypto: lzo - drop obsolete 'comp' implementation

2023-07-18 Thread Ard Biesheuvel
The 'comp' API is obsolete and will be removed, so remove this comp implementation. Signed-off-by: Ard Biesheuvel --- crypto/lzo.c | 60 +--- 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/crypto/lzo.c b/crypto/lzo.c index ebda132dd22bf543..52558f9d41f3dcea 100644

[RFC PATCH 14/21] crypto: lzo-rle - drop obsolete 'comp' implementation

2023-07-18 Thread Ard Biesheuvel
The 'comp' API is obsolete and will be removed, so remove this comp implementation. Signed-off-by: Ard Biesheuvel --- crypto/lzo-rle.c | 60 +--- 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/crypto/lzo-rle.c b/crypto/lzo-rle.c index

[RFC PATCH 13/21] crypto: lz4hc - drop obsolete 'comp' implementation

2023-07-18 Thread Ard Biesheuvel
The 'comp' API is obsolete and will be removed, so remove this comp implementation. Signed-off-by: Ard Biesheuvel --- crypto/lz4hc.c | 63 +--- 1 file changed, 1 insertion(+), 62 deletions(-) diff --git a/crypto/lz4hc.c b/crypto/lz4hc.c index d7cc94aa2fcf42fa..5d6b13319f5e7683

[RFC PATCH 12/21] crypto: lz4 - drop obsolete 'comp' implementation

2023-07-18 Thread Ard Biesheuvel
The 'comp' API is obsolete and will be removed, so remove this comp implementation. Signed-off-by: Ard Biesheuvel --- crypto/lz4.c | 61 +--- 1 file changed, 1 insertion(+), 60 deletions(-) diff --git a/crypto/lz4.c b/crypto/lz4.c index 0606f8862e7872ad..c46b6cbd91ce10c0 100644

[RFC PATCH 11/21] crypto: deflate - drop obsolete 'comp' implementation

2023-07-18 Thread Ard Biesheuvel
No users of the obsolete 'comp' crypto compression API remain, so let's drop the software deflate version of it. Signed-off-by: Ard Biesheuvel --- crypto/deflate.c | 58 +--- 1 file changed, 1 insertion(+), 57 deletions(-) diff --git a/crypto/deflate.c b/crypto/deflate.c index

[RFC PATCH 10/21] crypto: 842 - drop obsolete 'comp' implementation

2023-07-18 Thread Ard Biesheuvel
The 'comp' API is obsolete and will be removed, so remove this comp implementation. Signed-off-by: Ard Biesheuvel --- crypto/842.c | 63 +--- 1 file changed, 1 insertion(+), 62 deletions(-) diff --git a/crypto/842.c b/crypto/842.c index e59e54d769609ba6..5001d88cf727f74e 100644

[RFC PATCH 09/21] crypto: nx - Migrate to scomp API

2023-07-18 Thread Ard Biesheuvel
The only remaining user of 842 compression has been migrated to the acomp compression API, and so the NX hardware driver has to follow suit, given that no users of the obsolete 'comp' API remain, and it is going to be removed. So migrate the NX driver code to scomp. These will be wrapped and

[RFC PATCH 08/21] zram: Migrate to acomp compression API

2023-07-18 Thread Ard Biesheuvel
Switch from the deprecated 'comp' to the more recent 'acomp' API. This involves using scatterlists and request objects to describe the in- and output buffers, all of which happen to be contiguous in memory, and reside either entirely in lowmem, or inside a single highmem page. This makes the

[RFC PATCH 07/21] ubifs: Migrate to acomp compression API

2023-07-18 Thread Ard Biesheuvel
UBIFS is one of the remaining users of the obsolete 'comp' compression API exposed by the crypto subsystem. Given that it operates strictly on contiguous buffers that are either entirely in lowmem or covered by a single page, the conversion to the acomp API is quite straight-forward. Only

[RFC PATCH 06/21] ubifs: Avoid allocating buffer space unnecessarily

2023-07-18 Thread Ard Biesheuvel
The recompression scratch buffer is only used when the data node is compressed, and there is no need to allocate it otherwise. So move the allocation into the branch of the if() that actually makes use of it. Signed-off-by: Ard Biesheuvel --- fs/ubifs/journal.c | 16 1 file

[RFC PATCH 05/21] ubifs: Pass worst-case buffer size to compression routines

2023-07-18 Thread Ard Biesheuvel
Currently, the ubifs code allocates a worst case buffer size to recompress a data node, but does not pass the size of that buffer to the compression code. This means that the compression code will never use the additional space, and might fail spuriously due to lack of space. So let's multiply

[RFC PATCH 04/21] net: ipcomp: Migrate to acomp API from deprecated comp API

2023-07-18 Thread Ard Biesheuvel
Migrate the IPcomp network compression code to the acomp API, in order to drop the dependency on the obsolete 'comp' API which is going away. For the time being, this is a rather mechanical conversion replacing each comp TFM object with an acomp TFM/request object pair - this is necessary

[RFC PATCH 03/21] crypto: acompress - Drop destination scatterlist allocation feature

2023-07-18 Thread Ard Biesheuvel
The acomp crypto code will allocate a destination scatterlist and its backing pages on the fly if no destination is passed. This feature is not used, and given that the caller should own this memory, it is far better if the caller allocates it. This is especially true for decompression, where the

[RFC PATCH 02/21] crypto: qat - Drop support for allocating destination buffers

2023-07-18 Thread Ard Biesheuvel
Remove the logic that allocates the destination scatterlist and backing pages on the fly when no destination is provided: this is a rather dubious proposition, given that the caller is in a far better position to estimate the size of such a buffer, or how it should be allocated. This feature has

[RFC PATCH 01/21] crypto: scomp - Revert "add support for deflate rfc1950 (zlib)"

2023-07-18 Thread Ard Biesheuvel
This reverts commit a368f43d6e3a001e684e9191a27df384fbff12f5. "zlib-deflate" was introduced 6 years ago, but it does not have any users. So let's remove the generic implementation and the test vectors, but retain the "zlib-deflate" entry in the testmgr code to avoid introducing warning messages

[RFC PATCH 00/21] crypto: consolidate and clean up compression APIs

2023-07-18 Thread Ard Biesheuvel
This series is presented as an RFC, because I haven't quite convinced myself that the acomp API really needs both scatterlists and request objects to encapsulate the in- and output buffers, and perhaps there are more drastic simplifications that we might consider. However, the current situation

Re: [PATCH] powerpc/build: vdso linker warning for orphan sections

2023-07-18 Thread Michael Ellerman
John Ogness writes: > Hi Nicholas, > > On 2023-06-09, Nicholas Piggin wrote: >> Add --orphan-handlin for vdsos, and adjust vdso linker scripts to deal >> with orphan sections. > > I'm reporting that I am getting a linker warning with 6.5-rc2. The > warning message is: > > ld: warning: discarding

Re: linux-next: Tree for Jul 13 (drivers/video/fbdev/ps3fb.c)

2023-07-18 Thread Linux regression tracking (Thorsten Leemhuis)
Michael, thx for looking into this! On 18.07.23 13:48, Michael Ellerman wrote: > Bagas Sanjaya writes: >> On Thu, Jul 13, 2023 at 09:11:10AM -0700, Randy Dunlap wrote: >>> on ppc64: >>> >>> In file included from ../include/linux/device.h:15, >>> from

Re: linux-next: Tree for Jul 13 (drivers/video/fbdev/ps3fb.c)

2023-07-18 Thread Michael Ellerman
Bagas Sanjaya writes: > On Thu, Jul 13, 2023 at 09:11:10AM -0700, Randy Dunlap wrote: >> on ppc64: >> >> In file included from ../include/linux/device.h:15, >> from ../arch/powerpc/include/asm/io.h:22, >> from ../include/linux/io.h:13, >> from

Re: [PATCH] ASoC: fsl_sai: Disable bit clock with transmitter

2023-07-18 Thread Mark Brown
On Wed, 12 Jul 2023 14:49:33 +0200, Matus Gajdos wrote: > Otherwise bit clock remains running writing invalid data to the DAC. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: fsl_sai: Disable bit clock with transmitter

Re: [PATCH v6 2/3] PCI/AER: Disable AER interrupt on suspend

2023-07-18 Thread Bjorn Helgaas
[+cc Rafael] On Fri, May 12, 2023 at 08:00:13AM +0800, Kai-Heng Feng wrote: > PCIe services that share an IRQ with PME, such as AER or DPC, may cause a > spurious wakeup on system suspend. To prevent this, disable the AER interrupt > notification during the system suspend process. I see that in

Re: [PATCH v4 11/18] media: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers

2023-07-18 Thread Hans Verkuil
Hi Thomas, On 15/07/2023 20:51, Thomas Zimmermann wrote: > The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct > fbinfo.flags has been allocated to zero by kzalloc(). So do not > set it. > > Flags should signal differences from the default values. After cleaning > up all occurrences

Re: [PATCH v3 04/13] powerpc: assert_pte_locked() use pte_offset_map_nolock()

2023-07-18 Thread Aneesh Kumar K.V
Hugh Dickins writes: > Instead of pte_lockptr(), use the recently added pte_offset_map_nolock() > in assert_pte_locked(). BUG if pte_offset_map_nolock() fails: this is > stricter than the previous implementation, which skipped when pmd_none() > (with a comment on khugepaged collapse

Re: linux-next: Tree for Jul 13 (drivers/video/fbdev/ps3fb.c)

2023-07-18 Thread Thorsten Leemhuis
On 18.07.23 05:32, Bagas Sanjaya wrote: > On Thu, Jul 13, 2023 at 09:11:10AM -0700, Randy Dunlap wrote: >> On 7/12/23 19:37, Stephen Rothwell wrote: >>> Changes since 20230712: >> >> on ppc64: >> >> In file included from ../include/linux/device.h:15, >> from

[PATCH] platforms: powermac: insert space before the open parenthesis '('

2023-07-18 Thread hanyu001
Fixes checkpatch errors: /platforms/powermac/low_i2c.c:55:ERROR: space required before the open parenthesis '(' /platforms/powermac/low_i2c.c:63:ERROR: space required before the open parenthesis '(' Signed-off-by: Yu Han --- arch/powerpc/platforms/powermac/low_i2c.c | 4 ++-- 1 file

[PATCH] platforms: powermac: insert space before the open parenthesis '('

2023-07-18 Thread hanyu001
Fixes checkpatch error: /powerpc/platforms/powermac/setup.c:222:ERROR: space required before the open parenthesis '(' Signed-off-by: Yu Han --- arch/powerpc/platforms/powermac/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powermac/setup.c

[PATCH] powerpc: platforms: chrp: Add require space after that ','

2023-07-18 Thread hanyu001
Fixes checkpatch errors: ./arch/powerpc/platforms/chrp/time.c:109: ERROR: space required after that ',' (ctx:VxV) ./arch/powerpc/platforms/chrp/time.c:110: ERROR: space required after that ',' (ctx:VxV) ./arch/powerpc/platforms/chrp/time.c:111: ERROR: space required after that ',' (ctx:VxV)

Re: [PATCH] net: Explicitly include correct DT includes

2023-07-18 Thread Paolo Abeni
Hi, On Sat, 2023-07-15 at 10:11 -0500, Alex Elder wrote: > On 7/14/23 12:48 PM, Rob Herring wrote: > > The DT of_device.h and of_platform.h date back to the separate > > of_platform_bus_type before it as merged into the regular platform bus. > > As part of that merge prepping Arm DT support 13

[PATCH] platforms: chrp: Add require space after that ','

2023-07-18 Thread hanyu001
Fixes checkpatch errors: ./arch/powerpc/platforms/chrp/setup.c:91: ERROR: space required after that ',' (ctx:VxV) ./arch/powerpc/platforms/chrp/setup.c:91: ERROR: space required after that ',' (ctx:VxV) Signed-off-by: Yu Han --- arch/powerpc/platforms/chrp/setup.c | 2 +- 1 file changed, 1

[PATCH] platforms: 52xx: Remove space after '(' and before ')'

2023-07-18 Thread hanyu001
The patch fixes the following errors detected by checkpatch: platforms/52xx/mpc52xx_pci.c:346:ERROR: space prohibited after that open parenthesis '(' platforms/52xx/mpc52xx_pci.c:347:ERROR: space prohibited after that open parenthesis '(' platforms/52xx/mpc52xx_pci.c:348:ERROR: space

[PATCH] powerpc: platforms: ps3: Add require space after that ';'

2023-07-18 Thread hanyu001
Fixes checkpatch errors: ./arch/powerpc/platforms/ps3/platform.h:198: ERROR: space required after that ';' (ctx:VxV) ./arch/powerpc/platforms/ps3/platform.h:200: ERROR: space required after that ';' (ctx:VxV) ./arch/powerpc/platforms/ps3/platform.h:202: ERROR: space required after that ';'

[PATCH] powerpc: platforms: ps3: insert space before the open parenthesis '('

2023-07-18 Thread hanyu001
Fixes checkpatch error: powerpc/platforms/ps3/os-area.c:782:ERROR: space required before the open parenthesis '(' Signed-off-by: Yu Han --- arch/powerpc/platforms/ps3/os-area.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/ps3/os-area.c

[PATCH] powerpc: platforms: insert space before the open parenthesis '('

2023-07-18 Thread hanyu001
Fixes checkpatch error: arch/powerpc/platforms/ps3/setup.c:107:ERROR:space required before the open parenthesis '(' Signed-off-by: Yu Han --- arch/powerpc/platforms/ps3/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/ps3/setup.c

[PATCH 4/4] mmu_notifiers: Don't invalidate secondary TLBs as part of mmu_notifier_invalidate_range_end()

2023-07-18 Thread Alistair Popple
Secondary TLBs are now invalidated from the architecture specific TLB invalidation functions. Therefore there is no need to explicitly notify or invalidate as part of the range end functions. This means we can remove mmu_notifier_invalidate_range_end_only() and some of the ptep_*_notify()

[PATCH 3/4] mmu_notifiers: Call arch_invalidate_secondary_tlbs() when invalidating TLBs

2023-07-18 Thread Alistair Popple
The arch_invalidate_secondary_tlbs() is an architecture specific mmu notifier used to keep the TLB of secondary MMUs such as an IOMMU in sync with the CPU page tables. Currently it is called from separate code paths to the main CPU TLB invalidations. This can lead to a secondary TLB not getting

[PATCH 2/4] arm64/smmu: Use TLBI ASID when invalidating entire range

2023-07-18 Thread Alistair Popple
The ARM SMMU has a specific command for invalidating the TLB for an entire ASID. Currently this is used for the IO_PGTABLE API but not for ATS when called from the MMU notifier. The current implementation of notifiers does not attempt to invalidate such a large address range, instead walking each

  1   2   >