Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
98ee801
arm64: mm: Add top-level dispatcher for internal mem_encrypt API
willdeacon Jun 24, 2025
dbfe662
arm64: mm: Add confidential computing hook to ioremap_prot()
willdeacon Jun 24, 2025
8437c90
arm64: rsi: Add RSI definitions
Jun 24, 2025
95a598c
arm64: Detect if in a realm and set RIPAS RAM
Jun 24, 2025
616305f
arm64: realm: Query IPA size from the RMM
Jun 24, 2025
c986e3e
arm64: rsi: Add support for checking whether an MMIO is protected
Jun 24, 2025
96bc000
arm64: rsi: Map unprotected MMIO as decrypted
Jun 24, 2025
152bc97
efi: arm64: Map Device with Prot Shared
Jun 24, 2025
33ba50f
arm64: Enforce bounce buffers for realm DMA
Jun 24, 2025
0a6d701
arm64: mm: Avoid TLBI when marking pages as valid
Jun 24, 2025
66251e9
arm64: Enable memory encrypt for Realms
Jun 24, 2025
193dedc
irqchip/gic-v3-its: Share ITS tables with a non-trusted hypervisor
Jun 24, 2025
5e26a4a
irqchip/gic-v3-its: Fix over allocation in itt_alloc_pool()
Jun 24, 2025
3952949
irqchip/gic-v3-its: Rely on genpool alignment
Jun 24, 2025
7ed6d3f
jump_label,module: Don't alloc static_key_mod for __ro_after_init keys
Jun 24, 2025
20192d7
parisc: Delay write-protection until mark_rodata_ro() call
hdeller Jun 24, 2025
6087f68
arm64: realm: ioremap: Allow mapping memory as encrypted
Jun 24, 2025
dbb5756
rme: make sure realm guest map memory in page granularity
Jun 24, 2025
0dd3296
dma: Fix encryption bit clearing for dma_to_phys
Jun 24, 2025
f6da99d
dma: Introduce generic dma_addr_*crypted helpers
Jun 24, 2025
adcaed1
arm64: realm: Use aliased addresses for device DMA to shared buffers
Jun 24, 2025
7b5b9ad
virt: coco: Add a coco/Makefile and coco/Kconfig
djbw Jun 24, 2025
64f8e02
configfs-tsm: Introduce a shared ABI for attestation reports
djbw Jun 24, 2025
b7dfbc3
mm/slab: Add __free() support for kvfree
djbw Jun 24, 2025
21bfca3
virt: arm-cca-guest: TSM_REPORT support for realms
samimujawar Jun 24, 2025
bae2c12
arm64: Document Arm Confidential Compute
Jun 24, 2025
f471002
configfs-tsm-report: Fix NULL dereference of tsm_ops
djbw Jun 24, 2025
d368926
MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry
willdeacon Jun 24, 2025
0decbe5
KVM: arm64: PMU: Add a helper to read a vCPU's PMCR_EL0
reijiw-kvm Sep 18, 2025
a4dcdf5
arm: perf/kvm: Use GENMASK for ARMV8_PMU_PMCR_N
James-A-Clark Sep 19, 2024
836b5af
kvm: arm64: Include kvm_emulate.h in kvm/arm_psci.h
Jun 14, 2025
8323e31
arm64: RME: Handle Granule Protection Faults (GPFs)
Jun 14, 2025
da3b039
arm64: RME: Add SMC definitions for calling the RMM
Jun 14, 2025
f731414
arm64: RME: Add wrappers for RMI calls
Jun 14, 2025
2fce966
arm64: RME: Check for RME support at KVM init
Jun 14, 2025
75c12b4
arm64: RME: Define the user ABI
Jun 14, 2025
d02b67c
arm64: RME: ioctls to create and configure realms
Jun 17, 2025
298b775
kvm: arm64: Don't expose debug capabilities for realm guests
Jun 14, 2025
b4828fd
KVM: arm64: Allow passing machine type in KVM creation
Jun 14, 2025
ee080f4
arm64: RME: RTT tear down
Jun 14, 2025
ffd7411
KVM: arm64: Add generic check for system-supported vCPU features
oupton Jun 14, 2025
c859ebb
arm64: RME: Allocate/free RECs to match vCPUs
Jun 14, 2025
257876c
KVM: arm64: vgic: Provide helper for number of list registers
Jun 14, 2025
82603af
KVM: arm64: Force GICv3 trap activation when no irqchip is configured…
Jun 14, 2025
da85076
arm64: RME: Support for the VGIC in realms
Jun 14, 2025
10d82d9
KVM: arm64: Support timers in realm RECs
Jun 14, 2025
b882d94
KVM: Add member to struct kvm_gfn_range to indicate private/shared
yamahata Jun 17, 2025
db46654
arm64: RME: Allow VMM to set RIPAS
Jun 14, 2025
a318fc2
arm64: RME: Handle realm enter/exit
Jun 14, 2025
c93eb91
arm64: RME: Handle RMI_EXIT_RIPAS_CHANGE
Jun 14, 2025
29b512a
KVM: arm64: Handle realm MMIO emulation
Jun 14, 2025
f2a58fe
arm64: RME: Allow populating initial contents
Jun 14, 2025
f9cbdcc
rme: populate guest memory region without guest_memfd
Jun 14, 2025
12e4cb5
KVM: arm64: Move pagetable definitions to common header
Jun 17, 2025
bdf318d
arm64: RME: Runtime faulting of memory
Jun 14, 2025
1cbdf63
KVM: arm64: Handle realm VCPU load
Jun 14, 2025
398ca44
KVM: arm64: Validate register access for a Realm VM
Jun 14, 2025
cb0764d
KVM: arm64: Handle Realm PSCI requests
Jun 14, 2025
9e6f9e4
KVM: arm64: WARN on injected undef exceptions
Jun 14, 2025
ca67981
arm64: Don't expose stolen time for realm guests
Jun 14, 2025
2dbecf0
arm64: RME: allow userspace to inject aborts
jgouly Jun 14, 2025
6cd635c
arm64: RME: support RSI_HOST_CALL
jgouly Jun 14, 2025
1cb0e1f
arm64: RME: Allow checking SVE on VM instance
Jun 14, 2025
cf4479d
arm64: RME: Always use 4k pages for realms
Jun 14, 2025
7b593e7
arm64: RME: Prevent Device mappings for Realms
Jun 14, 2025
389ed2e
arm_pmu: Provide a mechanism for disabling the physical IRQ
Jun 14, 2025
a777b70
KVM: arm64: PMU: Set PMCR_EL0.N for vCPU based on the associated PMU
reijiw-kvm Jun 23, 2025
1af258a
KVM: arm64: PMU: Allow userspace to limit PMCR_EL0.N for the guest
reijiw-kvm Jun 23, 2025
d2deae1
KVM: arm64: PMU: Introduce helpers to set the guest's PMU
reijiw-kvm Oct 20, 2023
17a7632
arm64: rme: Enable PMU support with a realm guest
Jun 17, 2025
d083c52
arm64: RME: Hide KVM_CAP_READONLY_MEM for realm guests
Jun 14, 2025
6388dd3
arm64: RME: Propagate number of breakpoints and watchpoints to userspace
jpbrucker Jun 14, 2025
8679512
arm64: RME: Set breakpoint parameters through SET_ONE_REG
jpbrucker Jun 21, 2025
aa8e304
arm64: RME: Initialize PMCR.N with number counter supported by RMM
jpbrucker Jun 23, 2025
8b54cf6
arm64: RME: Propagate max SVE vector length from RMM
jpbrucker Jun 14, 2025
9716681
rm64: RME: Configure max SVE vector length for a Realm
jpbrucker Jun 14, 2025
8977ea8
arm64: RME: Provide register list for unfinalized RME RECs
jpbrucker Jun 14, 2025
1f7bc3e
arm64: RME: Provide accurate register list
jpbrucker Jun 14, 2025
713a18c
KVM: arm64: Expose KVM_ARM_VCPU_REC to user space
Jun 14, 2025
446bc61
KVM: arm64: Allow activating realms
Jun 14, 2025
aec4b10
KVM: arm64: Select default PMU in KVM_ARM_VCPU_INIT handler
reijiw-kvm Oct 20, 2023
f6b0b18
arm64: RME: Introduce kvm_rec_pre_enter() called before entering an a…
Sep 9, 2025
9358931
arm64: RME: handle RIPAS changes before kvm_rec_enter
Sep 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions Documentation/ABI/testing/configfs-tsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
What: /sys/kernel/config/tsm/report/$name/inblob
Date: September, 2023
KernelVersion: v6.7
Contact: [email protected]
Description:
(WO) Up to 64 bytes of user specified binary data. For replay
protection this should include a nonce, but the kernel does not
place any restrictions on the content.

