* [PATCH] KVM-USER: Make the kvm_allowed flag always defined so we dont need #ifdefs
@ 2007-07-03 11:40 Gregory Haskins
[not found] ` <20070703113945.14761.27191.stgit-5CR4LY5GPkvLDviKLk5550HKjMygAv58XqFh9Ls21Oc@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Gregory Haskins @ 2007-07-03 11:40 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
This is a resend of the patch from the lapic series because Anthony/Avi were
asking about it
------
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 <ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
---
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/
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM-USER: Make the kvm_allowed flag always defined so we dont need #ifdefs
[not found] ` <20070703113945.14761.27191.stgit-5CR4LY5GPkvLDviKLk5550HKjMygAv58XqFh9Ls21Oc@public.gmane.org>
@ 2007-07-03 14:58 ` Avi Kivity
2007-07-03 15:37 ` Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2007-07-03 14:58 UTC (permalink / raw)
To: Gregory Haskins; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Gregory Haskins wrote:
> This is a resend of the patch from the lapic series because Anthony/Avi were
> asking about it
>
>
Ah, so that was that patch. Applied, thanks.
-------------------------------------------------------------------------
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] KVM-USER: Make the kvm_allowed flag always defined so we dont need #ifdefs
[not found] ` <20070703113945.14761.27191.stgit-5CR4LY5GPkvLDviKLk5550HKjMygAv58XqFh9Ls21Oc@public.gmane.org>
2007-07-03 14:58 ` Avi Kivity
@ 2007-07-03 15:37 ` Anthony Liguori
1 sibling, 0 replies; 3+ messages in thread
From: Anthony Liguori @ 2007-07-03 15:37 UTC (permalink / raw)
To: Gregory Haskins; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Gregory Haskins wrote:
> This is a resend of the patch from the lapic series because Anthony/Avi were
> asking about it
>
Thanks Gregory!
Regards,
Anthony Liguori
> ------
>
> 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 <ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
> ---
>
> 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-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
>
-------------------------------------------------------------------------
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-03 15:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-03 11:40 [PATCH] KVM-USER: Make the kvm_allowed flag always defined so we dont need #ifdefs Gregory Haskins
[not found] ` <20070703113945.14761.27191.stgit-5CR4LY5GPkvLDviKLk5550HKjMygAv58XqFh9Ls21Oc@public.gmane.org>
2007-07-03 14:58 ` Avi Kivity
2007-07-03 15:37 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox