@@ -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;
@@ -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,
@@ -1,3 +1,5 @@
+#include "sysemu.h"
+
#include "libkvm-all.h"
#include "libkvm.h"
#include <errno.h>
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(-)