};
-int raise_irq(struct guest_info * info, int irq);
+int v3_raise_irq(struct guest_info * info, int irq);
int hook_irq(struct guest_info * info, int irq);
struct intr_ctrl_ops {
#if 0
// give floppy controller to vm
hook_irq(&vm_info, 6);
-
+#endif
//primary ide
hook_irq(&vm_info, 14);
// secondary ide
hook_irq(&vm_info, 15);
-#endif
+
vm_info.rip = 0xfff0;
vm_info.vm_regs.rsp = 0x0;
//v3_update_time(info, yield_stop - yield_start);
gap = yield_stop - yield_start;
- raise_irq(info, 0);
+ v3_raise_irq(info, 0);
PrintDebug("GeekOS Yield Done (%d cycles)\n", gap);
PrintDebug("SVM Returned: Exit Code: 0x%x \t\t(tsc=%ul)\n",exit_code, (uint_t)info->time_state.guest_tsc);
- if (exit_code < 0x40) {
+ if (exit_code < 0x4f) {
char instr[32];
int ret;
// Dump out the instr stream
if (ret != 32) {
// I think we should inject a GPF into the guest
PrintDebug("Could not read instruction (ret=%d)\n", ret);
- return -1;
- }
+ } else {
- PrintDebug("Instr Stream:\n");
- PrintTraceMemDump(instr, 32);
+ PrintDebug("Instr Stream:\n");
+ PrintTraceMemDump(instr, 32);
+ }
}
info->intr_state.excp_num = 0;
info->intr_state.excp_error_code = 0;
- info->vm_ops.raise_irq = &raise_irq;
+ info->vm_ops.raise_irq = &v3_raise_irq;
}
void set_intr_controller(struct guest_info * info, struct intr_ctrl_ops * ops, void * state) {
}
-int raise_irq(struct guest_info * info, int irq) {
+int v3_raise_irq(struct guest_info * info, int irq) {
// Look up PIC and resend
V3_ASSERT(info);
V3_ASSERT(info->intr_state.controller);