Skip to content

Commit c9b012e

Browse files
committed
Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 updates from Will Deacon: "The big highlight is support for the Scalable Vector Extension (SVE) which required extensive ABI work to ensure we don't break existing applications by blowing away their signal stack with the rather large new vector context (<= 2 kbit per vector register). There's further work to be done optimising things like exception return, but the ABI is solid now. Much of the line count comes from some new PMU drivers we have, but they're pretty self-contained and I suspect we'll have more of them in future. Plenty of acronym soup here: - initial support for the Scalable Vector Extension (SVE) - improved handling for SError interrupts (required to handle RAS events) - enable GCC support for 128-bit integer types - remove kernel text addresses from backtraces and register dumps - use of WFE to implement long delay()s - ACPI IORT updates from Lorenzo Pieralisi - perf PMU driver for the Statistical Profiling Extension (SPE) - perf PMU driver for Hisilicon's system PMUs - misc cleanups and non-critical fixes" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (97 commits) arm64: Make ARMV8_DEPRECATED depend on SYSCTL arm64: Implement __lshrti3 library function arm64: support __int128 on gcc 5+ arm64/sve: Add documentation arm64/sve: Detect SVE and activate runtime support arm64/sve: KVM: Hide SVE from CPU features exposed to guests arm64/sve: KVM: Treat guest SVE use as undefined instruction execution arm64/sve: KVM: Prevent guests from using SVE arm64/sve: Add sysctl to set the default vector length for new processes arm64/sve: Add prctl controls for userspace vector length management arm64/sve: ptrace and ELF coredump support arm64/sve: Preserve SVE registers around EFI runtime service calls arm64/sve: Preserve SVE registers around kernel-mode NEON use arm64/sve: Probe SVE capabilities and usable vector lengths arm64: cpufeature: Move sys_caps_initialised declarations arm64/sve: Backend logic for setting the vector length arm64/sve: Signal handling support arm64/sve: Support vector length resetting for new processes arm64/sve: Core task context handling arm64/sve: Low-level CPU setup ...
2 parents b293fca + 6cfa7cc commit c9b012e

97 files changed

Lines changed: 7399 additions & 601 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/arm64/cpu-feature-registers.txt‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,20 @@ infrastructure:
110110
x--------------------------------------------------x
111111
| Name | bits | visible |
112112
|--------------------------------------------------|
113-
| RES0 | [63-32] | n |
113+
| RES0 | [63-48] | n |
114+
|--------------------------------------------------|
115+
| DP | [47-44] | y |
116+
|--------------------------------------------------|
117+
| SM4 | [43-40] | y |
118+
|--------------------------------------------------|
119+
| SM3 | [39-36] | y |
120+
|--------------------------------------------------|
121+
| SHA3 | [35-32] | y |
114122
|--------------------------------------------------|
115123
| RDM | [31-28] | y |
116124
|--------------------------------------------------|
125+
| RES0 | [27-24] | n |
126+
|--------------------------------------------------|
117127
| ATOMICS | [23-20] | y |
118128
|--------------------------------------------------|
119129
| CRC32 | [19-16] | y |
@@ -132,7 +142,11 @@ infrastructure:
132142
x--------------------------------------------------x
133143
| Name | bits | visible |
134144
|--------------------------------------------------|
135-
| RES0 | [63-28] | n |
145+
| RES0 | [63-36] | n |
146+
|--------------------------------------------------|
147+
| SVE | [35-32] | y |
148+
|--------------------------------------------------|
149+
| RES0 | [31-28] | n |
136150
|--------------------------------------------------|
137151
| GIC | [27-24] | n |
138152
|--------------------------------------------------|

