[PATCH 2/2] use coalesce memory regions functions from upstream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Delete ours, they do the same thing.

Signed-off-by: Glauber Costa <glommer@xxxxxxxxxx>
---
 kvm-all.c  |    2 +-
 qemu-kvm.c |   45 ---------------------------------------------
 2 files changed, 1 insertions(+), 46 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index 157b968..e798496 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -344,6 +344,7 @@ int kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr,
 
     return ret;
 }
+#endif
 
 int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size)
 {
@@ -383,7 +384,6 @@ int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size)
     return ret;
 }
 
-#endif
 int kvm_check_extension(KVMState *s, unsigned int extension)
 {
     int ret;
diff --git a/qemu-kvm.c b/qemu-kvm.c
index c1454fd..23bd61a 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1175,51 +1175,6 @@ int kvm_init_coalesced_mmio(kvm_context_t kvm)
 	return r;
 }
 
-int kvm_coalesce_mmio_region(target_phys_addr_t addr, ram_addr_t size)
-{
-#ifdef KVM_CAP_COALESCED_MMIO
-	struct kvm_coalesced_mmio_zone zone;
-	int r;
-
-	if (kvm_state->coalesced_mmio) {
-
-		zone.addr = addr;
-		zone.size = size;
-
-		r = kvm_vm_ioctl(kvm_state, KVM_REGISTER_COALESCED_MMIO, &zone);
-		if (r < 0) {
-			perror("kvm_register_coalesced_mmio_zone");
-			return r;
-		}
-		return 0;
-	}
-#endif
-	return -ENOSYS;
-}
-
-int kvm_uncoalesce_mmio_region(target_phys_addr_t addr, ram_addr_t size)
-{
-#ifdef KVM_CAP_COALESCED_MMIO
-	struct kvm_coalesced_mmio_zone zone;
-	int r;
-
-	if (kvm_state->coalesced_mmio) {
-
-		zone.addr = addr;
-		zone.size = size;
-
-		r = kvm_vm_ioctl(kvm_state, KVM_UNREGISTER_COALESCED_MMIO, &zone);
-		if (r < 0) {
-			perror("kvm_unregister_coalesced_mmio_zone");
-			return r;
-		}
-		DPRINTF("Unregistered coalesced mmio region for %llx (%lx)\n", addr, size);
-		return 0;
-	}
-#endif
-	return -ENOSYS;
-}
-
 #ifdef KVM_CAP_DEVICE_ASSIGNMENT
 int kvm_assign_pci_device(kvm_context_t kvm,
 			  struct kvm_assigned_pci_dev *assigned_dev)
-- 
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux