vmrunkernel: Handle the INTERRUPT_WINDOW exit; print more info on unhandled exits
authorRonald G. Minnich <rminnich@gmail.com>
Tue, 1 Sep 2015 17:40:09 +0000 (10:40 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 2 Nov 2015 23:53:49 +0000 (18:53 -0500)
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tests/vmm/vmrunkernel.c

index 422bff8..f389e5a 100644 (file)
@@ -590,12 +590,18 @@ printf("%p %p %p %p\n", PGSIZE, PGSHIFT, PML1_SHIFT, PML1_PTE_REACH);
                                vmctl.gpa = 0;
                                vmctl.command = REG_ALL;
                                break;
+                       case EXIT_REASON_INTERRUPT_WINDOW:
+                               vmctl.interrupt = 0x80000220;
+                               vmctl.command = RESUME;
+                               break;
                        case EXIT_REASON_HLT:
                                printf("\n================== Guest halted. RIP. =======================\n");
                                quit = 1;
                                break;
                        default:
                                fprintf(stderr, "Don't know how to handle exit %d\n", vmctl.ret_code);
+                               fprintf(stderr, "RIP %p, shutdown 0x%x\n", vmctl.regs.tf_rip, vmctl.shutdown);
+                               showstatus(stderr, &vmctl);
                                quit = 1;
                                break;
                        }