Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
bba8857f
Commit
bba8857f
authored
Apr 13, 2021
by
Marc Zyngier
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'kvm-arm64/nvhe-wxn' into kvmarm-master/next
Signed-off-by:
Marc Zyngier
<
maz@kernel.org
>
parents
3b7e56be
c8a4b35f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
17 deletions
+7
-17
arch/arm64/include/asm/sysreg.h
arch/arm64/include/asm/sysreg.h
+4
-3
arch/arm64/kernel/cpu-reset.S
arch/arm64/kernel/cpu-reset.S
+1
-4
arch/arm64/kvm/hyp/nvhe/hyp-init.S
arch/arm64/kvm/hyp/nvhe/hyp-init.S
+2
-10
No files found.
arch/arm64/include/asm/sysreg.h
View file @
bba8857f
...
...
@@ -630,9 +630,6 @@
#define SCTLR_ELx_A (BIT(1))
#define SCTLR_ELx_M (BIT(0))
#define SCTLR_ELx_FLAGS (SCTLR_ELx_M | SCTLR_ELx_A | SCTLR_ELx_C | \
SCTLR_ELx_SA | SCTLR_ELx_I | SCTLR_ELx_IESB)
/* SCTLR_EL2 specific flags. */
#define SCTLR_EL2_RES1 ((BIT(4)) | (BIT(5)) | (BIT(11)) | (BIT(16)) | \
(BIT(18)) | (BIT(22)) | (BIT(23)) | (BIT(28)) | \
...
...
@@ -644,6 +641,10 @@
#define ENDIAN_SET_EL2 0
#endif
#define INIT_SCTLR_EL2_MMU_ON \
(SCTLR_ELx_M | SCTLR_ELx_C | SCTLR_ELx_SA | SCTLR_ELx_I | \
SCTLR_ELx_IESB | SCTLR_ELx_WXN | ENDIAN_SET_EL2 | SCTLR_EL2_RES1)
#define INIT_SCTLR_EL2_MMU_OFF \
(SCTLR_EL2_RES1 | ENDIAN_SET_EL2)
...
...
arch/arm64/kernel/cpu-reset.S
View file @
bba8857f
...
...
@@ -30,10 +30,7 @@
*
flat
identity
mapping
.
*/
SYM_CODE_START
(
__cpu_soft_restart
)
/
*
Clear
sctlr_el1
flags
.
*/
mrs
x12
,
sctlr_el1
mov_q
x13
,
SCTLR_ELx_FLAGS
bic
x12
,
x12
,
x13
mov_q
x12
,
INIT_SCTLR_EL1_MMU_OFF
pre_disable_mmu_workaround
/
*
*
either
disable
EL1
&0
translation
regime
or
disable
EL2
&0
translation
...
...
arch/arm64/kvm/hyp/nvhe/hyp-init.S
View file @
bba8857f
...
...
@@ -122,13 +122,7 @@ alternative_else_nop_endif
tlbi
vmalls12e1
dsb
sy
/
*
*
Preserve
all
the
RES1
bits
while
setting
the
default
flags
,
*
as
well
as
the
EE
bit
on
BE
.
Drop
the
A
flag
since
the
compiler
*
is
allowed
to
generate
unaligned
accesses
.
*/
mov_q
x0
,
(
SCTLR_EL2_RES1
|
(
SCTLR_ELx_FLAGS
&
~
SCTLR_ELx_A
))
CPU_BE
(
orr
x0
,
x0
,
#
SCTLR_ELx_EE
)
mov_q
x0
,
INIT_SCTLR_EL2_MMU_ON
alternative_if
ARM64_HAS_ADDRESS_AUTH
mov_q
x1
,
(
SCTLR_ELx_ENIA
| SCTLR_ELx_ENIB |
\
SCTLR_ELx_ENDA
|
SCTLR_ELx_ENDB
)
...
...
@@ -226,9 +220,7 @@ SYM_CODE_START(__kvm_handle_stub_hvc)
mov
x0
,
xzr
reset
:
/
*
Reset
kvm
back
to
the
hyp
stub
.
*/
mrs
x5
,
sctlr_el2
mov_q
x6
,
SCTLR_ELx_FLAGS
bic
x5
,
x5
,
x6
//
Clear
SCTL_M
and
etc
mov_q
x5
,
INIT_SCTLR_EL2_MMU_OFF
pre_disable_mmu_workaround
msr
sctlr_el2
,
x5
isb
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment