From: Kyle Hale Date: Wed, 22 Jun 2011 23:19:08 +0000 (-0500) Subject: small fixes in Kconfig, cleaned up debugs in swint intercept code X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=57d73771eca20238eff66a02c85659287a7d6b89 small fixes in Kconfig, cleaned up debugs in swint intercept code --- diff --git a/palacios/src/extensions/Kconfig b/palacios/src/extensions/Kconfig index 7a04e6b..e3b83fe 100644 --- a/palacios/src/extensions/Kconfig +++ b/palacios/src/extensions/Kconfig @@ -50,7 +50,7 @@ config EXT_SW_INTERRUPTS help This feature will cause the VMM to intercept the execution of software interrupts (i.e. the INTn instruction) and enable - any INT vector to be hooked + any INT vector to be hooked. Extension name is "swintr_intercept" config DEBUG_EXT_SW_INTERRUPTS bool "Enable debugging of software interrupt interception code" @@ -79,6 +79,7 @@ config EXT_SYSCALL_HIJACK config DEBUG_EXT_SYSCALL_HIJACK bool "Enable Syscall Hijack Debug in Palacios" + depends on EXT_SYSCALL_HIJACK default n help Enable Debugging printouts for syscall hijacking code diff --git a/palacios/src/extensions/ext_sw_intr.c b/palacios/src/extensions/ext_sw_intr.c index ff43f3f..8264260 100644 --- a/palacios/src/extensions/ext_sw_intr.c +++ b/palacios/src/extensions/ext_sw_intr.c @@ -26,6 +26,11 @@ #include +#ifndef V3_CONFIG_DEBUG_EXT_SW_INTERRUPTS +#undef PrintDebug +#define PrintDebug(fmt, args...) +#endif + static int init_swintr_intercept (struct v3_vm_info * vm, v3_cfg_tree_t * cfg, void ** priv_data) { @@ -111,9 +116,7 @@ int v3_handle_swintr (struct guest_info * core) { ret = hook->handler(core, vector, NULL); if (ret == -1) { -#ifdef V3_CONFIG_DEBUG_EXT_SW_INTERRUPTS PrintDebug("V3 SWintr Handler: Error in swintr hook\n"); -#endif return -1; } @@ -127,10 +130,8 @@ int v3_handle_swintr (struct guest_info * core) { int v3_signal_swintr (struct guest_info * core, uint8_t vector) { struct v3_intr_core_state * intr_state = &(core->intr_core_state); -#ifdef V3_CONFIG_DEBUG_EXT_SW_INTERRUPTS PrintDebug("Signaling software interrupt in v3_signal_swintr()\n"); PrintDebug("\tINT vector: %d\n", vector); -#endif intr_state->swintr_posted = 1; intr_state->swintr_vector = vector; @@ -164,10 +165,8 @@ int v3_hook_swintr (struct guest_info * core, static int passthrough_swintr_handler (struct guest_info * core, uint8_t vector, void * priv_data) { -#ifdef V3_CONFIG_DEBUG_EXT_SW_INTERRUPTS PrintDebug("[passthrough_swint_handler] INT vector=%d (guest=0x%p)\n", vector, (void*)core); -#endif return 0; } @@ -180,9 +179,7 @@ int v3_hook_passthrough_swintr (struct guest_info * core, uint8_t vector) { PrintError("guest_swintr_injection: failed to hook swint 0x%x (guest=0x%p)\n", vector, (void*)core); return -1; } else { -#ifdef V3_CONFIG_DEBUG_EXT_SW_INTERRUPTS PrintDebug("guest_swintr_injection: hooked swint 0x%x (guest=0x%p)\n", vector, (void*)core); -#endif return 0; } @@ -191,10 +188,3 @@ int v3_hook_passthrough_swintr (struct guest_info * core, uint8_t vector) { } - - - - - - -