Non-performance critical code is made more awkward by having to always define both "#ifdef KVM" and "if (kvm_allowed)". Define "kvm_allowed = 0" by default. Anthony Ligouri is credited with the idea.
Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- qemu/qemu-kvm.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 5b5c739..f13db08 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -3,6 +3,14 @@ #include "config-host.h" #ifdef USE_KVM + #define KVM_ALLOWED_DEFAULT 1 +#else + #define KVM_ALLOWED_DEFAULT 0 +#endif + +int kvm_allowed = KVM_ALLOWED_DEFAULT; + +#ifdef USE_KVM #include "exec.h" @@ -14,7 +22,6 @@ extern void perror(const char *s); -int kvm_allowed = 1; kvm_context_t kvm_context; static struct kvm_msr_list *kvm_msr_list; static int kvm_has_msr_star; ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel