Skip to content

Commit

Permalink
Merge tag 'iommu-updates-v6.13' of ssh://gitolite.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/iommu/linux into iommufd.git

Merge with Joerg's tree for dependencies on the next patches.

======================================
IOMMU Updates for Linux v6.13:

Including:

	- Core Updates:
	  - Convert call-sites using iommu_domain_alloc() to more specific
	    versions and remove function.
	  - Introduce iommu_paging_domain_alloc_flags().
	  - Extend support for allocating PASID-capable domains to more
	    drivers.
	  - Remove iommu_present().
	  - Some smaller improvements.

	- New IOMMU driver for RISC-V.

	- Intel VT-d Updates:
	  - Add domain_alloc_paging support.
	  - Enable user space IOPFs in non-PASID and non-svm cases.
	  - Small code refactoring and cleanups.
	  - Add domain replacement support for pasid.

	- AMD-Vi Updates:
	  - Adapt to iommu_paging_domain_alloc_flags() interface and alloc V2
	    page-tables by default.
	  - Replace custom domain ID allocator with IDA allocator.
	  - Add ops->release_domain() support.
	  - Other improvements to device attach and domain allocation code
	    paths.

	- ARM-SMMU Updates:
	  - SMMUv2:
	    - Return -EPROBE_DEFER for client devices probing before their SMMU.
	    - Devicetree binding updates for Qualcomm MMU-500 implementations.
	  - SMMUv3:
	    - Minor fixes and cleanup for NVIDIA's virtual command queue driver.
	  - IO-PGTable:
	    - Fix indexing of concatenated PGDs and extend selftest coverage.
	    - Remove unused block-splitting support.

	- S390 IOMMU:
	  - Implement support for blocking domain.

	- Mediatek IOMMU:
	  - Enable 35-bit physical address support for mt8186.

	- OMAP IOMMU driver:
	  - Adapt to recent IOMMU core changes and unbreak driver.
======================================

Signed-off-by: Jason Gunthorpe <[email protected]>
  • Loading branch information
jgunthorpe committed Nov 22, 2024
2 parents 6d026e6 + 42f0cbb commit 2d76228
Show file tree
Hide file tree
Showing 1,346 changed files with 18,824 additions and 10,331 deletions.
13 changes: 11 additions & 2 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ Andrey Ryabinin <[email protected]> <[email protected]>
Andrzej Hajda <[email protected]> <[email protected]>
André Almeida <[email protected]> <[email protected]>
Andy Adamson <[email protected]>
Andy Chiu <[email protected]> <[email protected]>
Andy Chiu <[email protected]> <[email protected]>
Andy Shevchenko <[email protected]> <[email protected]>
Andy Shevchenko <[email protected]> <[email protected]>
Anilkumar Kolli <[email protected]> <[email protected]>
Expand Down Expand Up @@ -197,7 +199,8 @@ Elliot Berman <[email protected]> <[email protected]>
Enric Balletbo i Serra <[email protected]> <[email protected]>
Enric Balletbo i Serra <[email protected]> <[email protected]>
Erik Kaneda <[email protected]> <[email protected]>
Eugen Hristev <[email protected]> <[email protected]>
Eugen Hristev <[email protected]> <[email protected]>
Eugen Hristev <[email protected]> <[email protected]>
Evgeniy Polyakov <[email protected]>
Ezequiel Garcia <[email protected]> <[email protected]>
Faith Ekstrand <[email protected]> <[email protected]>
Expand Down Expand Up @@ -280,7 +283,7 @@ Jan Glauber <[email protected]> <[email protected]>
Jan Kuliga <[email protected]> <[email protected]>
Jarkko Sakkinen <[email protected]> <[email protected]>
Jarkko Sakkinen <[email protected]> <[email protected]>
Jarkko Sakkinen <[email protected]> <jarkko.sakkinen@tuni.fi>
Jarkko Sakkinen <[email protected]> <jarkko.sakkinen@parity.io>
Jason Gunthorpe <[email protected]> <[email protected]>
Jason Gunthorpe <[email protected]> <[email protected]>
Jason Gunthorpe <[email protected]> <[email protected]>
Expand All @@ -304,6 +307,11 @@ Jens Axboe <[email protected]> <[email protected]>
Jens Axboe <[email protected]> <[email protected]>
Jens Osterkamp <[email protected]>
Jernej Skrabec <[email protected]> <[email protected]>
Jesper Dangaard Brouer <[email protected]> <[email protected]>
Jesper Dangaard Brouer <[email protected]> <[email protected]>
Jesper Dangaard Brouer <[email protected]> <[email protected]>
Jesper Dangaard Brouer <[email protected]> <[email protected]>
Jesper Dangaard Brouer <[email protected]> <[email protected]>
Jessica Zhang <[email protected]> <[email protected]>
Jilai Wang <[email protected]> <[email protected]>
Jiri Kosina <[email protected]> <[email protected]>
Expand Down Expand Up @@ -657,6 +665,7 @@ Tomeu Vizoso <[email protected]> <[email protected]>
Thomas Graf <[email protected]>
Thomas Körper <[email protected]> <[email protected]>
Thomas Pedersen <[email protected]>
Thorsten Blum <[email protected]> <[email protected]>
Tiezhu Yang <[email protected]> <[email protected]>
Tingwei Zhang <[email protected]> <[email protected]>
Tirupathi Reddy <[email protected]> <[email protected]>
Expand Down
4 changes: 4 additions & 0 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,10 @@ S: Dreisbachstrasse 24
S: D-57250 Netphen
S: Germany

N: Florian Fainelli
E: [email protected]
D: DSA

N: Rik Faith
E: [email protected]
D: Future Domain TMC-16x0 SCSI driver (author)
Expand Down
7 changes: 5 additions & 2 deletions Documentation/admin-guide/LSM/ipe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,10 @@ are signed through the PKCS#7 message format to enforce some level of
authorization of the policies (prohibiting an attacker from gaining
unconstrained root, and deploying an "allow all" policy). These
policies must be signed by a certificate that chains to the
``SYSTEM_TRUSTED_KEYRING``. With openssl, the policy can be signed by::
``SYSTEM_TRUSTED_KEYRING``, or to the secondary and/or platform keyrings if
``CONFIG_IPE_POLICY_SIG_SECONDARY_KEYRING`` and/or
``CONFIG_IPE_POLICY_SIG_PLATFORM_KEYRING`` are enabled, respectively.
With openssl, the policy can be signed by::

openssl smime -sign \
-in "$MY_POLICY" \
Expand Down Expand Up @@ -266,7 +269,7 @@ in the kernel. This file is write-only and accepts a PKCS#7 signed
policy. Two checks will always be performed on this policy: First, the
``policy_names`` must match with the updated version and the existing
version. Second the updated policy must have a policy version greater than
or equal to the currently-running version. This is to prevent rollback attacks.
the currently-running version. This is to prevent rollback attacks.

The ``delete`` file is used to remove a policy that is no longer needed.
This file is write-only and accepts a value of ``1`` to delete the policy.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6688,7 +6688,7 @@
0: no polling (default)

thp_anon= [KNL]
Format: <size>,<size>[KMG]:<state>;<size>-<size>[KMG]:<state>
Format: <size>[KMG],<size>[KMG]:<state>;<size>[KMG]-<size>[KMG]:<state>
state is one of "always", "madvise", "never" or "inherit".
Control the default behavior of the system with respect
to anonymous transparent hugepages.
Expand Down
2 changes: 1 addition & 1 deletion Documentation/admin-guide/mm/transhuge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ control by passing the parameter ``transparent_hugepage=always`` or
kernel command line.

Alternatively, each supported anonymous THP size can be controlled by
passing ``thp_anon=<size>,<size>[KMG]:<state>;<size>-<size>[KMG]:<state>``,
passing ``thp_anon=<size>[KMG],<size>[KMG]:<state>;<size>[KMG]-<size>[KMG]:<state>``,
where ``<size>`` is the THP size (must be a power of 2 of PAGE_SIZE and
supported anonymous THP) and ``<state>`` is one of ``always``, ``madvise``,
``never`` or ``inherit``.
Expand Down
20 changes: 10 additions & 10 deletions Documentation/admin-guide/pm/cpufreq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ This governor exposes only one tunable:

``rate_limit_us``
Minimum time (in microseconds) that has to pass between two consecutive
runs of governor computations (default: 1000 times the scaling driver's
transition latency).
runs of governor computations (default: 1.5 times the scaling driver's
transition latency or the maximum 2ms).

