kvm: Dump state before panic in KVM exit handlers
authorAndreas Sandberg <andreas@sandberg.pp.se>
Tue, 14 May 2013 13:59:43 +0000 (15:59 +0200)
committerAndreas Sandberg <andreas@sandberg.pp.se>
Tue, 14 May 2013 13:59:43 +0000 (15:59 +0200)
src/cpu/kvm/base.cc

index f087b7b1afc3012ad8f3c377e491bb4a697ae464..7435d43648b114a305a13ff51dab5335a5bdb592 100644 (file)
@@ -735,6 +735,7 @@ BaseKvmCPU::handleKvmExit()
               _kvmRun->internal.suberror);
 
       default:
+        dump();
         panic("KVM: Unexpected exit (exit_reason: %u)\n", _kvmRun->exit_reason);
     }
 }
@@ -764,6 +765,7 @@ BaseKvmCPU::handleKvmExitIRQWindowOpen()
 Tick
 BaseKvmCPU::handleKvmExitUnknown()
 {
+    dump();
     panic("KVM: Unknown error when starting vCPU (hw reason: 0x%llx)\n",
           _kvmRun->hw.hardware_exit_reason);
 }
@@ -771,6 +773,7 @@ BaseKvmCPU::handleKvmExitUnknown()
 Tick
 BaseKvmCPU::handleKvmExitException()
 {
+    dump();
     panic("KVM: Got exception when starting vCPU "
           "(exception: %u, error_code: %u)\n",
           _kvmRun->ex.exception, _kvmRun->ex.error_code);
@@ -779,6 +782,7 @@ BaseKvmCPU::handleKvmExitException()
 Tick
 BaseKvmCPU::handleKvmExitFailEntry()
 {
+    dump();
     panic("KVM: Failed to enter virtualized mode (hw reason: 0x%llx)\n",
           _kvmRun->fail_entry.hardware_entry_failure_reason);
 }