What: /sys/kernel/config/tsm/report/$name/outblob
Date: September, 2023
KernelVersion: v6.7
Contact: [email protected]
Description:
(RO) Binary attestation report generated from @inblob and other
options The format of the report is implementation specific
where the implementation is conveyed via the @provider
attribute.

What: /sys/kernel/config/tsm/report/$name/auxblob
Date: October, 2023
KernelVersion: v6.7
Contact: [email protected]
Description:
(RO) Optional supplemental data that a TSM may emit, visibility
of this attribute depends on TSM, and may be empty if no
auxiliary data is available.

When @provider is "sev_guest" this file contains the
"cert_table" from SEV-ES Guest-Hypervisor Communication Block
Standardization v2.03 Section 4.1.8.1 MSG_REPORT_REQ.
https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/specifications/56421.pdf

What: /sys/kernel/config/tsm/report/$name/provider
Date: September, 2023
KernelVersion: v6.7
Contact: [email protected]
Description:
(RO) A name for the format-specification of @outblob like
"sev_guest" [1] or "tdx_guest" [2] in the near term, or a
common standard format in the future.

[1]: SEV Secure Nested Paging Firmware ABI Specification
Revision 1.55 Table 22
https://www.amd.com/content/dam/amd/en/documents/epyc-technical-docs/specifications/56860.pdf

[2]: Intel® Trust Domain Extensions Data Center Attestation
Primitives : Quote Generation Library and Quote Verification
Library Revision 0.8 Appendix 4,5
https://download.01.org/intel-sgx/latest/dcap-latest/linux/docs/Intel_TDX_DCAP_Quoting_Library_API.pdf

What: /sys/kernel/config/tsm/report/$name/generation
Date: September, 2023
KernelVersion: v6.7
Contact: [email protected]
Description:
(RO) The value in this attribute increments each time @inblob or
any option is written. Userspace can detect conflicts by
checking generation before writing to any attribute and making
sure the number of writes matches expectations after reading
@outblob, or it can prevent conflicts by creating a report
instance per requesting context.

What: /sys/kernel/config/tsm/report/$name/privlevel
Date: September, 2023
KernelVersion: v6.7
Contact: [email protected]
Description:
(WO) Attribute is visible if a TSM implementation provider
supports the concept of attestation reports for TVMs running at
different privilege levels, like SEV-SNP "VMPL", specify the
privilege level via this attribute. The minimum acceptable
value is conveyed via @privlevel_floor and the maximum
acceptable value is TSM_PRIVLEVEL_MAX (3).

What: /sys/kernel/config/tsm/report/$name/privlevel_floor
Date: September, 2023
KernelVersion: v6.7
Contact: [email protected]
Description:
(RO) Indicates the minimum permissible value that can be written
to @privlevel.
69 changes: 69 additions & 0 deletions Documentation/arch/arm64/arm-cca.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
.. SPDX-License-Identifier: GPL-2.0

=====================================
Arm Confidential Compute Architecture
=====================================

Arm systems that support the Realm Management Extension (RME) contain
hardware to allow a VM guest to be run in a way which protects the code
and data of the guest from the hypervisor. It extends the older "two
world" model (Normal and Secure World) into four worlds: Normal, Secure,
Root and Realm. Linux can then also be run as a guest to a monitor
running in the Realm world.