‎Documentation/arm64/elf_hwcaps.txt‎

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
ARM64 ELF hwcaps
2+
================
3+
4+
This document describes the usage and semantics of the arm64 ELF hwcaps.
5+
6+
7+
1. Introduction
8+
---------------
9+
10+
Some hardware or software features are only available on some CPU
11+
implementations, and/or with certain kernel configurations, but have no
12+
architected discovery mechanism available to userspace code at EL0. The
13+
kernel exposes the presence of these features to userspace through a set
14+
of flags called hwcaps, exposed in the auxilliary vector.
15+
16+
Userspace software can test for features by acquiring the AT_HWCAP entry
17+
of the auxilliary vector, and testing whether the relevant flags are
18+
set, e.g.
19+
20+
bool floating_point_is_present(void)
21+
{
22+
unsigned long hwcaps = getauxval(AT_HWCAP);
23+
if (hwcaps & HWCAP_FP)
24+
return true;
25+
26+
return false;
27+
}
28+
29+
Where software relies on a feature described by a hwcap, it should check
30+
the relevant hwcap flag to verify that the feature is present before
31+
attempting to make use of the feature.
32+
33+
Features cannot be probed reliably through other means. When a feature
34+
is not available, attempting to use it may result in unpredictable
35+
behaviour, and is not guaranteed to result in any reliable indication
36+
that the feature is unavailable, such as a SIGILL.
37+
38+
39+
2. Interpretation of hwcaps
40+
---------------------------
41+
42+
The majority of hwcaps are intended to indicate the presence of features
43+
which are described by architected ID registers inaccessible to
44+
userspace code at EL0. These hwcaps are defined in terms of ID register
45+
fields, and should be interpreted with reference to the definition of
46+
these fields in the ARM Architecture Reference Manual (ARM ARM).
47+
48+
Such hwcaps are described below in the form:
49+
50+
Functionality implied by idreg.field == val.
51+
52+
Such hwcaps indicate the availability of functionality that the ARM ARM
53+
defines as being present when idreg.field has value val, but do not
54+
indicate that idreg.field is precisely equal to val, nor do they
55+
indicate the absence of functionality implied by other values of
56+
idreg.field.
57+
58+
Other hwcaps may indicate the presence of features which cannot be
59+
described by ID registers alone. These may be described without
60+
reference to ID registers, and may refer to other documentation.
61+
62+
63+
3. The hwcaps exposed in AT_HWCAP
64+
---------------------------------
65+
66+
HWCAP_FP
67+
68+
Functionality implied by ID_AA64PFR0_EL1.FP == 0b0000.
69+
70+
HWCAP_ASIMD
71+
72+
Functionality implied by ID_AA64PFR0_EL1.AdvSIMD == 0b0000.
73+
74+
HWCAP_EVTSTRM
75+
76+
The generic timer is configured to generate events at a frequency of
77+
approximately 100KHz.
78+
79+
HWCAP_AES
80+
81+
Functionality implied by ID_AA64ISAR1_EL1.AES == 0b0001.
82+
83+
HWCAP_PMULL
84+
85+
Functionality implied by ID_AA64ISAR1_EL1.AES == 0b0010.
86+
87+
HWCAP_SHA1
88+
89+
Functionality implied by ID_AA64ISAR0_EL1.SHA1 == 0b0001.
90+
91+
HWCAP_SHA2
92+
93+
Functionality implied by ID_AA64ISAR0_EL1.SHA2 == 0b0001.
94+
95+
HWCAP_CRC32
96+
97+
Functionality implied by ID_AA64ISAR0_EL1.CRC32 == 0b0001.
98+
99+
HWCAP_ATOMICS
100+
101+
Functionality implied by ID_AA64ISAR0_EL1.Atomic == 0b0010.
102+
103+
HWCAP_FPHP
104+
105+
Functionality implied by ID_AA64PFR0_EL1.FP == 0b0001.
106+
107+
HWCAP_ASIMDHP
108+
109+
Functionality implied by ID_AA64PFR0_EL1.AdvSIMD == 0b0001.
110+
111+
HWCAP_CPUID
112+
113+
EL0 access to certain ID registers is available, to the extent
114+
described by Documentation/arm64/cpu-feature-registers.txt.
115+
116+
These ID registers may imply the availability of features.
117+
118+
HWCAP_ASIMDRDM
119+
120+
Functionality implied by ID_AA64ISAR0_EL1.RDM == 0b0001.
121+
122+
HWCAP_JSCVT
123+
124+
Functionality implied by ID_AA64ISAR1_EL1.JSCVT == 0b0001.
125+
126+
HWCAP_FCMA
127+
128+
Functionality implied by ID_AA64ISAR1_EL1.FCMA == 0b0001.
129+
130+
HWCAP_LRCPC
131+
132+
Functionality implied by ID_AA64ISAR1_EL1.LRCPC == 0b0001.
133+
134+
HWCAP_DCPOP
135+
136+
Functionality implied by ID_AA64ISAR1_EL1.DPB == 0b0001.
137+
138+
HWCAP_SHA3
139+
140+
Functionality implied by ID_AA64ISAR0_EL1.SHA3 == 0b0001.
141+
142+
HWCAP_SM3
143+
144+
Functionality implied by ID_AA64ISAR0_EL1.SM3 == 0b0001.
145+
146+
HWCAP_SM4
147+
148+
Functionality implied by ID_AA64ISAR0_EL1.SM4 == 0b0001.
149+
150+
HWCAP_ASIMDDP
151+
152+
Functionality implied by ID_AA64ISAR0_EL1.DP == 0b0001.
153+
154+
HWCAP_SHA512
155+
156+
Functionality implied by ID_AA64ISAR0_EL1.SHA2 == 0b0002.
157+
158+
HWCAP_SVE
159+
160+
Functionality implied by ID_AA64PFR0_EL1.SVE == 0b0001.

‎Documentation/arm64/memory.txt‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ Translation table lookup with 64KB pages:
8686
+-------------------------------------------------> [63] TTBR0/1
8787

8888

89-
When using KVM, the hypervisor maps kernel pages in EL2, at a fixed
90-
offset from the kernel VA (top 24bits of the kernel VA set to zero):
89+
When using KVM without the Virtualization Host Extensions, the hypervisor
90+
maps kernel pages in EL2 at a fixed offset from the kernel VA. See the
91+
kern_hyp_va macro for more details.
9192

92-
Start End Size Use
93-
-----------------------------------------------------------------------
94-
0000004000000000 0000007fffffffff 256GB kernel objects mapped in HYP
93+
When using KVM with the Virtualization Host Extensions, no additional
94+
mappings are created, since the host kernel runs directly in EL2.

0 commit comments

Comments
 (0)