Commit graph

1,464,522 commits

Author SHA1 Message Date
Lizhi Hou
5a55a5da1f accel/amdxdna: Create shared functions for AIE2 and AIE4
The AIE4 platform uses a mailbox management channel mechanism similar to
AIE2 to communicate with the firmware.

Create aie.h and aie.c and move the functions and structures that can
be shared by both platforms from the AIE2-specific files into these
common files. This allows AIE2 and AIE4 to reuse the same implementation
and reduces code duplication.

Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260330163705.3153647-2-lizhi.hou@amd.com
2026-04-01 10:11:36 -07:00
Anshuman Khandual
95a58852b0 arm64/mm: Reject memory removal that splits a kernel leaf mapping
Linear and vmemmap mappings that get torn down during a memory hot remove
operation might contain leaf level entries on any page table level. If the
requested memory range's linear or vmemmap mappings falls within such leaf
entries, new mappings need to be created for the remaining memory mapped on
the leaf entry earlier, following standard break before make aka BBM rules.
But kernel cannot tolerate BBM and hence remapping to fine grained leaves
would not be possible on systems without BBML2_NOABORT.

Currently memory hot remove operation does not perform such restructuring,
and so removing memory ranges that could split a kernel leaf level mapping
need to be rejected.

While memory_hotplug.c does appear to permit hot removing arbitrary ranges
of memory, the higher layers that drive memory_hotplug (e.g. ACPI, virtio,
...) all appear to treat memory as fixed size devices. So it is impossible
to hot unplug a different amount than was previously hot plugged, and hence
we should never see a rejection in practice, but adding the check makes us
robust against a future change.

Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/all/aWZYXhrT6D2M-7-N@willie-the-truck/
Reviewed-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Suggested-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2026-04-01 18:04:54 +01:00
Anshuman Khandual
48478b9f79 arm64/mm: Enable batched TLB flush in unmap_hotplug_range()
During a memory hot remove operation, both linear and vmemmap mappings for
the memory range being removed, get unmapped via unmap_hotplug_range() but
mapped pages get freed only for vmemmap mapping. This is just a sequential
operation where each table entry gets cleared, followed by a leaf specific
TLB flush, and then followed by memory free operation when applicable.

This approach was simple and uniform both for vmemmap and linear mappings.
But linear mapping might contain CONT marked block memory where it becomes
necessary to first clear out all entire in the range before a TLB flush.
This is as per the architecture requirement. Hence batch all TLB flushes
during the table tear down walk and finally do it in unmap_hotplug_range().

Prior to this fix, it was hypothetically possible for a speculative access
to a higher address in the contiguous block to fill the TLB with shattered
entries for the entire contiguous range after a lower address had already
been cleared and invalidated. Due to the table entries being shattered, the
subsequent TLB invalidation for the higher address would not then clear the
TLB entries for the lower address, meaning stale TLB entries could persist.

Besides it also helps in improving the performance via TLBI range operation
along with reduced synchronization instructions. The time spent executing
unmap_hotplug_range() improved 97% measured over a 2GB memory hot removal
in KVM guest.

This scheme is not applicable during vmemmap mapping tear down where memory
needs to be freed and hence a TLB flush is required after clearing out page
table entry.

Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Closes: https://lore.kernel.org/all/aWZYXhrT6D2M-7-N@willie-the-truck/
Fixes: bbd6ec605c ("arm64/mm: Enable memory hot remove")
Cc: stable@vger.kernel.org
Reviewed-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2026-04-01 18:04:54 +01:00
Li Ming
d585bc86fb cxl/region: Add a region sysfs interface for region lock status
There are 3 scenarios that leads to a locked region:
1. A region is created on a root decoder with Fixed Device Confiuration
   attribute.
2. CXL_HDM_DECODER0_CTRL_LOCK.

Both 1 & 1 are well described in:
commit 2230c4bdc4 ("cxl: Add handling of locked CXL decoder")

3) Platform that has region creation with PRMT address translation always
   locks the region, regardless of the FIXED attribute or decoder ctrl bit.

Region locked means region destroy operations are not permitted. CXL
region driver returns -EPERM for region destroy operations.

Although the locked status of the corresponding root decoder implies the
region is also locked, exposing the region lock status directly to
userspace improves usability for users who may not be aware of this
relationship.

[ dj: Amended commit log with additional locking scenarios. ]

Signed-off-by: Li Ming <ming.li@zohomail.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Alejandro Lucero <alucerop@amd.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Link: https://patch.msgid.link/20260401124951.1290041-1-ming.li@zohomail.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
2026-04-01 09:59:58 -07:00
Arnd Bergmann
9e17f8e9cc STM32 DT for v7.1, round 1
Highlights:
 ----------
 
 - MPU:
   - STM32MP13:
     - Introduce and enable debug bus on DK board.
     - Enable Coresight on DK board.
     - Add DT overlays for DH board.
     - Add Wakeup capabilities on I2C nodes.
 
   - STMP32MP15:
     - ST:
       - Enable DCMI DMA chaining to improve performances.
       - Introduce and enable debug bus on EV and DK board.
       - Enable Coresight on EV and DK board.
 
     - DH:
       - Add DT overlays for DH board.
 
     - Phytec:
       - Rename "Phycore" to "phyboard-sargas" DT files and introduce
         SOM device tree file.
       - Fix and enhance current support.
 
   - STM32MP21:
     - Add Bsec support.
 
   - STM32MP23:
     - Add LTDC and LVDS support and enable display on STM32MP235F-DK
       board.
 
   - STM32MP25:
     - Enable display on STM32MP235F-DK board.
 -----BEGIN PGP SIGNATURE-----
 
 iQJRBAABCgA7FiEEctl9+nxzUSUqdELdf5rJavIecIUFAmnE9Z0dHGFsZXhhbmRy
 ZS50b3JndWVAZm9zcy5zdC5jb20ACgkQf5rJavIecIWDeA//addNVtVQkDPaB+tk
 YTNFDdswdmqr23SFiw6Be8hGa2b/pkAS52Z97g9OAa9i4R2woaSTcMK8qWxMh4HD
 F2wqLyRuw5soe3UXwJJTOzKbpdGD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QFeZWvMGl5FIfH1SSJHb
 uV9Wm7V/6GD9HL2qvpyOEYZSlPxkIB8u5ttSLtev7oCQdCdWxdOAJ9APEt5j3OvJ
 48lwi3+0kNGBaUERjbdTBoLCHF42w6lVpZKnrcQOhwfN1c8KZcUhu/HWNmSE70qo
 WWsCTkUIWHaErUCwP+F4j5XX5OofCF1ZzJaibt9tjeVyURVsxU4BRbsGwwdZsYbX
 aQLhJ9uMR9sZPcBAV7B66GzIIonqKV2qHwc+G7pStcMSOUnDs4AvaAniNjaUG3rt
 czvWipVUlewN/GJPIf4rRj51TXaWVa2DycxWgZ6lqS+n33gj5WA=
 =G3bF
 -----END PGP SIGNATURE-----

Merge tag 'stm32-dt-for-7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into soc/dt

STM32 DT for v7.1, round 1

Highlights:
----------

- MPU:
  - STM32MP13:
    - Introduce and enable debug bus on DK board.
    - Enable Coresight on DK board.
    - Add DT overlays for DH board.
    - Add Wakeup capabilities on I2C nodes.

  - STMP32MP15:
    - ST:
      - Enable DCMI DMA chaining to improve performances.
      - Introduce and enable debug bus on EV and DK board.
      - Enable Coresight on EV and DK board.

    - DH:
      - Add DT overlays for DH board.

    - Phytec:
      - Rename "Phycore" to "phyboard-sargas" DT files and introduce
        SOM device tree file.
      - Fix and enhance current support.

  - STM32MP21:
    - Add Bsec support.

  - STM32MP23:
    - Add LTDC and LVDS support and enable display on STM32MP235F-DK
      board.

  - STM32MP25:
    - Enable display on STM32MP235F-DK board.

* tag 'stm32-dt-for-7.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: (42 commits)
  arm64: defconfig: Enable STMicroelectronics STM32 display support
  arm64: dts: st: enable display support on stm32mp257f-dk board
  arm64: dts: st: describe power supplies for stm32mp257f-dk board
  arm64: dts: st: enable display support on stm32mp235f-dk board
  arm64: dts: st: describe power supplies for stm32mp235f-dk board
  arm64: dts: st: add clock-cells to syscfg node on stm32mp231
  arm64: dts: st: add lvds support on stm32mp235
  arm64: dts: st: add ltdc support on stm32mp235
  arm64: dts: st: add ltdc support on stm32mp231
  arm64: dts: st: omit unused pinctrl groups from stm32mp25 dtb files
  arm64: dts: st: add bootph-all in bsec node to stm32mp215f-dk
  arm64: dts: st: add bsec support to stm32mp21
  ARM: dts: stm32: fix misalignments in nodes of stm32mp131
  ARM: dts: stm32: fix misalignments in nodes of stm32mp151
  arm64: dts: st: describe i2c2 / i2c8 on stm32mp235f-dk
  arm64: dts: st: describe i2c2 / i2c8 on stm32mp257f-dk
  arm64: dts: st: disable DMA usage for i2c on stm32mp257f-ev1
  arm64: dts: st: add i2c2 pinmux nodes in stm32mp25-pinctrl.dtsi
  arm64: dts: st: update i2c nodes interrupt/wakeup-source in stm32mp231
  arm64: dts: st: update i2c nodes interrupt/wakeup-source in stm32mp251
  ...

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-04-01 18:56:32 +02:00
Arnd Bergmann
5e9c551265 Samsung DTS ARM changes for v7.1
1. New board: Exynos5250 based Google Manta (Nexus 10).
 2. Few cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmnCiP0QHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD14tID/96p7GLJHYTlWbIACx2dsT/9tm5jFaL5Q5u
 VMo3sr+ajufT/zwMD7P0accA9DXyekXGRNtCS5BdCZtuE7F1/Ia8KEEeDpv78oEJ
 4WaStGFIQZZbzRBab1Z1bPtCRJsbY/7U8FJbAsfCjio2aFl22jL0mvgN5XsieTiD
 09Q3kmjMeJPZbuwTMqMxtNwulEVLbvPlMJ43M1+voh7MJsqFgwclhB8KHbzsgCGt
 478UQSsu8JPAdOHrqmuNiirM8Ltuuet2zwOu6aP5n61+S/buqor6/B67G0oiZYEW
 cEirmYpqwgM8BvvmhZHLJpf3u9+2CfDIq/XA31myjdTACHbxM3fufVF5WiOBP95E
 VoppYmV0Chdq4StZYK3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NJQ+BYnPUjGdNc+kyvvoqR86qxSa4
 ytnAwBcUctg9JEEbd1nIT0y6naHgaewAOfHwmhSai/QPFkhaa3w=
 =5XCY
 -----END PGP SIGNATURE-----

Merge tag 'samsung-dt-7.1' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/dt

Samsung DTS ARM changes for v7.1

1. New board: Exynos5250 based Google Manta (Nexus 10).
2. Few cleanups.

* tag 'samsung-dt-7.1' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  ARM: dts: exyons4412: Drop duplicated I2C address/size-cells
  ARM: dts: exynos4210-smdkv310: Drop duplicated I2C address/size-cells
  ARM: dts: exynos3250: Drop duplicated I2C address/size-cells
  ARM: dts: exynos: Add Google Manta (Nexus 10)
  dt-bindings: ARM: samsung: Add Google Manta (Nexus 10)

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-04-01 18:53:19 +02:00
Sascha Bischoff
9c1ac77ddf KVM: arm64: vgic-v5: Fold PPI state for all exposed PPIs
GICv5 supports up to 128 PPIs, which would introduce a large amount of
overhead if all of them were actively tracked. Rather than keeping
track of all 128 potential PPIs, we instead only consider the set of
architected PPIs (the first 64). Moreover, we further reduce that set
by only exposing a subset of the PPIs to a guest. In practice, this
means that only 4 PPIs are typically exposed to a guest - the SW_PPI,
PMUIRQ, and the timers.

When folding the PPI state, changed bits in the active or pending were
used to choose which state to sync back. However, this breaks badly
for Edge interrupts when exiting the guest before it has consumed the
edge. There is no change in pending state detected, and the edge is
lost forever.

Given the reduced set of PPIs exposed to the guest, and the issues
around tracking the edges, drop the tracking of changed state, and
instead iterate over the limited subset of PPIs exposed to the guest
directly.

This change drops the second copy of the PPI pending state used for
detecting edges in the pending state, and reworks
vgic_v5_fold_ppi_state() to iterate over the VM's PPI mask instead.

Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com>
Link: https://patch.msgid.link/20260401162152.932243-1-sascha.bischoff@arm.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
2026-04-01 17:52:17 +01:00
Zhan Xusheng
c5283a1ffd hrtimer: Fix incorrect #endif comment for BITS_PER_LONG check
The #endif comment says "BITS_PER_LONG >= 64", but the corresponding #if
guard is "BITS_PER_LONG < 64".

The comment was originally correct when the block had a three-way
#if/#else/#endif structure, where the #else branch provided a 64-bit inline
version.  Commit 79bf2bb335 ("[PATCH] tick-management: dyntick / highres
functionality") removed the #else branch but did not update the #endif
comment, leaving it inconsistent with the remaining #if condition.

Fix the comment to match the preprocessor guard.

Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260331074811.26147-1-zhanxusheng@xiaomi.com
2026-04-01 18:48:15 +02:00
Biju Das
0e5988549d irqchip/renesas-rzg2l: Add NMI support
The RZ/G2L SoC has an NMI interrupt. Add support for the NMI interrupt.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260401114504.332825-1-biju.das.jz@bp.renesas.com
2026-04-01 18:41:58 +02:00
Gaurav Batra
328335a794 powerpc/powernv/iommu: iommu incorrectly bypass DMA APIs
In a PowerNV environment, for devices that supports DMA mask less than
64 bit but larger than 32 bits, iommu is incorrectly bypassing DMA
APIs while allocating and mapping buffers for DMA operations.

Devices are failing with ENOMEN during probe with the following messages

amdgpu 0000:01:00.0: [drm] Detected VRAM RAM=4096M, BAR=4096M
amdgpu 0000:01:00.0: [drm] RAM width 128bits GDDR5
amdgpu 0000:01:00.0: iommu: 64-bit OK but direct DMA is limited by 0
amdgpu 0000:01:00.0: dma_iommu_get_required_mask: returning bypass mask 0xfffffffffffffff
amdgpu 0000:01:00.0:  4096M of VRAM memory ready
amdgpu 0000:01:00.0:  32570M of GTT memory ready.
amdgpu 0000:01:00.0: (-12) failed to allocate kernel bo
amdgpu 0000:01:00.0: [drm] Debug VRAM access will use slowpath MM access
amdgpu 0000:01:00.0: [drm] GART: num cpu pages 4096, num gpu pages 65536
amdgpu 0000:01:00.0: [drm] PCIE GART of 256M enabled (table at 0x000000F4FFF80000).
amdgpu 0000:01:00.0: (-12) failed to allocate kernel bo
amdgpu 0000:01:00.0: (-12) create WB bo failed
amdgpu 0000:01:00.0: amdgpu_device_wb_init failed -12
amdgpu 0000:01:00.0: amdgpu_device_ip_init failed
amdgpu 0000:01:00.0: Fatal error during GPU init
amdgpu 0000:01:00.0: finishing device.
amdgpu 0000:01:00.0: probe with driver amdgpu failed with error -12
amdgpu 0000:01:00.0:  ttm finalized

Fixes: 1471c517cf ("powerpc/iommu: bypass DMA APIs for coherent allocations for pre-mapped memory")
Suggested-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reported-by: Dan Horák <dan@danny.cz>
Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5039
Tested-by: Dan Horak <dan@danny.cz>
Closes: https://lore.kernel.org/linuxppc-dev/20260313142351.609bc4c3efe1184f64ca5f44@danny.cz/
Signed-off-by: Gaurav Batra <gbatra@linux.ibm.com>
Closes: https://lore.kernel.org/linuxppc-dev/20260313142351.609bc4c3efe1184f64ca5f44@danny.cz/
[Maddy: Fixed tags]
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260331223022.47488-1-gbatra@linux.ibm.com
2026-04-01 22:08:55 +05:30
Arnd Bergmann
2feb6df85c Samsung DTS ARM64 changes for v7.1
1. Add initial support for Axis ARTPEC-9 SoC and Alfred board using it.
    Just like ARTPEC-8, this is a derivative of Samsung Exynos SoC made
    for Axis, sharing most or all of core SoC blocks with Samsung
    designs.
 
 2. New boards: Exynos7870 based Samsung Galaxy J7 (2016) and Samsung
    Galaxy J5 (2017).
 
 3. Google GS101 Pixel phone: describe all PMIC regulators and Maxim
    fuel-gauge.
 
 4. ExynosAutov920: add G3D (GPU) clock controller (CMU).
 -----BEGIN PGP SIGNATUR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IkeyhpUY1YFOULMird8bIoQJ2wElZVYnapfyTy
 c4lazly7tNNCVvbTeRyLjW8CSvSae9o/ykfv53sqao3kQWK1t8fy9ldIuVwBO9oG
 KYKNaiztCQyki7OKMNze1pwmtCd9dQejVoQo1oIgYeHVQYbv5fIKfiJ3dsQRs1JD
 rWzuYdbRoIBKDbSc/iDXVZd1ZIMML891onS94JsFICImbJjC0pglT5oaAQ0FU2qe
 A9P2UnVP6SyUjRRmtKpAk2uJNuMYyrFarFvt13MWG6N9abYiSOx7+jGr30427jvz
 AeF1n0ub8ZqGw2JozZgRsPfVkHiwcItwtiE5L7Hy8l0kDzvAg1bNfvPlPeDRqstP
 UAdZsGL34C1YHm6r6h1tW2E8h85Qf2mPYTDWAVk/rMFxn8E4Vj3H3h/KZNJmWYXZ
 KAsSc8u1QZW+hIrRhdoW/yFBldWyy3tHiIRPdsy/sTlfo6epwEOiiNTv3Gu8JFWV
 t4Tj1lqKHYDdhKBls6v0gpim5p+4/3/EZaVK5F8y9aKOGQVADG8=
 =2rdh
 -----END PGP SIGNATURE-----

Merge tag 'samsung-dt64-7.1' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/dt

Samsung DTS ARM64 changes for v7.1

1. Add initial support for Axis ARTPEC-9 SoC and Alfred board using it.
   Just like ARTPEC-8, this is a derivative of Samsung Exynos SoC made
   for Axis, sharing most or all of core SoC blocks with Samsung
   designs.

2. New boards: Exynos7870 based Samsung Galaxy J7 (2016) and Samsung
   Galaxy J5 (2017).

3. Google GS101 Pixel phone: describe all PMIC regulators and Maxim
   fuel-gauge.

4. ExynosAutov920: add G3D (GPU) clock controller (CMU).

* tag 'samsung-dt64-7.1' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  arm64: dts: exynos8895: Move I2C address/size-cells to DTSI
  arm64: dts: exynos7870: Move I2C address/size-cells to DTSI
  arm64: dts: exynos: gs101-pixel-common: add Maxim MAX77759 fuel gauge
  arm64: dts: exynos: add initial support for Samsung Galaxy J5
  dt-bindings: arm: samsung: add compatible for samsung-j5y17lte
  arm64: dts: exynosautov920: add CMU_G3D clock DT nodes
  arm64: dts: exynos: gs101-pixel: add all S2MPG1x regulators
  arm64: dts: exynos: add initial support for Samsung Galaxy J7 (2016)
  dt-bindings: arm: samsung: add compatible for samsung-j7xelte
  arm64: dts: axis: artpec9: Fix missing soc unit address
  arm64: dts: axis: Add ARTPEC-9 Alfred board support
  arm64: dts: exynos: axis: Add initial ARTPEC-9 SoC support
  dt-bindings: arm: axis: Add ARTPEC-9 alfred board
  dt-bindings: clock: Add ARTPEC-9 clock controller

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-04-01 18:34:44 +02:00
Zenghui Yu (Huawei)
03db5f05d4 KVM: arm64: selftests: Avoid testing the IMPDEF behavior
It turned out that we can't really force KVM to use the "slow" path when
emulating AT instructions [1]. We should therefore avoid testing the IMPDEF
behavior (i.e., TEST_ACCESS_FLAG - address translation instructions are
permitted to update AF but not required).

Remove it and improve the comment a bit.

[1] https://lore.kernel.org/r/b951dcfb-0ad1-4d7b-b6ce-d54b272dd9be@linux.dev

Signed-off-by: Zenghui Yu (Huawei) <zenghui.yu@linux.dev>
Link: https://patch.msgid.link/20260317131558.52751-1-zenghui.yu@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
2026-04-01 17:29:21 +01:00
Arnd Bergmann
d6b92b6b74 This pull request contains Broadcom ARM64-based SoCs Device Tree updates
for 7.1, please pull the following:
 
 - Maira adds the V3D DT node to the 2712 (Raspberry Pi 5) SoC
 
 - Gergor adds the I2C controller, CSI (camera), ISP (image signal
   processor), fixes the pinctrl node and updates the UART10 interrupt
   for the RP1 sister chip to the 2712 (Raspberry Pi 5)
 
 - Rob moves the firmware and GPU to the root level to fix DTC warnings
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmnBjgIACgkQh9CWnEQH
 BwQTsQ//Sodu5MfSCSynh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UPbftehqcedjwjK0580xTDeye/MFgvgoCvQ+0q6O5JbJ6uQoUdPO+g85r
 vGZXT1VXVFcHSaMPVoN/SF36s88EBFCgl+TkLC36AP2w2SbuywOPZ5oPpQeKCNDu
 5kC9EKm1ZDBcAuN4kxjyQDjAtTTaZDASgQKpTiPhsuu1fl/oaQbbOj15mIfW59Vv
 Dj0exL9oJcF5B3EUYtJGxF29lGkTi0G4ORu+jpeFRbozF+tjDP0SwHmhTgbhCHzO
 erhjVH3M+4Jop2A0FTSWna0+LFjJ01lvsODQp3kZMMCLR0ZdClX0rX8YoZ54b6IM
 BWqYNRA7q5Or1dbRnE2DOoUXOGmTKstEKRbvZKqhZewNzBSZi2mZbGp3KjDVzjdY
 7Ve6f89fbV+ah+CPH4FFW2IqH15i64X9p2yDKRTRr8JnOyRNZP4=
 =AREl
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-7.1/devicetree-arm64' of https://github.com/Broadcom/stblinux into soc/dt

This pull request contains Broadcom ARM64-based SoCs Device Tree updates
for 7.1, please pull the following:

- Maira adds the V3D DT node to the 2712 (Raspberry Pi 5) SoC

- Gergor adds the I2C controller, CSI (camera), ISP (image signal
  processor), fixes the pinctrl node and updates the UART10 interrupt
  for the RP1 sister chip to the 2712 (Raspberry Pi 5)

- Rob moves the firmware and GPU to the root level to fix DTC warnings

* tag 'arm-soc/for-7.1/devicetree-arm64' of https://github.com/Broadcom/stblinux:
  arm64: dts: broadcom: bcm2712: Move non simple-bus nodes to root level
  arm64: dts: broadcom: bcm2712-d-rpi-5-b: update uart10 interrupt
  arm64: dts: broadcom: bcm2712-d-rpi-5-b: add fixes for pinctrl/pinctrl_aon
  arm64: dts: broadcom: bcm2712-rpi-5-b: add pinctrl properties for csi i2cs
  arm64: dts: broadcom: bcm2712: add camera backend node pispbe
  arm64: dts: broadcom: rp1: add csi nodes
  arm64: dts: broadcom: rp1: add i2c controller
  arm64: dts: broadcom: bcm2712: Add V3D device node

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-04-01 18:26:07 +02:00
Pavel Begunkov
8ae2837d5a io_uring/zcrx: don't use mark0 for allocating xarray
XA_MARK_0 is not compatible with xarray allocating entries, use
XA_MARK_1.

Fixes: fda90d43f4fac ("io_uring/zcrx: return back two step unregistration")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/f232cfd3c466047d333b474dd2bddd246b6ebb82.1774780198.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:13 -06:00
Anas Iqbal
77d8c8d0f1 io_uring: cast id to u64 before shifting in io_allocate_rbuf_ring()
Smatch warns:
io_uring/zcrx.c:393 io_allocate_rbuf_ring() warn: should 'id << 16' be a 64 bit type?

The expression 'id << IORING_OFF_PBUF_SHIFT' is evaluated using 32-bit
arithmetic because id is a u32. This may overflow before being promoted
to the 64-bit mmap_offset.

Cast id to u64 before shifting to ensure the shift is performed in
64-bit arithmetic.

Signed-off-by: Anas Iqbal <mohd.abd.6602@gmail.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/52400e1b343691416bef3ed3ae287fb1a88d407f.1774780198.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:13 -06:00
Pavel Begunkov
a9d008489f io_uring/zcrx: reject REG_NODEV with large rx_buf_size
The copy fallback path doesn't care about the actual niov size and only
uses first PAGE_SIZE bytes, and any additional space will be wasted.
Since ZCRX_REG_NODEV solely relies on the copy path, it doesn't make
sense to support non-standard rx_buf_len. Reject it for now, and
re-enable once improved.

Fixes: c11728021d5cd ("io_uring/zcrx: implement device-less mode for zcrx")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/3e7652d9c27f8ac5d2b141e3af47971f2771fb05.1774780198.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:13 -06:00
Amir Mohammad Jahangirzad
85a58309c0 io_uring/cancel: validate opcode for IORING_ASYNC_CANCEL_OP
io_async_cancel_prep() reads the opcode selector from sqe->len and
stores it in cancel->opcode, which is an 8-bit field. Since sqe->len
is a 32-bit value, values larger than U8_MAX are implicitly truncated.

This can cause unintended opcode matches when the truncated value
corresponds to a valid io_uring opcode. For example, submitting a value
such as 0x10b will be truncated to 0x0b (IORING_OP_TIMEOUT), allowing a
cancel request to match operations it did not intend to target.
Validate the opcode value before assigning it to the 8-bit field and
reject values outside the valid io_uring opcode range.

Signed-off-by: Amir Mohammad Jahangirzad <a.jahangirzad@gmail.com>
Link: https://patch.msgid.link/20260331232113.615972-1-a.jahangirzad@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:13 -06:00
Jackie Liu
19a8cc6cda io_uring/rsrc: use io_cache_free() to free node
Replace kfree(node) with io_cache_free() in io_buffer_register_bvec()
to match all other error paths that free nodes allocated via
io_rsrc_node_alloc(). The node is allocated through io_cache_alloc()
internally, so it should be returned to the cache via io_cache_free()
for proper object reuse.

Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Link: https://patch.msgid.link/20260331104509.7055-1-liu.yun@linux.dev
[axboe: remove fixes tag, it's not a fix, it's a cleanup]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:13 -06:00
Pavel Begunkov
7c713dd007 io_uring/zcrx: rename zcrx [un]register functions
Drop "ifqs" from function names, as it refers to an interface queue and
there might be none once a device-less mode is introduced.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/657874acd117ec30fa6f45d9d844471c753b5a0f.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:13 -06:00
Pavel Begunkov
de6ed1b323 io_uring/zcrx: check ctrl op payload struct sizes
Add a build check that ctrl payloads are of the same size and don't grow
struct zcrx_ctrl.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/af66caf9776d18e9ff880ab828eb159a6a03caf5.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:13 -06:00
Pavel Begunkov
5c727ce042 io_uring/zcrx: cache fallback availability in zcrx ctx
Store a flag in struct io_zcrx_ifq telling if the backing memory is
normal page or dmabuf based. It was looking it up from the area, however
it logically allocates from the zcrx ctx and not a particular area, and
once we add more than one area it'll become a mess.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/65e75408a7758fe7e60fae89b7a8d5ae4857f515.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:13 -06:00
Pavel Begunkov
f0b92207a0 io_uring/zcrx: warn on a repeated area append
We only support a single area, no path should be able to call
io_zcrx_append_area() twice. Warn if that happens instead of just
returning an error.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/28eb67fb8c48445584d7c247a36e1ad8800f0c8b.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:13 -06:00
Pavel Begunkov
61cfadaae6 io_uring/zcrx: consolidate dma syncing
Split refilling into two steps, first allocate niovs, and then do DMA
sync for them. This way dma synchronisation code can be better
optimised. E.g. we don't need to call dma_dev_need_sync() for each every
niov, and maybe we can coalesce sync for adjacent netmems in the future
as well.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/19f2d50baa62ff2e0c6cd56dd7c394cab728c567.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:12 -06:00
Pavel Begunkov
c0989138c0 io_uring/zcrx: netmem array as refiling format
Instead of peeking into page pool allocation cache directly or via
net_mp_netmem_place_in_cache(), pass a netmem array around. It's a
better intermediate format, e.g. you can have it on stack and reuse the
refilling code and decouples it from page pools a bit more.

It still points into the page pool directly, there will be no additional
copies. As the next step, we can change the callback prototype to take
the netmem array from page pool.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/9d8549adb7ef6672daf2d8a52858ce5926279a82.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:12 -06:00
Pavel Begunkov
48f253d65d io_uring/zcrx: warn on alloc with non-empty pp cache
Page pool ensures the cache is empty before asking to refill it. Warn if
the assumption is violated.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/9c9792d6e65f3780d57ff83b6334d341ed9a5f29.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:12 -06:00
Pavel Begunkov
7df542a665 io_uring/zcrx: move count check into zcrx_get_free_niov
Instead of relying on the caller of __io_zcrx_get_free_niov() to check
that there are free niovs available (i.e. free_count > 0), move the
check into the function and return NULL if can't allocate. It
consolidates the free count checks, and it'll be easier to extend the
niov free list allocator in the future.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/6df04a6b3a6170f86d4345da9864f238311163f9.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:12 -06:00
Pavel Begunkov
898ad80d12 io_uring/zcrx: use guards for locking
Convert last several places using manual locking to guards to simplify
the code.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/eb4667cfaf88c559700f6399da9e434889f5b04a.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:12 -06:00
Pavel Begunkov
6a55a0a7eb io_uring/zcrx: add a struct for refill queue
Add a new structure that keeps the refill queue state. It's cleaner and
will be useful once we introduce multiple refill queues.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/4ce200da1ff0309c377293b949200f95f80be9ae.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:12 -06:00
Pavel Begunkov
ebae09bce4 io_uring/zcrx: use better name for RQ region
Rename "region" to "rq_region" to highlight that it's a refill queue
region.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/ac815790d2477a15826aecaa3d94f2a94ef507e6.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:12 -06:00
Pavel Begunkov
825f276491 io_uring/zcrx: implement device-less mode for zcrx
Allow creating a zcrx instance without attaching it to a net device.
All data will be copied through the fallback path. The user is also
expected to use ZCRX_CTRL_FLUSH_RQ to handle overflows as it normally
should even with a netdev, but it becomes even more relevant as there
will likely be no one to automatically pick up buffers.

Apart from that, it follows the zcrx uapi for the I/O path, and is
useful for testing, experimentation, and potentially for the copy
receive path in the future if improved.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/674f8ad679c5a0bc79d538352b3042cf0999596e.1774261953.git.asml.silence@gmail.com
[axboe: fix spelling error in uapi header and commit message]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:12 -06:00
Pavel Begunkov
06fc3b6d38 io_uring/zcrx: extract netdev+area init into a helper
In preparation to following patches, add a function that is responsibly
for looking up a netdev, creating an area, DMA mapping it and opening a
queue.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/88cb6f746ecb496a9030756125419df273d0b003.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:12 -06:00
Pavel Begunkov
b8d6eb6c1c io_uring/zcrx: always dma map in advance
zcrx was originally establisihing dma mappings at a late stage when it
was being bound to a page pool. Dma-buf couldn't work this way, so it's
initialised during area creation.

It's messy having them do it at different spots, just move everything to
the area creation time.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/334092a2cbdd4aabd7c025050aa99f05ace89bb5.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:12 -06:00
Pavel Begunkov
41041562a7 io_uring/zcrx: fully clean area on error in io_import_umem()
When accounting fails, io_import_umem() sets the page array, etc. and
returns an error expecting that the error handling code will take care
of the rest. To make the next patch simpler, only return a fully
initialised areas from the function.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/3a602b7fb347dbd4da6797ac49b52ea5dedb856d.1774261953.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:12 -06:00
Pavel Begunkov
e5361d25e2 io_uring/zcrx: return back two step unregistration
There are reports where io_uring instance removal takes too long and an
ifq reallocation by another zcrx instance fails. Split zcrx destruction
into two steps similarly how it was before, first close the queue early
but maintain zcrx alive, and then when all inflight requests are
completed, drop the main zcrx reference. For extra protection, mark
terminated zcrx instances in xarray and warn if we double put them.

Cc: stable@vger.kernel.org # 6.19+
Link: https://github.com/axboe/liburing/issues/1550
Reported-by: Youngmin Choi <youngminchoi94@gmail.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/0ce21f0565ab4358668922a28a8a36922dfebf76.1774261953.git.asml.silence@gmail.com
[axboe: NULL ifq before break inside scoped guard]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-01 10:21:12 -06:00
Tommaso Merciai
f62fcdf8ab reset: rzv2h-usb2phy: Add support for VBUS mux controller registration
The RZ/V2H USB2 PHY requires control of the VBUS selection line
(VBENCTL) through a mux controller described in the device tree as
"mux-controller". This change adds support for registering the
rzv2h-usb-vbenctl auxiliary driver during probe.

This enables proper management of USB2.0 VBUS source selection on
platforms using the RZ/V2H SoC.

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2026-04-01 18:16:09 +02:00
Tommaso Merciai
890628c8d0 reset: rzv2h-usb2phy: Convert to regmap API
Replace raw MMIO accesses (readl/writel) with regmap_read() and
regmap_multi_reg_write() via devm_regmap_init_mmio().
Drop the manual spinlock as regmap provides internal locking.

Replace the custom rzv2h_usb2phy_regval struct with the standard
reg_sequence, and encode assert/deassert sequences as reg_sequence
arrays rather than individual scalar fields in the of_data
descriptor.

Use the reg_sequence .delay_us field to encode the 11 µs post-assert
delay, replacing the explicit usleep_range(11, 20) call in
rzv2h_usbphy_reset_assert().

Select REGMAP_MMIO in Kconfig.

Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2026-04-01 18:15:59 +02:00
Tommaso Merciai
63be00249d dt-bindings: reset: renesas,rzv2h-usb2phy: Document RZ/G3E USB2PHY reset
Document USB2PHY reset controller bindings for RZ/G3E ("R9A09G047") SoC.

The RZ/G3E USB2PHY reset controller is functionally identical to the one
found on the RZ/V2H(P), so no driver changes are needed. The existing
"renesas,r9a09g057-usb2phy-reset" will be used as a fallback compatible
for this IP.

Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2026-04-01 18:13:55 +02:00
Tommaso Merciai
6a1b6f7e56 dt-bindings: reset: renesas,rzv2h-usb2phy: Add '#mux-state-cells' property
Add the '#mux-state-cells' property to support describing the USB VBUS_SEL
multiplexer as a mux-controller in the Renesas RZ/V2H(P) USB2PHY binding.

The mux-controller cannot be integrated into the parent USB2PHY node
because the VBUS source selector is part of a separate hardware block,
not the USB2PHY block itself.

This is required to properly configure USB PHY power selection on
RZ/V2H(P) and RZ/G3E SoCs.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2026-04-01 18:13:55 +02:00
Griffin Kroah-Hartman
df53055c54 Input: aw86927 - add support for Awinic AW86938
Add support for the I2C-connected Awinic AW86938 LRA haptic controller.

The AW86938 has a similar but slightly different register layout. In
particular, the boost mode register values.

The AW86938 also has some extra features that aren't implemented
in this driver yet.

Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
Link: https://patch.msgid.link/20260302-aw86938-driver-v4-3-92c865df9cca@fairphone.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-04-01 09:08:33 -07:00
Griffin Kroah-Hartman
b73724b1de dt-bindings: input: awinic,aw86927: Add Awinic AW86938
Add bindings for the Awinic AW86938 haptic chip which can be found in
smartphones. These two chips require a similar devicetree configuration,
but have a register layout that's not 100% compatible.
Still, because chip model is fully detectable via ID register, these
chips can be documnented in the same file.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
Link: https://patch.msgid.link/20260302-aw86938-driver-v4-2-92c865df9cca@fairphone.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-04-01 09:08:32 -07:00
Griffin Kroah-Hartman
53ba7a47d3 Input: aw86927 - respect vibration magnitude levels
Previously the gain value was hardcoded. Take the magnitude passed via
the input API and configure the gain register accordingly.

Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
Link: https://patch.msgid.link/20260302-aw86938-driver-v4-1-92c865df9cca@fairphone.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2026-04-01 09:08:32 -07:00
David Laight
1dff9ac2c8 tools/nolibc/printf: Support negative variable width and precision
For (eg) "%*.*s" treat a negative field width as a request to left align
the output (the same as the '-' flag), and a negative precision to
request the default precision.

Set the default precision to -1 (not INT_MAX) and add explicit checks
to the string handling for negative values (makes the tet unsigned).

For numeric output check for 'precision >= 0' instead of testing
_NOLIBC_PF_FLAGS_CONTAIN(flags, '.').
This needs an inverted test, some extra goto and removes an indentation.
The changed conditionals fix printf("%0-#o", 0) - but '0' and '-' shouldn't
both be specified.

Signed-off-by: David Laight <david.laight.linux@gmail.com>
Link: https://patch.msgid.link/20260323112247.3196-1-david.laight.linux@gmail.com
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
2026-04-01 18:02:37 +02:00
Jonathan Cavitt
896070686b drm/xe/vm: Add missing pad and extensions check
Add missing pad and extensions check to xe_vm_get_property_ioctl

v2:
- Combine with other check (Auld)

Fixes: 50c577eab0 ("drm/xe/xe_vm: Implement xe_vm_get_property_ioctl")
Suggested-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patch.msgid.link/20260331181216.37775-2-jonathan.cavitt@intel.com
2026-04-01 16:49:53 +01:00
Will Deacon
a3ca3bfd01 KVM: arm64: Destroy stage-2 page-table in kvm_arch_destroy_vm()
kvm_arch_destroy_vm() can be called on the kvm_create_vm() error path
after we have failed to register the MMU notifiers for the new VM. In
this case, we cannot rely on the MMU ->release() notifier to call
kvm_arch_flush_shadow_all() and so the stage-2 page-table allocated in
kvm_arch_init_vm() will be leaked.

Explicitly destroy the stage-2 page-table in kvm_arch_destroy_vm(), so
that we clean up after kvm_arch_destroy_vm() without relying on the MMU
notifiers.

Link: https://sashiko.dev/#/patchset/20260327140039.21228-1-will%40kernel.org?patch=12265
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20260327192758.21739-3-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
2026-04-01 16:48:16 +01:00
Will Deacon
2fc0f3e2b9 KVM: arm64: Don't leave mmu->pgt dangling on kvm_init_stage2_mmu() error
If kvm_init_stage2_mmu() fails to allocate 'mmu->last_vcpu_ran', it
destroys the newly allocated stage-2 page-table before returning ENOMEM.

Unfortunately, it also leaves a dangling pointer in 'mmu->pgt' which
points at the freed 'kvm_pgtable' structure. This is likely to confuse
the kvm_vcpu_init_nested() failure path which can double-free the
structure if it finds it via kvm_free_stage2_pgd().

Ensure that the dangling 'mmu->pgt' pointer is cleared when returning an
error from kvm_init_stage2_mmu().

Link: https://sashiko.dev/#/patchset/20260327140039.21228-1-will%40kernel.org?patch=12265
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20260327192758.21739-2-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
2026-04-01 16:48:16 +01:00
Sebastian Ene
cf6348af64 KVM: arm64: Prevent the host from using an smc with imm16 != 0
The ARM Service Calling Convention (SMCCC) specifies that the function
identifier and parameters should be passed in registers, leaving the
16-bit immediate field un-handled in pKVM when an SMC instruction is
trapped.
Since the HVC is a private interface between EL2 and the host,
enforce the host kernel running under pKVM to use an immediate value
of 0 only when using SMCs to make it clear for non-compliant software
talking to Trustzone that we only use SMCCC.

Signed-off-by: Sebastian Ene <sebastianene@google.com>
Reviewed-by: Vincent Donnefort <vdonnefort@google.com>
Link: https://patch.msgid.link/20260330105441.3226904-1-sebastianene@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
2026-04-01 16:39:10 +01:00
Thomas Weißschuh
7138a8698a timens: Use task_lock guard in timens_get*()
Simplify the logic in timens_get*() by converting the task_lock
usage to a guard().

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260330-timens-cleanup-v1-4-936e91c9dd30@linutronix.de
2026-04-01 17:13:36 +02:00
Thomas Weißschuh
6d89dc8b1c timens: Use mutex guard in proc_timens_set_offset()
Simplify the logic in proc_timens_set_offset() by converting the mutex
usage to a guard().

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260330-timens-cleanup-v1-3-936e91c9dd30@linutronix.de
2026-04-01 17:13:35 +02:00
Thomas Weißschuh
3fa3aeb4a5 timens: Simplify some calls to put_time_ns()
Use the new __free() based cleanup helpers to simplify some functions.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260330-timens-cleanup-v1-2-936e91c9dd30@linutronix.de
2026-04-01 17:13:35 +02:00
Thomas Weißschuh
c2de5a5be4 timens: Add a __free() wrapper for put_time_ns()
The wrapper will be used to simplify cleanups of 'struct time_namespace'.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260330-timens-cleanup-v1-1-936e91c9dd30@linutronix.de
2026-04-01 17:13:35 +02:00