[PATCH 01/12] kvm/svm: make nested svm debugging runtime configurable

From: Joerg Roedel
Date: Wed Jul 29 2009 - 08:59:46 EST


Signed-off-by: Joerg Roedel <joerg.roedel@xxxxxxx>
---
arch/x86/kvm/svm.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index b720b02..27d26c3 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -49,11 +49,17 @@ MODULE_LICENSE("GPL");

#define DEBUGCTL_RESERVED_BITS (~(0x3fULL))

-/* Turn on to get debugging output*/
-/* #define NESTED_DEBUG */
+/* Turn on to get debugging output for nested svm */
+#undef NESTED_DEBUG

#ifdef NESTED_DEBUG
-#define nsvm_printk(fmt, args...) printk(KERN_INFO fmt, ## args)
+
+static int nested_dbg;
+module_param(nested_dbg, bool, 0644);
+
+#define nsvm_printk(fmt, args...) \
+ if (nested_dbg) \
+ printk(KERN_INFO fmt, ## args)
#else
#define nsvm_printk(fmt, args...) do {} while(0)
#endif
--
1.6.3.3


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/