From: Jack Lange Date: Fri, 24 Apr 2009 00:21:12 +0000 (-0500) Subject: I think I might have fixed the SHUTDOWN bug... X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=18cc68af5caa15264a853167e9d2d885cb79317a I think I might have fixed the SHUTDOWN bug... --- diff --git a/palacios/src/palacios/svm_handler.c b/palacios/src/palacios/svm_handler.c index 5535a6f..5b0b761 100644 --- a/palacios/src/palacios/svm_handler.c +++ b/palacios/src/palacios/svm_handler.c @@ -71,7 +71,8 @@ int v3_handle_svm_exit(struct guest_info * info) { exit_code = guest_ctrl->exit_code; - // PrintDebug("SVM Exit: %s (rip=%p)\n", vmexit_code_to_str(exit_code), (void *)info->rip); + // PrintDebug("SVM Exit: %s (rip=%p) (info1=%p)\n", vmexit_code_to_str(exit_code), + // (void *)(addr_t)info->rip, (void *)(addr_t)guest_ctrl->exit_info1); if ((info->intr_state.irq_pending == 1) && (guest_ctrl->guest_ctrl.V_IRQ == 0)) { @@ -360,7 +361,7 @@ int v3_handle_svm_exit(struct guest_info * info) { } - // Update the low level state + if (v3_excp_pending(info)) { uint_t excp = v3_get_excp_number(info); diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index fb4c5e3..f0befa8 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -294,6 +294,8 @@ int v3_config_devices(struct guest_info * info, struct v3_vm_config * config_ptr + + static struct vm_device * configure_generic(struct guest_info * info, struct v3_vm_config * config_ptr) { PrintDebug("Creating Generic Device\n"); struct vm_device * generic = v3_create_generic(); diff --git a/palacios/src/palacios/vmm_intr.c b/palacios/src/palacios/vmm_intr.c index 953df0e..e29285a 100644 --- a/palacios/src/palacios/vmm_intr.c +++ b/palacios/src/palacios/vmm_intr.c @@ -22,6 +22,7 @@ #include #include +#include #ifndef DEBUG_INTERRUPTS #undef PrintDebug @@ -175,7 +176,13 @@ int v3_raise_irq(struct guest_info * info, int irq) { int v3_intr_pending(struct guest_info * info) { struct v3_intr_state * intr_state = &(info->intr_state); struct intr_controller * ctrl = NULL; + struct rflags * flags = (struct rflags *)&(info->ctrl_regs.rflags); // PrintDebug("[intr_pending]\n"); + + // Check if the guest has interrupts enabled + if (flags->intr == 0) { + return 0; + } list_for_each_entry(ctrl, &(intr_state->controller_list), ctrl_node) { if (ctrl->ctrl_ops->intr_pending(ctrl->priv_data) == 1) {