From patchwork Tue Jun 9 16:43:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 29052 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 n59GhZLi023848 for ; Tue, 9 Jun 2009 16:43:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756605AbZFIQnW (ORCPT ); Tue, 9 Jun 2009 12:43:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756202AbZFIQnW (ORCPT ); Tue, 9 Jun 2009 12:43:22 -0400 Received: from mx2.redhat.com ([66.187.237.31]:36033 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755832AbZFIQnT (ORCPT ); Tue, 9 Jun 2009 12:43:19 -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 n59GhMWO003048 for ; Tue, 9 Jun 2009 12:43:22 -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 n59GhKPQ006871; Tue, 9 Jun 2009 12:43:21 -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 n59GhJoW002400; Tue, 9 Jun 2009 12:43:20 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com Subject: [PATCH 2/2] pull qemu headers into libkvm Date: Tue, 9 Jun 2009 12:43:19 -0400 Message-Id: <1244565799-616-3-git-send-email-glommer@redhat.com> In-Reply-To: <1244565799-616-2-git-send-email-glommer@redhat.com> References: <1244565799-616-1-git-send-email-glommer@redhat.com> <1244565799-616-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