summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/ring0
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-07-23 23:11:31 +0000
committergVisor bot <gvisor-bot@google.com>2020-07-23 23:11:31 +0000
commit7917a5ff6c9e2ed338fa86d9085429c651c57c1b (patch)
treede41dc9c92a0007a0861e21cb264ec19ae5526e0 /pkg/sentry/platform/ring0
parente360d07a6efec4f867e9fff7f15661cc755be9f9 (diff)
parent4eb3c8c7e59b1f3dd0c0bfc253cd5c8c6067d05d (diff)
Merge release-20200622.1-201-g4eb3c8c7e (automated)
Diffstat (limited to 'pkg/sentry/platform/ring0')
-rw-r--r--pkg/sentry/platform/ring0/kernel_arm64.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/sentry/platform/ring0/kernel_arm64.go b/pkg/sentry/platform/ring0/kernel_arm64.go
index ccacaea6b..fca3a5478 100644
--- a/pkg/sentry/platform/ring0/kernel_arm64.go
+++ b/pkg/sentry/platform/ring0/kernel_arm64.go
@@ -58,7 +58,13 @@ func (c *CPU) SwitchToUser(switchOpts SwitchOpts) (vector Vector) {
regs.Pstate &= ^uint64(UserFlagsClear)
regs.Pstate |= UserFlagsSet
+
+ SetTLS(regs.TPIDR_EL0)
+
kernelExitToEl0()
+
+ regs.TPIDR_EL0 = GetTLS()
+
vector = c.vecCode
// Perform the switch.