diff mbox

[2/4] pull qemu headers into libkvm

Message ID 1244488224-31171-3-git-send-email-glommer@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Glauber Costa June 8, 2009, 7:10 p.m. UTC
Those headers define qemu specific things like ram_addr_t.
This will allow us to start using them in libkvm.

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 libkvm-all.c         |    2 +-
 libkvm-all.h         |    1 +
 target-i386/libkvm.c |    2 ++
 3 files changed, 4 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/libkvm-all.c b/libkvm-all.c
index dd56498..45679fb 100644
--- a/libkvm-all.c
+++ b/libkvm-all.c
@@ -26,6 +26,7 @@ 
 #error libkvm: userspace and kernel version mismatch
 #endif
 
+#include "sysemu.h"
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdio.h>
@@ -47,7 +48,6 @@ 
 #define DPRINTF(fmt, args...) do {} while (0)
 #endif
 
-#define MIN(x,y) ((x) < (y) ? (x) : (y))
 #define ALIGN(x, y) (((x)+(y)-1) & ~((y)-1))
 
 int kvm_abi = EXPECTED_KVM_API_VERSION;
diff --git a/libkvm-all.h b/libkvm-all.h
index 03b98df..d647ef1 100644
--- a/libkvm-all.h
+++ b/libkvm-all.h
@@ -82,6 +82,7 @@  struct kvm_vcpu_context
 typedef struct kvm_context *kvm_context_t;
 typedef struct kvm_vcpu_context *kvm_vcpu_context_t;
 
+#include "kvm.h"
 int kvm_alloc_kernel_memory(kvm_context_t kvm, unsigned long memory,
 								void **vm_mem);
 int kvm_alloc_userspace_memory(kvm_context_t kvm, unsigned long memory,
diff --git a/target-i386/libkvm.c b/target-i386/libkvm.c
index f88102e..0f4e009 100644
--- a/target-i386/libkvm.c
+++ b/target-i386/libkvm.c
@@ -1,3 +1,5 @@ 
+#include "sysemu.h"
+
 #include "libkvm-all.h"
 #include "libkvm.h"
 #include <errno.h>