The monitor running in the Realm world is known as the Realm Management
Monitor (RMM) and implements the Realm Management Monitor
specification[1]. The monitor acts a bit like a hypervisor (e.g. it runs
in EL2 and manages the stage 2 page tables etc of the guests running in
Realm world), however much of the control is handled by a hypervisor
running in the Normal World. The Normal World hypervisor uses the Realm
Management Interface (RMI) defined by the RMM specification to request
the RMM to perform operations (e.g. mapping memory or executing a vCPU).

The RMM defines an environment for guests where the address space (IPA)
is split into two. The lower half is protected - any memory that is
mapped in this half cannot be seen by the Normal World and the RMM
restricts what operations the Normal World can perform on this memory
(e.g. the Normal World cannot replace pages in this region without the
guest's cooperation). The upper half is shared, the Normal World is free
to make changes to the pages in this region, and is able to emulate MMIO
devices in this region too.

A guest running in a Realm may also communicate with the RMM using the
Realm Services Interface (RSI) to request changes in its environment or
to perform attestation about its environment. In particular it may
request that areas of the protected address space are transitioned
between 'RAM' and 'EMPTY' (in either direction). This allows a Realm
guest to give up memory to be returned to the Normal World, or to
request new memory from the Normal World. Without an explicit request
from the Realm guest the RMM will otherwise prevent the Normal World
from making these changes.

Linux as a Realm Guest
----------------------

To run Linux as a guest within a Realm, the following must be provided
either by the VMM or by a `boot loader` run in the Realm before Linux:

* All protected RAM described to Linux (by DT or ACPI) must be marked
RIPAS RAM before handing control over to Linux.

* MMIO devices must be either unprotected (e.g. emulated by the Normal
World) or marked RIPAS DEV.

* MMIO devices emulated by the Normal World and used very early in boot
(specifically earlycon) must be specified in the upper half of IPA.
For earlycon this can be done by specifying the address on the
command line, e.g. with an IPA size of 33 bits and the base address
of the emulated UART at 0x1000000: ``earlycon=uart,mmio,0x101000000``

* Linux will use bounce buffers for communicating with unprotected
devices. It will transition some protected memory to RIPAS EMPTY and
expect to be able to access unprotected pages at the same IPA address
but with the highest valid IPA bit set. The expectation is that the
VMM will remove the physical pages from the protected mapping and
provide those pages as unprotected pages.

References
----------
[1] https://developer.arm.com/documentation/den0137/
3 changes: 3 additions & 0 deletions Documentation/arch/arm64/booting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ to automatically locate and size all RAM, or it may use knowledge of
the RAM in the machine, or any other method the boot loader designer
sees fit.)

For Arm Confidential Compute Realms this includes ensuring that all
protected RAM has a Realm IPA state (RIPAS) of "RAM".


2. Setup the device tree
-------------------------
Expand Down
1 change: 1 addition & 0 deletions Documentation/arch/arm64/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ARM64 Architecture
acpi_object_usage
amu
arm-acpi
arm-cca
asymmetric-32bit
booting
cpu-feature-registers
Expand Down
91 changes: 89 additions & 2 deletions Documentation/virt/kvm/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,20 @@ In order to create user controlled virtual machines on S390, check
KVM_CAP_S390_UCONTROL and use the flag KVM_VM_S390_UCONTROL as
privileged user (CAP_SYS_ADMIN).

On arm64, the physical address size for a VM (IPA Size limit) is limited
to 40bits by default. The limit can be configured if the host supports the
On arm64, the machine type identifier is used to encode a type and the
physical address size for the VM. The lower byte (bits[7-0]) encode the
address size and the upper bits[11-8] encode a machine type. The machine
types that might be available are:

====================== ============================================
KVM_VM_TYPE_ARM_NORMAL A standard VM
KVM_VM_TYPE_ARM_REALM A "Realm" VM using the Arm Confidential
Compute extensions, the VM's memory is
protected from the host.
====================== ============================================

The physical address size for a VM (IPA Size limit) is limited to 40bits
by default. The limit can be configured if the host supports the
extension KVM_CAP_ARM_VM_IPA_SIZE. When supported, use
KVM_VM_TYPE_ARM_IPA_SIZE(IPA_Bits) to set the size in the machine type
identifier, where IPA_Bits is the maximum width of any physical
Expand Down Expand Up @@ -1271,6 +1283,8 @@ User space may need to inject several types of events to the guest.
Set the pending SError exception state for this VCPU. It is not possible to
'cancel' an Serror that has been made pending.

