xref: /qemu/docs/system/arm/emulation.rst (revision afbcca0ea41f109c2a5eae308d636dfcf98eb82b)
1a0a6754bSAlex Bennée.. _Arm Emulation:
2a0a6754bSAlex Bennée
3741292faSPeter MaydellA-profile CPU architecture support
4741292faSPeter Maydell==================================
5741292faSPeter Maydell
6c36fb96dSPierrick BouvierQEMU's TCG emulation includes support for the Armv5, Armv6, Armv7,
7c36fb96dSPierrick BouvierArmv8 and Armv9 versions of the A-profile architecture. It also has support for
8741292faSPeter Maydellthe following architecture extensions:
9741292faSPeter Maydell
10741292faSPeter Maydell- FEAT_AA32BF16 (AArch32 BFloat16 instructions)
11bc980d66SPeter Maydell- FEAT_AA32EL0 (Support for AArch32 at EL0)
12bc980d66SPeter Maydell- FEAT_AA32EL1 (Support for AArch32 at EL1)
13bc980d66SPeter Maydell- FEAT_AA32EL2 (Support for AArch32 at EL2)
14bc980d66SPeter Maydell- FEAT_AA32EL3 (Support for AArch32 at EL3)
15741292faSPeter Maydell- FEAT_AA32HPD (AArch32 hierarchical permission disables)
16741292faSPeter Maydell- FEAT_AA32I8MM (AArch32 Int8 matrix multiplication instructions)
17bc980d66SPeter Maydell- FEAT_AA64EL0 (Support for AArch64 at EL0)
18bc980d66SPeter Maydell- FEAT_AA64EL1 (Support for AArch64 at EL1)
19bc980d66SPeter Maydell- FEAT_AA64EL2 (Support for AArch64 at EL2)
20bc980d66SPeter Maydell- FEAT_AA64EL3 (Support for AArch64 at EL3)
21bc980d66SPeter Maydell- FEAT_AdvSIMD (Advanced SIMD Extension)
22741292faSPeter Maydell- FEAT_AES (AESD and AESE instructions)
23d38a57a3SPeter Maydell- FEAT_AFP (Alternate floating-point behavior)
24bc980d66SPeter Maydell- FEAT_Armv9_Crypto (Armv9 Cryptographic Extension)
25bc980d66SPeter Maydell- FEAT_ASID16 (16 bit ASID)
2675d08a40SPeter Maydell- FEAT_BBM at level 2 (Translation table break-before-make levels)
27741292faSPeter Maydell- FEAT_BF16 (AArch64 BFloat16 instructions)
28741292faSPeter Maydell- FEAT_BTI (Branch Target Identification)
29bc980d66SPeter Maydell- FEAT_CCIDX (Extended cache index)
30374cdc8eSGustavo Romero- FEAT_CMOW (Control for cache maintenance permission)
319e771a2fSAlex Bennée- FEAT_CRC32 (CRC32 instructions)
32bc980d66SPeter Maydell- FEAT_Crypto (Cryptographic Extension)
3374b17e16SRichard Henderson- FEAT_CSV2 (Cache speculation variant 2)
347cb1e618SRichard Henderson- FEAT_CSV2_1p1 (Cache speculation variant 2, version 1.1)
357cb1e618SRichard Henderson- FEAT_CSV2_1p2 (Cache speculation variant 2, version 1.2)
367cb1e618SRichard Henderson- FEAT_CSV2_2 (Cache speculation variant 2, version 2)
37e1973951SPeter Maydell- FEAT_CSV2_3 (Cache speculation variant 2, version 3)
383082b86bSRichard Henderson- FEAT_CSV3 (Cache speculation variant 3)
396d965019SRichard Henderson- FEAT_DGH (Data gathering hint)
40741292faSPeter Maydell- FEAT_DIT (Data Independent Timing instructions)
41e8319a32SPierrick Bouvier- FEAT_DoubleLock (Double Lock)
42741292faSPeter Maydell- FEAT_DPB (DC CVAP instruction)
43bc980d66SPeter Maydell- FEAT_DPB2 (DC CVADP instruction)
44bc980d66SPeter Maydell- FEAT_Debugv8p1 (Debug with VHE)
45033a4f15SRichard Henderson- FEAT_Debugv8p2 (Debug changes for v8.2)
468fc756b6SRichard Henderson- FEAT_Debugv8p4 (Debug changes for v8.4)
4702ff2addSGustavo Romero- FEAT_Debugv8p8 (Debug changes for v8.8)
48741292faSPeter Maydell- FEAT_DotProd (Advanced SIMD dot product instructions)
497ac61020SPeter Maydell- FEAT_DoubleFault (Double Fault Extension)
50e4c93e44SPeter Maydell- FEAT_E0PD (Preventing EL0 access to halves of address maps)
515d1187b3SPeter Maydell- FEAT_EBF16 (AArch64 Extended BFloat16 instructions)
52c10a9a51SPeter Maydell- FEAT_ECV (Enhanced Counter Virtualization)
53bc980d66SPeter Maydell- FEAT_EL0 (Support for execution at EL0)
54bc980d66SPeter Maydell- FEAT_EL1 (Support for execution at EL1)
55bc980d66SPeter Maydell- FEAT_EL2 (Support for execution at EL2)
56bc980d66SPeter Maydell- FEAT_EL3 (Support for execution at EL3)
57c3ccd566SAaron Lindsay- FEAT_EPAC (Enhanced pointer authentication)
5874360f35SPeter Maydell- FEAT_ETS2 (Enhanced Translation Synchronization)
5941654f12SPeter Maydell- FEAT_EVT (Enhanced Virtualization Traps)
60bc980d66SPeter Maydell- FEAT_F32MM (Single-precision Matrix Multiplication)
61bc980d66SPeter Maydell- FEAT_F64MM (Double-precision Matrix Multiplication)
62741292faSPeter Maydell- FEAT_FCMA (Floating-point complex number instructions)
63bb18151dSPeter Maydell- FEAT_FGT (Fine-Grained Traps)
64741292faSPeter Maydell- FEAT_FHM (Floating-point half-precision multiplication instructions)
65bc980d66SPeter Maydell- FEAT_FP (Floating Point extensions)
66741292faSPeter Maydell- FEAT_FP16 (Half-precision floating-point data processing)
678a69a423SAaron Lindsay- FEAT_FPAC (Faulting on AUT* instructions)
688a69a423SAaron Lindsay- FEAT_FPACCOMBINE (Faulting on combined pointer authentication instructions)
69663163f0SPeter Maydell- FEAT_FPACC_SPEC (Speculative behavior of combined pointer authentication instructions)
70741292faSPeter Maydell- FEAT_FRINTTS (Floating-point to integer instructions)
71741292faSPeter Maydell- FEAT_FlagM (Flag manipulation instructions v2)
72741292faSPeter Maydell- FEAT_FlagM2 (Enhancements to flag manipulation instructions)
73915f6284SPeter Maydell- FEAT_GTG (Guest translation granule size)
7471943a1eSRichard Henderson- FEAT_HAFDBS (Hardware management of the access flag and dirty bit state)
753039b090SPeter Maydell- FEAT_HBC (Hinted conditional branches)
7695d0f1d8SPeter Maydell- FEAT_HCX (Support for the HCRX_EL2 register)
77741292faSPeter Maydell- FEAT_HPDS (Hierarchical permission disables)
78df9a3917SRichard Henderson- FEAT_HPDS2 (Translation table page-based hardware attributes)
793d80bbf1SPeter Maydell- FEAT_HPMN0 (Setting of MDCR_EL2.HPMN to zero)
80741292faSPeter Maydell- FEAT_I8MM (AArch64 Int8 matrix multiplication instructions)
8175662f36SPeter Maydell- FEAT_IDST (ID space trap handling)
82880cd10eSRichard Henderson- FEAT_IESB (Implicit error synchronization event)
83741292faSPeter Maydell- FEAT_JSCVT (JavaScript conversion instructions)
84741292faSPeter Maydell- FEAT_LOR (Limited ordering regions)
857a928f43SRichard Henderson- FEAT_LPA (Large Physical Address space)
86ef56c242SRichard Henderson- FEAT_LPA2 (Large Physical and virtual Address space v2)
87741292faSPeter Maydell- FEAT_LRCPC (Load-acquire RCpc instructions)
88741292faSPeter Maydell- FEAT_LRCPC2 (Load-acquire RCpc instructions v2)
89741292faSPeter Maydell- FEAT_LSE (Large System Extensions)
9059b6b42cSRichard Henderson- FEAT_LSE2 (Large System Extensions v2)
910af312b6SRichard Henderson- FEAT_LVA (Large Virtual Address space)
92bc980d66SPeter Maydell- FEAT_MixedEnd (Mixed-endian support)
9375c1f8d1SPierrick Bouvier- FEAT_MixedEndEL0 (Mixed-endian support at EL0)
94706a92fbSPeter Maydell- FEAT_MOPS (Standardization of memory operations)
95741292faSPeter Maydell- FEAT_MTE (Memory Tagging Extension)
96741292faSPeter Maydell- FEAT_MTE2 (Memory Tagging Extension)
9786f0d4c7SPeter Collingbourne- FEAT_MTE3 (MTE Asymmetric Fault Handling)
98bc980d66SPeter Maydell- FEAT_MTE_ASYM_FAULT (Memory tagging asymmetric faults)
997ddaf0eaSPierrick Bouvier- FEAT_MTE_ASYNC (Asynchronous reporting of Tag Check Fault)
10014a16403SJinjie Ruan- FEAT_NMI (Non-maskable Interrupt)
1011274a47fSPeter Maydell- FEAT_NV (Nested Virtualization)
102e2862554SPeter Maydell- FEAT_NV2 (Enhanced nested virtualization support)
103399e5e71SRichard Henderson- FEAT_PACIMP (Pointer authentication - IMPLEMENTATION DEFINED algorithm)
104399e5e71SRichard Henderson- FEAT_PACQARMA3 (Pointer authentication - QARMA3 algorithm)
105399e5e71SRichard Henderson- FEAT_PACQARMA5 (Pointer authentication - QARMA5 algorithm)
106741292faSPeter Maydell- FEAT_PAN (Privileged access never)
107741292faSPeter Maydell- FEAT_PAN2 (AT S1E1R and AT S1E1W instruction variants affected by PSTATE.PAN)
108dd17143fSPeter Maydell- FEAT_PAN3 (Support for SCTLR_ELx.EPAN)
109741292faSPeter Maydell- FEAT_PAuth (Pointer authentication)
110eb12e929SMichael Tokarev- FEAT_PAuth2 (Enhancements to pointer authentication)
111741292faSPeter Maydell- FEAT_PMULL (PMULL, PMULL2 instructions)
112bc980d66SPeter Maydell- FEAT_PMUv3 (PMU extension version 3)
113741292faSPeter Maydell- FEAT_PMUv3p1 (PMU Extensions v3.1)
114741292faSPeter Maydell- FEAT_PMUv3p4 (PMU Extensions v3.4)
115e31e0f56SPeter Maydell- FEAT_PMUv3p5 (PMU Extensions v3.5)
116e95c74c5SRichard Henderson- FEAT_RAS (Reliability, availability, and serviceability)
117d507bc3bSPeter Maydell- FEAT_RASv1p1 (RAS Extension v1.1)
118741292faSPeter Maydell- FEAT_RDM (Advanced SIMD rounding double multiply accumulate instructions)
11957223a4cSRichard Henderson- FEAT_RME (Realm Management Extension) (NB: support status in QEMU is experimental)
120741292faSPeter Maydell- FEAT_RNG (Random number generator)
121*b0bf3774SPeter Maydell- FEAT_RPRES (Increased precision of FRECPE and FRSQRTE)
122e04bf5a7SPeter Maydell- FEAT_S2FWB (Stage 2 forced Write-Back)
123741292faSPeter Maydell- FEAT_SB (Speculation Barrier)
124741292faSPeter Maydell- FEAT_SEL2 (Secure EL2)
125741292faSPeter Maydell- FEAT_SHA1 (SHA1 instructions)
126741292faSPeter Maydell- FEAT_SHA256 (SHA256 instructions)
127741292faSPeter Maydell- FEAT_SHA3 (Advanced SIMD SHA3 instructions)
128741292faSPeter Maydell- FEAT_SHA512 (Advanced SIMD SHA512 instructions)
129741292faSPeter Maydell- FEAT_SM3 (Advanced SIMD SM3 instructions)
130741292faSPeter Maydell- FEAT_SM4 (Advanced SIMD SM4 instructions)
13178cb9776SRichard Henderson- FEAT_SME (Scalable Matrix Extension)
13278cb9776SRichard Henderson- FEAT_SME_FA64 (Full A64 instruction set in Streaming SVE mode)
13378cb9776SRichard Henderson- FEAT_SME_F64F64 (Double-precision floating-point outer product instructions)
13478cb9776SRichard Henderson- FEAT_SME_I16I64 (16-bit to 64-bit integer widening outer product instructions)
135bc980d66SPeter Maydell- FEAT_SVE (Scalable Vector Extension)
136bc980d66SPeter Maydell- FEAT_SVE_AES (Scalable Vector AES instructions)
137bc980d66SPeter Maydell- FEAT_SVE_BitPerm (Scalable Vector Bit Permutes instructions)
138bc980d66SPeter Maydell- FEAT_SVE_PMULL128 (Scalable Vector PMULL instructions)
139bc980d66SPeter Maydell- FEAT_SVE_SHA3 (Scalable Vector SHA3 instructions)
140bc980d66SPeter Maydell- FEAT_SVE_SM4 (Scalable Vector SM4 instructions)
141bc980d66SPeter Maydell- FEAT_SVE2 (Scalable Vector Extension version 2)
142741292faSPeter Maydell- FEAT_SPECRES (Speculation restriction instructions)
143741292faSPeter Maydell- FEAT_SSBS (Speculative Store Bypass Safe)
1444fc5ec4cSPierrick Bouvier- FEAT_SSBS2 (MRS and MSR instructions for SSBS version 2)
145bc980d66SPeter Maydell- FEAT_TGran16K (Support for 16KB memory translation granule size at stage 1)
146bc980d66SPeter Maydell- FEAT_TGran4K (Support for 4KB memory translation granule size at stage 1)
147bc980d66SPeter Maydell- FEAT_TGran64K (Support for 64KB memory translation granule size at stage 1)
1489cd0c0deSRichard Henderson- FEAT_TIDCP1 (EL0 use of IMPLEMENTATION DEFINED functionality)
149741292faSPeter Maydell- FEAT_TLBIOS (TLB invalidate instructions in Outer Shareable domain)
150741292faSPeter Maydell- FEAT_TLBIRANGE (TLB invalidate range instructions)
151741292faSPeter Maydell- FEAT_TTCNP (Translation table Common not private translations)
152f81c60c2SPeter Maydell- FEAT_TTL (Translation Table Level)
153741292faSPeter Maydell- FEAT_TTST (Small translation tables)
154741292faSPeter Maydell- FEAT_UAO (Unprivileged Access Override control)
155741292faSPeter Maydell- FEAT_VHE (Virtualization Host Extensions)
156741292faSPeter Maydell- FEAT_VMID16 (16-bit VMID)
157a96edb68SPeter Maydell- FEAT_WFxT (WFE and WFI instructions with timeout)
158741292faSPeter Maydell- FEAT_XNX (Translation table stage 2 Unprivileged Execute-never)
15919db1d4dSManos Pitsidianakis- FEAT_XS (XS attribute)
160741292faSPeter Maydell
161741292faSPeter MaydellFor information on the specifics of these extensions, please refer
162c36fb96dSPierrick Bouvierto the `Arm Architecture Reference Manual for A-profile architecture
163741292faSPeter Maydell<https://developer.arm.com/documentation/ddi0487/latest>`_.
164741292faSPeter Maydell
165741292faSPeter MaydellWhen a specific named CPU is being emulated, only those features which
166741292faSPeter Maydellare present in hardware for that CPU are emulated. (If a feature is
167741292faSPeter Maydellnot in the list above then it is not supported, even if the real
168741292faSPeter Maydellhardware should have it.) The ``max`` CPU enables all features.
169741292faSPeter Maydell
170741292faSPeter MaydellR-profile CPU architecture support
171741292faSPeter Maydell==================================
172741292faSPeter Maydell
173741292faSPeter MaydellQEMU's TCG emulation support for R-profile CPUs is currently limited.
174741292faSPeter MaydellWe emulate only the Cortex-R5 and Cortex-R5F CPUs.
175741292faSPeter Maydell
176741292faSPeter MaydellM-profile CPU architecture support
177741292faSPeter Maydell==================================
178741292faSPeter Maydell
179741292faSPeter MaydellQEMU's TCG emulation includes support for Armv6-M, Armv7-M, Armv8-M, and
180741292faSPeter MaydellArmv8.1-M versions of the M-profile architucture.  It also has support
181741292faSPeter Maydellfor the following architecture extensions:
182741292faSPeter Maydell
183741292faSPeter Maydell- FP (Floating-point Extension)
184741292faSPeter Maydell- FPCXT (FPCXT access instructions)
185741292faSPeter Maydell- HP (Half-precision floating-point instructions)
186741292faSPeter Maydell- LOB (Low Overhead loops and Branch future)
187741292faSPeter Maydell- M (Main Extension)
188741292faSPeter Maydell- MPU (Memory Protection Unit Extension)
189741292faSPeter Maydell- PXN (Privileged Execute Never)
190741292faSPeter Maydell- RAS (Reliability, Serviceability and Availability): "minimum RAS Extension" only
191741292faSPeter Maydell- S (Security Extension)
192741292faSPeter Maydell- ST (System Timer Extension)
193741292faSPeter Maydell
194741292faSPeter MaydellFor information on the specifics of these extensions, please refer
195741292faSPeter Maydellto the `Armv8-M Arm Architecture Reference Manual
196741292faSPeter Maydell<https://developer.arm.com/documentation/ddi0553/latest>`_.
197741292faSPeter Maydell
198741292faSPeter MaydellWhen a specific named CPU is being emulated, only those features which
199741292faSPeter Maydellare present in hardware for that CPU are emulated. (If a feature is
200741292faSPeter Maydellnot in the list above then it is not supported, even if the real
201741292faSPeter Maydellhardware should have it.) There is no equivalent of the ``max`` CPU for
202741292faSPeter MaydellM-profile.
203