From patchwork Thu Jun 18 19:37:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 31234 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 n5IJcQgr004803 for ; Thu, 18 Jun 2009 19:38:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754879AbZFRTiQ (ORCPT ); Thu, 18 Jun 2009 15:38:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752638AbZFRTiP (ORCPT ); Thu, 18 Jun 2009 15:38:15 -0400 Received: from mx2.redhat.com ([66.187.237.31]:34277 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752691AbZFRTiI (ORCPT ); Thu, 18 Jun 2009 15:38:08 -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 n5IJcC4S008355 for ; Thu, 18 Jun 2009 15:38:12 -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 n5IJcBLf026466; Thu, 18 Jun 2009 15:38:11 -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 n5IJc9nh030668; Thu, 18 Jun 2009 15:38:10 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com Subject: [PATCH 3/5] cleanup mmio coalescing functions Date: Thu, 18 Jun 2009 15:37:56 -0400 Message-Id: <1245353878-13512-4-git-send-email-glommer@redhat.com> In-Reply-To: <1245353878-13512-3-git-send-email-glommer@redhat.com> References: <1245353878-13512-1-git-send-email-glommer@redhat.com> <1245353878-13512-2-git-send-email-glommer@redhat.com> <1245353878-13512-3-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 remove wrappers that existed only due to qemu/libkvm separation. Use qemu types for function definitions. Signed-off-by: Glauber Costa --- qemu-kvm.c | 27 ++++----------------------- qemu-kvm.h | 5 ----- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index d061e0a..609f992 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1099,9 +1099,10 @@ int kvm_init_coalesced_mmio(kvm_context_t kvm) return r; } -int kvm_register_coalesced_mmio(kvm_context_t kvm, uint64_t addr, uint32_t size) +int kvm_coalesce_mmio_region(target_phys_addr_t addr, ram_addr_t size) { #ifdef KVM_CAP_COALESCED_MMIO + kvm_context_t kvm = kvm_context; struct kvm_coalesced_mmio_zone zone; int r; @@ -1121,9 +1122,10 @@ int kvm_register_coalesced_mmio(kvm_context_t kvm, uint64_t addr, uint32_t size) return -ENOSYS; } -int kvm_unregister_coalesced_mmio(kvm_context_t kvm, uint64_t addr, uint32_t size) +int kvm_uncoalesce_mmio_region(target_phys_addr_t addr, ram_addr_t size) { #ifdef KVM_CAP_COALESCED_MMIO + kvm_context_t kvm = kvm_context; struct kvm_coalesced_mmio_zone zone; int r; @@ -2792,27 +2794,6 @@ void kvm_mutex_lock(void) cpu_single_env = NULL; } -int qemu_kvm_register_coalesced_mmio(target_phys_addr_t addr, unsigned int size) -{ - return kvm_register_coalesced_mmio(kvm_context, addr, size); -} - -int qemu_kvm_unregister_coalesced_mmio(target_phys_addr_t addr, - unsigned int size) -{ - return kvm_unregister_coalesced_mmio(kvm_context, addr, size); -} - -int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size) -{ - return kvm_register_coalesced_mmio(kvm_context, start, size); -} - -int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size) -{ - return kvm_unregister_coalesced_mmio(kvm_context, start, size); -} - #ifdef USE_KVM_DEVICE_ASSIGNMENT void kvm_add_ioperm_data(struct ioperm_data *data) { diff --git a/qemu-kvm.h b/qemu-kvm.h index c51566c..982e448 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -113,11 +113,6 @@ void kvm_tpr_access_report(CPUState *env, uint64_t rip, int is_write); void kvm_tpr_vcpu_start(CPUState *env); int qemu_kvm_get_dirty_pages(unsigned long phys_addr, void *buf); -int qemu_kvm_register_coalesced_mmio(target_phys_addr_t addr, - unsigned int size); -int qemu_kvm_unregister_coalesced_mmio(target_phys_addr_t addr, - unsigned int size); - int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size); int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size);