The purpose of this tunable is to reduce the scheduler context overhead
of the governor which might be excessive without it.
Expand Down Expand Up @@ -474,17 +474,17 @@ This governor exposes the following tunables:
This is how often the governor's worker routine should run, in
microseconds.

Typically, it is set to values of the order of 10000 (10 ms). Its
default value is equal to the value of ``cpuinfo_transition_latency``
for each policy this governor is attached to (but since the unit here
is greater by 1000, this means that the time represented by
``sampling_rate`` is 1000 times greater than the transition latency by
default).
Typically, it is set to values of the order of 2000 (2 ms). Its
default value is to add a 50% breathing room
to ``cpuinfo_transition_latency`` on each policy this governor is
attached to. The minimum is typically the length of two scheduler
ticks.

If this tunable is per-policy, the following shell command sets the time
represented by it to be 750 times as high as the transition latency::
represented by it to be 1.5 times as high as the transition latency
(the default)::

# echo `$(($(cat cpuinfo_transition_latency) * 750 / 1000)) > ondemand/sampling_rate
# echo `$(($(cat cpuinfo_transition_latency) * 3 / 2)) > ondemand/sampling_rate

``up_threshold``
If the estimated CPU load is above this value (in percent), the governor
Expand Down
38 changes: 30 additions & 8 deletions Documentation/core-api/protection-keys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ Pkeys Userspace (PKU) is a feature which can be found on:
* Intel server CPUs, Skylake and later
* Intel client CPUs, Tiger Lake (11th Gen Core) and later
* Future AMD CPUs
* arm64 CPUs implementing the Permission Overlay Extension (FEAT_S1POE)

x86_64
======
Pkeys work by dedicating 4 previously Reserved bits in each page table entry to
a "protection key", giving 16 possible keys.

Expand All @@ -28,6 +31,22 @@ register. The feature is only available in 64-bit mode, even though there is
theoretically space in the PAE PTEs. These permissions are enforced on data
access only and have no effect on instruction fetches.

arm64
=====

Pkeys use 3 bits in each page table entry, to encode a "protection key index",
giving 8 possible keys.

Protections for each key are defined with a per-CPU user-writable system
register (POR_EL0). This is a 64-bit register encoding read, write and execute
overlay permissions for each protection key index.

Being a CPU register, POR_EL0 is inherently thread-local, potentially giving
each thread a different set of protections from every other thread.

Unlike x86_64, the protection key permissions also apply to instruction
fetches.

Syscalls
========

Expand All @@ -38,11 +57,10 @@ There are 3 system calls which directly interact with pkeys::
int pkey_mprotect(unsigned long start, size_t len,
unsigned long prot, int pkey);

Before a pkey can be used, it must first be allocated with
pkey_alloc(). An application calls the WRPKRU instruction
directly in order to change access permissions to memory covered
with a key. In this example WRPKRU is wrapped by a C function
called pkey_set().
Before a pkey can be used, it must first be allocated with pkey_alloc(). An
application writes to the architecture specific CPU register directly in order
to change access permissions to memory covered with a key. In this example
this is wrapped by a C function called pkey_set().
::

int real_prot = PROT_READ|PROT_WRITE;
Expand All @@ -64,9 +82,9 @@ is no longer in use::
munmap(ptr, PAGE_SIZE);
pkey_free(pkey);

.. note:: pkey_set() is a wrapper for the RDPKRU and WRPKRU instructions.
An example implementation can be found in
tools/testing/selftests/x86/protection_keys.c.
.. note:: pkey_set() is a wrapper around writing to the CPU register.
Example implementations can be found in
tools/testing/selftests/mm/pkey-{arm64,powerpc,x86}.h

Behavior
========
Expand Down Expand Up @@ -96,3 +114,7 @@ with a read()::
The kernel will send a SIGSEGV in both cases, but si_code will be set
to SEGV_PKERR when violating protection keys versus SEGV_ACCERR when
the plain mprotect() permissions are violated.

Note that kernel accesses from a kthread (such as io_uring) will use a default
value for the protection key register and so will not be consistent with
userspace's value of the register or mprotect().
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ properties:
- const: sleep

power-domains:
description: |
The MediaTek DPI module is typically associated with one of the
following multimedia power domains:
POWER_DOMAIN_DISPLAY
POWER_DOMAIN_VDOSYS
POWER_DOMAIN_MM
The specific power domain used varies depending on the SoC design.
It is recommended to explicitly add the appropriate power domain
property to the DPI node in the device tree.
maxItems: 1

port:
Expand All @@ -79,20 +89,6 @@ required:
- clock-names
- port

allOf:
- if:
not:
properties:
compatible:
contains:
enum:
- mediatek,mt6795-dpi
- mediatek,mt8173-dpi
- mediatek,mt8186-dpi
then:
properties:
power-domains: false

additionalProperties: false

examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ properties:
description: A phandle and PM domain specifier as defined by bindings of
the power controller specified by phandle. See
Documentation/devicetree/bindings/power/power-domain.yaml for details.
maxItems: 1

mediatek,gce-client-reg:
description:
Expand All @@ -57,6 +58,9 @@ properties:
clocks:
items:
- description: SPLIT Clock
- description: Used for interfacing with the HDMI RX signal source.
- description: Paired with receiving HDMI RX metadata.
minItems: 1

required:
- compatible
Expand All @@ -72,9 +76,24 @@ allOf:
const: mediatek,mt8195-mdp3-split

then:
properties:
clocks:
minItems: 3

required:
- mediatek,gce-client-reg

- if:
properties:
compatible:
contains:
const: mediatek,mt8173-disp-split

then:
properties:
clocks:
maxItems: 1

additionalProperties: false

examples:
Expand Down
2 changes: 1 addition & 1 deletion Documentation/devicetree/bindings/firmware/arm,scmi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ properties:
atomic mode of operation, even if requested.
default: 0

max-rx-timeout-ms:
arm,max-rx-timeout-ms:
description:
An optional time value, expressed in milliseconds, representing the
transport maximum timeout value for the receive channel. The value should
Expand Down
21 changes: 21 additions & 0 deletions Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ properties:
A 2.5V to 3.3V supply for the external reference voltage. When omitted,
the internal 2.5V reference is used.

refin-supply:
description:
A 2.5V to 3.3V supply for external reference voltage, for ad7380-4 only.

aina-supply:
description:
The common mode voltage supply for the AINA- pin on pseudo-differential
Expand Down Expand Up @@ -135,6 +139,23 @@ allOf:
ainc-supply: false
aind-supply: false

# ad7380-4 uses refin-supply as external reference.
# All other chips from ad738x family use refio as optional external reference.
# When refio-supply is omitted, internal reference is used.
- if:
properties:
compatible:
enum:
- adi,ad7380-4
then:
properties:
refio-supply: false
required:
- refin-supply
else:
properties:
refin-supply: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
Expand Down
53 changes: 17 additions & 36 deletions Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,30 @@
$id: http://devicetree.org/schemas/iio/dac/adi,ad5686.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AD5360 and similar DACs
title: Analog Devices AD5360 and similar SPI DACs

maintainers:
- Michael Hennerich <[email protected]>
- Jonathan Cameron <[email protected]>

properties:
compatible:
oneOf:
- description: SPI devices
enum:
- adi,ad5310r
- adi,ad5672r
- adi,ad5674r
- adi,ad5676
- adi,ad5676r
- adi,ad5679r
- adi,ad5681r
- adi,ad5682r
- adi,ad5683
- adi,ad5683r
- adi,ad5684
- adi,ad5684r
- adi,ad5685r
- adi,ad5686
- adi,ad5686r
- description: I2C devices
enum:
- adi,ad5311r
- adi,ad5337r
- adi,ad5338r
- adi,ad5671r
- adi,ad5675r
- adi,ad5691r
- adi,ad5692r
- adi,ad5693
- adi,ad5693r
- adi,ad5694
- adi,ad5694r
- adi,ad5695r
- adi,ad5696
- adi,ad5696r

enum:
- adi,ad5310r
- adi,ad5672r
- adi,ad5674r
- adi,ad5676
- adi,ad5676r
- adi,ad5679r
- adi,ad5681r
- adi,ad5682r
- adi,ad5683
- adi,ad5683r
- adi,ad5684
- adi,ad5684r
- adi,ad5685r
- adi,ad5686
- adi,ad5686r

reg:
maxItems: 1
Expand Down
Loading

0 comments on commit 2d76228

Please sign in to comment.