From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuMzF-0005uN-Ki for qemu-devel@nongnu.org; Mon, 18 May 2015 11:29:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuMzE-00070m-6A for qemu-devel@nongnu.org; Mon, 18 May 2015 11:29:49 -0400 Received: from mail-wi0-x243.google.com ([2a00:1450:400c:c05::243]:33245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuMzE-00070a-01 for qemu-devel@nongnu.org; Mon, 18 May 2015 11:29:48 -0400 Received: by wivz2 with SMTP id z2so605436wiv.0 for ; Mon, 18 May 2015 08:29:47 -0700 (PDT) Received: from 640k.localdomain (dynamic-adsl-94-39-199-114.clienti.tiscali.it. [94.39.199.114]) by mx.google.com with ESMTPSA id y7sm17423468wjw.16.2015.05.18.08.29.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 May 2015 08:29:46 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 18 May 2015 17:28:36 +0200 Message-Id: <1431962920-47525-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <1431962920-47525-1-git-send-email-pbonzini@redhat.com> References: <1431962920-47525-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 3/7] kvm-all: move internal types to kvm_int.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org i386 code will have to define a different KVMMemoryListener. Create an internal header so that KVMSlot is not exposed outside. Signed-off-by: Paolo Bonzini --- include/sysemu/kvm_int.h | 30 ++++++++++++++++++++++++++++++ kvm-all.c | 18 +----------------- 2 files changed, 31 insertions(+), 17 deletions(-) create mode 100644 include/sysemu/kvm_int.h diff --git a/include/sysemu/kvm_int.h b/include/sysemu/kvm_int.h new file mode 100644 index 0000000..e8dcbd7 --- /dev/null +++ b/include/sysemu/kvm_int.h @@ -0,0 +1,30 @@ +/* + * Internal definitions for a target's KVM support + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + * + */ + +#ifndef QEMU_KVM_INT_H +#define QEMU_KVM_INT_H + +#include "sysemu/sysemu.h" +#include "sysemu/accel.h" +#include "sysemu/kvm.h" + +typedef struct KVMSlot +{ + hwaddr start_addr; + ram_addr_t memory_size; + void *ram; + int slot; + int flags; +} KVMSlot; + +#define TYPE_KVM_ACCEL ACCEL_CLASS_NAME("kvm") + +#define KVM_STATE(obj) \ + OBJECT_CHECK(KVMState, (obj), TYPE_KVM_ACCEL) + +#endif diff --git a/kvm-all.c b/kvm-all.c index bb9477c..4499ff8 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -24,13 +24,11 @@ #include "qemu/atomic.h" #include "qemu/option.h" #include "qemu/config-file.h" -#include "sysemu/sysemu.h" -#include "sysemu/accel.h" #include "hw/hw.h" #include "hw/pci/msi.h" #include "hw/s390x/adapter.h" #include "exec/gdbstub.h" -#include "sysemu/kvm.h" +#include "sysemu/kvm_int.h" #include "qemu/bswap.h" #include "exec/memory.h" #include "exec/ram_addr.h" @@ -60,15 +58,6 @@ #define KVM_MSI_HASHTAB_SIZE 256 -typedef struct KVMSlot -{ - hwaddr start_addr; - ram_addr_t memory_size; - void *ram; - int slot; - int flags; -} KVMSlot; - struct KVMState { AccelState parent_obj; @@ -107,11 +96,6 @@ struct KVMState #endif }; -#define TYPE_KVM_ACCEL ACCEL_CLASS_NAME("kvm") - -#define KVM_STATE(obj) \ - OBJECT_CHECK(KVMState, (obj), TYPE_KVM_ACCEL) - KVMState *kvm_state; bool kvm_kernel_irqchip; bool kvm_async_interrupts_allowed; -- 1.8.3.1