summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/kvm
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/platform/kvm')
-rw-r--r--pkg/sentry/platform/kvm/bluepill_amd64.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/platform/kvm/bluepill_amd64.go b/pkg/sentry/platform/kvm/bluepill_amd64.go
index a2baefb7d..b364e3ef7 100644
--- a/pkg/sentry/platform/kvm/bluepill_amd64.go
+++ b/pkg/sentry/platform/kvm/bluepill_amd64.go
@@ -98,6 +98,7 @@ func bluepillSyscall() {
}
ring0.SaveFloatingPoint(bytePtr(uintptr(regs.Gs_base)))
ring0.Halt()
+ ring0.WriteFS(uintptr(regs.Fs_base)) // Reload host segment.
ring0.LoadFloatingPoint(bytePtr(uintptr(regs.Gs_base)))
}
@@ -114,6 +115,7 @@ func bluepillException(vector ring0.Vector) {
}
ring0.SaveFloatingPoint(bytePtr(uintptr(regs.Gs_base)))
ring0.Halt()
+ ring0.WriteFS(uintptr(regs.Fs_base)) // Reload host segment.
ring0.LoadFloatingPoint(bytePtr(uintptr(regs.Gs_base)))
}