From de68e1d8c437e6234f5e413d7cad6f892a4452d3 Mon Sep 17 00:00:00 2001 From: Bin Lu Date: Thu, 20 Feb 2020 01:12:03 -0500 Subject: Code Clean:Move getUserRegisters into dieArchSetup() and other small changes. Consistent with QEMU, getUserRegisters() should be an arch-specific function. So, it should be called in dieArchSetup(). With this patch and the pagetable/pcid patch, the kvm modules on Arm64 can be built successfully. Signed-off-by: Bin Lu --- pkg/sentry/platform/kvm/bluepill.go | 6 ------ 1 file changed, 6 deletions(-) (limited to 'pkg/sentry/platform/kvm/bluepill.go') diff --git a/pkg/sentry/platform/kvm/bluepill.go b/pkg/sentry/platform/kvm/bluepill.go index 35cd55fef..4b23f7803 100644 --- a/pkg/sentry/platform/kvm/bluepill.go +++ b/pkg/sentry/platform/kvm/bluepill.go @@ -81,12 +81,6 @@ func (c *vCPU) die(context *arch.SignalContext64, msg string) { // Save the death message, which will be thrown. 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. - if errno := c.getUserRegisters(&c.dieState.guestRegs); errno != 0 { - throw(msg) - } - // Setup the trampoline. dieArchSetup(c, context, &c.dieState.guestRegs) } -- cgit v1.2.3