All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@redhat.com>
To: kvm@vger.kernel.org
Cc: avi@redhat.com
Subject: [PATCH v3 2/5] cleanup mmio coalescing functions
Date: Mon,  6 Jul 2009 16:12:49 -0400	[thread overview]
Message-ID: <1246911172-5869-3-git-send-email-glommer@redhat.com> (raw)
In-Reply-To: <1246911172-5869-2-git-send-email-glommer@redhat.com>

remove wrappers that existed only due to qemu/libkvm separation.
Use qemu types for function definitions.

Signed-off-by: Glauber Costa <glommer@redhat.com>
---
 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 44cea10..e4af96e 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1104,9 +1104,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;
 
@@ -1126,9 +1127,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;
 
@@ -2759,27 +2761,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 de90259..0322feb 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -116,11 +116,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);
 
-- 
1.6.2.2


  reply	other threads:[~2009-07-06 20:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-06 20:12 [PATCH v3 0/5] Further qemu-kvm cleanups Glauber Costa
2009-07-06 20:12 ` [PATCH v3 1/5] qemu-kvm.c memory cleanup Glauber Costa
2009-07-06 20:12   ` Glauber Costa [this message]
2009-07-06 20:12     ` [PATCH v3 3/5] kvm finalize Glauber Costa
2009-07-06 20:12       ` [PATCH v3 4/5] remove callbacks structure Glauber Costa
2009-07-06 20:12         ` [PATCH v3 5/5] remove wrappers around ex-libkvm functions Glauber Costa
2009-07-07  9:52 ` [PATCH v3 0/5] Further qemu-kvm cleanups Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1246911172-5869-3-git-send-email-glommer@redhat.com \
    --to=glommer@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.