[PATCH 05/13] qemu-kvm: Remove qemu_ram_unmap

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

 



From: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>

Upstream gained identical qemu_ram_free_from_ptr.

Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
---
 cpu-common.h           |    1 -
 exec.c                 |   13 -------------
 hw/device-assignment.c |    2 +-
 3 files changed, 1 insertions(+), 15 deletions(-)

diff --git a/cpu-common.h b/cpu-common.h
index 1ccf2f4..b027e43 100644
--- a/cpu-common.h
+++ b/cpu-common.h
@@ -60,7 +60,6 @@ ram_addr_t cpu_get_physical_page_desc(target_phys_addr_t addr);
 ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name,
                         ram_addr_t size, void *host);
 ram_addr_t qemu_ram_alloc(DeviceState *dev, const char *name, ram_addr_t size);
-void qemu_ram_unmap(ram_addr_t addr);
 void qemu_ram_free(ram_addr_t addr);
 void qemu_ram_free_from_ptr(ram_addr_t addr);
 void qemu_ram_remap(ram_addr_t addr, ram_addr_t length);
diff --git a/exec.c b/exec.c
index c728290..68f5b33 100644
--- a/exec.c
+++ b/exec.c
@@ -2982,19 +2982,6 @@ ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name,
     return new_block->offset;
 }
 
-void qemu_ram_unmap(ram_addr_t addr)
-{
-    RAMBlock *block;
-
-    QLIST_FOREACH(block, &ram_list.blocks, next) {
-        if (addr == block->offset) {
-            QLIST_REMOVE(block, next);
-            qemu_free(block);
-            return;
-        }
-    }
-}
-
 ram_addr_t qemu_ram_alloc(DeviceState *dev, const char *name, ram_addr_t size)
 {
     return qemu_ram_alloc_from_ptr(dev, name, size, NULL);
diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index 6a2a8c9..36ad6b0 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -836,7 +836,7 @@ static void free_assigned_device(AssignedDevice *dev)
                 if (region->r_size & 0xFFF) {
                     cpu_unregister_io_memory(region->memory_index);
                 } else {
-                    qemu_ram_unmap(region->memory_index);
+                    qemu_ram_free_from_ptr(region->memory_index);
                 }
                 if (munmap(region->u.r_virtbase,
                            (pci_region->size + 0xFFF) & 0xFFFFF000)) {
-- 
1.7.1

--
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