From patchwork Mon Jun 8 19:10:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 28687 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n58JAbnB019633 for ; Mon, 8 Jun 2009 19:10:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752038AbZFHTK2 (ORCPT ); Mon, 8 Jun 2009 15:10:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751638AbZFHTK0 (ORCPT ); Mon, 8 Jun 2009 15:10:26 -0400 Received: from mx2.redhat.com ([66.187.237.31]:49068 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751377AbZFHTKY (ORCPT ); Mon, 8 Jun 2009 15:10:24 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n58JARIx025653 for ; Mon, 8 Jun 2009 15:10:27 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n58JAQAa025705; Mon, 8 Jun 2009 15:10:26 -0400 Received: from localhost.localdomain (virtlab1.virt.bos.redhat.com [10.16.72.21]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n58JAPS4029961; Mon, 8 Jun 2009 15:10:25 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com Subject: [PATCH 2/4] pull qemu headers into libkvm Date: Mon, 8 Jun 2009 15:10:22 -0400 Message-Id: <1244488224-31171-3-git-send-email-glommer@redhat.com> In-Reply-To: <1244488224-31171-2-git-send-email-glommer@redhat.com> References: <1244488224-31171-1-git-send-email-glommer@redhat.com> <1244488224-31171-2-git-send-email-glommer@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 --- libkvm-all.c | 2 +- libkvm-all.h | 1 + target-i386/libkvm.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletions(-) 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 #include #include @@ -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