User space cannot inject SErrors into Realms.

If the guest performed an access to I/O memory which could not be handled by
userspace, for example because of missing instruction syndrome decode
information or because there is no device mapped at the accessed IPA, then
Expand Down Expand Up @@ -3520,6 +3534,11 @@ Possible features:
- the KVM_REG_ARM64_SVE_VLS pseudo-register is immutable, and can
no longer be written using KVM_SET_ONE_REG.

- KVM_ARM_VCPU_REC: Allocate a REC (Realm Execution Context) for this
VCPU. This must be specified on all VCPUs created in a Realm VM.
Depends on KVM_CAP_ARM_RME.
Requires KVM_ARM_VCPU_FINALIZE(KVM_ARM_VCPU_REC).

4.83 KVM_ARM_PREFERRED_TARGET
-----------------------------

Expand Down Expand Up @@ -5055,6 +5074,7 @@ Recognised values for feature:

===== ===========================================
arm64 KVM_ARM_VCPU_SVE (requires KVM_CAP_ARM_SVE)
arm64 KVM_ARM_VCPU_REC (requires KVM_CAP_ARM_RME)
===== ===========================================

Finalizes the configuration of the specified vcpu feature.
Expand Down Expand Up @@ -6314,6 +6334,30 @@ to the byte array.
__u64 flags;
} hypercall;

4.144 KVM_ARM_VCPU_RMM_PSCI_COMPLETE
------------------------------------

:Capability: KVM_CAP_ARM_RME
:Architectures: arm64
:Type: vcpu ioctl
:Parameters: struct kvm_arm_rmm_psci_complete (in)
:Returns: 0 if successful, < 0 on error

::

struct kvm_arm_rmm_psci_complete {
__u64 target_mpidr;
__u32 psci_status;
__u32 padding[3];
};

Where PSCI functions are handled by user space, the RMM needs to be informed of
the target of the operation using `target_mpidr`, along with the status
(`psci_status`). The RMM v1.0 specification defines two functions that require
this call: PSCI_CPU_ON and PSCI_AFFINITY_INFO.

If the kernel is handling PSCI then this is done automatically and the VMM
doesn't need to call this ioctl.

