diff mbox

[1/8] Provide KVMState definition outside CONFIG_KVM

Message ID 1247058542-31211-2-git-send-email-glommer@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Glauber Costa July 8, 2009, 1:08 p.m. UTC
This will allow qemu-kvm to refer to the structure, since qemu-kvm relies
on USE_KVM, not CONFIG_KVM. This should be sent to qemu.git as well

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 kvm.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Comments

Avi Kivity July 8, 2009, 1:22 p.m. UTC | #1
On 07/08/2009 04:08 PM, Glauber Costa wrote:
> This will allow qemu-kvm to refer to the structure, since qemu-kvm relies
> on USE_KVM, not CONFIG_KVM. This should be sent to qemu.git as well
>
> Signed-off-by: Glauber Costa<glommer@redhat.com>
> ---
>   kvm.h |    6 +++---
>   1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/kvm.h b/kvm.h
> index d9723d7..7648c49 100644
> --- a/kvm.h
> +++ b/kvm.h
> @@ -18,6 +18,9 @@
>   #include "sys-queue.h"
>   #include "libkvm-all.h"
>
> +struct KVMState;
> +typedef struct KVMState KVMState;
> +
>   #ifdef KVM_UPSTREAM
>
>   #ifdef CONFIG_KVM
> @@ -65,9 +68,6 @@ int kvm_update_guest_debug(CPUState *env, unsigned long reinject_trap);
>
>   /* internal API */
>
> -struct KVMState;
> -typedef struct KVMState KVMState;
> -
>   int kvm_ioctl(KVMState *s, int type, ...);
>
>   int kvm_vm_ioctl(KVMState *s, int type, ...);
>    

Not really needed - we can duplicate these two lines where we use them.  
Since they'll later go away, we avoid some (minimal) churn.
Avi Kivity July 8, 2009, 1:23 p.m. UTC | #2
On 07/08/2009 04:08 PM, Glauber Costa wrote:
> Big plan to start sharing code with upstream.
>
>    

This patch is very brittle - if qemu-kvm.c changes, it won't apply.  I 
suggest to simply add #include "qemu-kvm.c" and remove it from the 
makefile.  After I apply it, I'll perform the #include and remove 
qemu-kvm.c.
Glauber Costa July 8, 2009, 1:52 p.m. UTC | #3
On Wed, Jul 08, 2009 at 04:23:39PM +0300, Avi Kivity wrote:
> On 07/08/2009 04:08 PM, Glauber Costa wrote:
>> Big plan to start sharing code with upstream.
>>
>>    
>
> This patch is very brittle - if qemu-kvm.c changes, it won't apply.  I  
> suggest to simply add #include "qemu-kvm.c" and remove it from the  
> makefile.  After I apply it, I'll perform the #include and remove  
> qemu-kvm.c.
ok.

I'll do the same with kvm.c

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/kvm.h b/kvm.h
index d9723d7..7648c49 100644
--- a/kvm.h
+++ b/kvm.h
@@ -18,6 +18,9 @@ 
 #include "sys-queue.h"
 #include "libkvm-all.h"
 
+struct KVMState;
+typedef struct KVMState KVMState;
+
 #ifdef KVM_UPSTREAM
 
 #ifdef CONFIG_KVM
@@ -65,9 +68,6 @@  int kvm_update_guest_debug(CPUState *env, unsigned long reinject_trap);
 
 /* internal API */
 
-struct KVMState;
-typedef struct KVMState KVMState;
-
 int kvm_ioctl(KVMState *s, int type, ...);
 
 int kvm_vm_ioctl(KVMState *s, int type, ...);