summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/kvm/bluepill.go
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2019-02-28 18:37:34 -0800
committerShentubot <shentubot@google.com>2019-02-28 18:38:34 -0800
commit3b44377eda93137212e6e437b62dcb216566b858 (patch)
tree5270dbf4e618e6cc5421c80a6922e20659fd386f /pkg/sentry/platform/kvm/bluepill.go
parent3851705a73235baa6d153970c95921d17a39d77a (diff)
Fix "-c dbg" build break
Remove allocation from vCPU.die() to save stack space. Closes #131 PiperOrigin-RevId: 236238102 Change-Id: Iafca27a1a3a472d4cb11dcda9a2060e585139d11
Diffstat (limited to 'pkg/sentry/platform/kvm/bluepill.go')
-rw-r--r--pkg/sentry/platform/kvm/bluepill.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/sentry/platform/kvm/bluepill.go b/pkg/sentry/platform/kvm/bluepill.go
index d98ec8377..f24f1c662 100644
--- a/pkg/sentry/platform/kvm/bluepill.go
+++ b/pkg/sentry/platform/kvm/bluepill.go
@@ -49,7 +49,7 @@ var (
//
//go:nosplit
func dieHandler(c *vCPU) {
- throw(c.dieMessage)
+ throw(c.dieState.message)
}
// die is called to set the vCPU up to panic.
@@ -59,17 +59,16 @@ func dieHandler(c *vCPU) {
//go:nosplit
func (c *vCPU) die(context *arch.SignalContext64, msg string) {
// Save the death message, which will be thrown.
- c.dieMessage = msg
+ c.dieState.message = msg
// Reload all registers to have an accurate stack trace when we return
// to host mode. This means that the stack should be unwound correctly.
- var guestRegs userRegs
- if errno := c.getUserRegisters(&guestRegs); errno != 0 {
+ if errno := c.getUserRegisters(&c.dieState.guestRegs); errno != 0 {
throw(msg)
}
// Setup the trampoline.
- dieArchSetup(c, context, &guestRegs)
+ dieArchSetup(c, context, &c.dieState.guestRegs)
}
func init() {