It is strongly recommended that userspace use ``KVM_EXIT_IO`` (x86) or
``KVM_EXIT_MMIO`` (all except s390) to implement functionality that
Expand Down Expand Up @@ -7788,6 +7832,46 @@ This capability is aimed to mitigate the threat that malicious VMs can
cause CPU stuck (due to event windows don't open up) and make the CPU
unavailable to host or other VMs.

7.38 KVM_CAP_ARM_RME
--------------------

:Architectures: arm64
:Target: VM
:Parameters: args[0] provides an action, args[1] points to a structure in
memory for some actions.
:Returns: 0 on success, negative value on error

Used to configure and set up the memory for a Realm. The available actions are:

================================= =============================================
KVM_CAP_ARM_RME_CONFIG_REALM Takes struct arm_rme_config as args[1] and
configures realm parameters prior to it being
created.

Options are ARM_RME_CONFIG_RPV to set the
"Realm Personalization Value" and
ARM_RME_CONFIG_HASH_ALGO to set the hash
algorithm.

KVM_CAP_ARM_RME_CREATE_REALM Request the RMM create the realm. The realm's
configuration parameters must be set first.

KVM_CAP_ARM_RME_INIT_RIPAS_REALM Takes struct arm_rme_init_ripas as args[1]
and sets the RIPAS (Realm IPA State) to
RIPAS_RAM of a specified area of the realm's
IPA.

KVM_CAP_ARM_RME_POPULATE_REALM Takes struct arm_rme_init_ripas as args[1]
and populates a region of protected address
space by copying the data from the shared
alias.

KVM_CAP_ARM_RME_ACTIVATE_REALM Request the RMM activate the realm. No
further changes can be made to the realm's
configuration, and VCPUs are not permitted to
enter the realm until it has been activated.
================================= =============================================

8. Other capabilities.
======================

Expand Down Expand Up @@ -8110,6 +8194,9 @@ is supported, than the other should as well and vice versa. For arm64
see Documentation/virt/kvm/devices/vcpu.rst "KVM_ARM_VCPU_PVTIME_CTRL".
For x86 see Documentation/virt/kvm/x86/msr.rst "MSR_KVM_STEAL_TIME".

Note that steal time accounting is not available when a guest is running
within a Arm CCA realm (machine type KVM_VM_TYPE_ARM_REALM).

8.25 KVM_CAP_S390_DIAG318
-------------------------

Expand Down
10 changes: 10 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3021,6 +3021,8 @@ S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
F: Documentation/arch/arm64/
F: arch/arm64/
F: drivers/virt/coco/arm-cca-guest/
F: drivers/virt/coco/pkvm-guest/
F: tools/testing/selftests/arm64/
X: arch/arm64/boot/dts/

Expand Down Expand Up @@ -22016,6 +22018,14 @@ W: https://github.com/srcres258/linux-doc
T: git git://github.com/srcres258/linux-doc.git doc-zh-tw
F: Documentation/translations/zh_TW/

TRUSTED SECURITY MODULE (TSM) ATTESTATION REPORTS
M: Dan Williams <[email protected]>
L: [email protected]
S: Maintained
F: Documentation/ABI/testing/configfs-tsm
F: drivers/virt/coco/tsm.c
F: include/linux/tsm.h

TTY LAYER AND SERIAL DRIVERS
M: Greg Kroah-Hartman <[email protected]>
M: Jiri Slaby <[email protected]>
Expand Down
4 changes: 4 additions & 0 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ config ARM64
select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
select ARCH_HAS_CACHE_LINE_SIZE
select ARCH_HAS_CC_PLATFORM
select ARCH_HAS_CURRENT_STACK_POINTER
select ARCH_HAS_DEBUG_VIRTUAL
select ARCH_HAS_DEBUG_VM_PGTABLE
Expand All @@ -33,13 +34,16 @@ config ARM64
select ARCH_HAS_KERNEL_FPU_SUPPORT if KERNEL_MODE_NEON
select ARCH_HAS_KEEPINITRD
select ARCH_HAS_MEMBARRIER_SYNC_CORE
select ARCH_HAS_MEM_ENCRYPT
select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
select ARCH_HAS_PTE_DEVMAP
select ARCH_HAS_PTE_SPECIAL
select ARCH_HAS_SETUP_DMA_OPS
select ARCH_HAS_SET_DIRECT_MAP
select ARCH_HAS_SET_MEMORY
select ARCH_HAS_MEM_ENCRYPT
select ARCH_HAS_FORCE_DMA_UNENCRYPTED
select ARCH_STACKWALK
select ARCH_HAS_STRICT_KERNEL_RWX
select ARCH_HAS_STRICT_MODULE_RWX
Expand Down
12 changes: 12 additions & 0 deletions arch/arm64/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <asm/early_ioremap.h>
#include <asm/alternative.h>
#include <asm/cpufeature.h>
#include <asm/rsi.h>

/*
* Generic IO read/write. These perform native-endian accesses.
Expand Down Expand Up @@ -139,6 +140,10 @@ extern void __memset_io(volatile void __iomem *, int, size_t);
* I/O memory mapping functions.
*/

typedef int (*ioremap_prot_hook_t)(phys_addr_t phys_addr, size_t size,
pgprot_t *prot);
int arm64_ioremap_prot_hook_register(const ioremap_prot_hook_t hook);

#define ioremap_prot ioremap_prot

#define _PAGE_IOREMAP PROT_DEVICE_nGnRE
Expand Down Expand Up @@ -182,4 +187,11 @@ extern bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size,
unsigned long flags);
#define arch_memremap_can_ram_remap arch_memremap_can_ram_remap

static inline bool arm64_is_protected_mmio(phys_addr_t phys_addr, size_t size)
{
if (unlikely(is_realm_world()))
return arm64_rsi_is_protected(phys_addr, size);
return false;
}

#endif /* __ASM_IO_H */
Loading
Loading