diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-03-25 12:30:16 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-05-29 09:11:12 +0200 |
commit | 4ff87573df3606856a92c14eef3393a63d736d11 (patch) | |
tree | 17139888bbd5b87ad83af2fa2cbfc4f7de20ebac /hw/misc | |
parent | 063143d5b1fde0fdcbae30bc7d6d14e76fa607d2 (diff) | |
download | qemu-4ff87573df3606856a92c14eef3393a63d736d11.zip qemu-4ff87573df3606856a92c14eef3393a63d736d11.tar.gz qemu-4ff87573df3606856a92c14eef3393a63d736d11.tar.bz2 |
memory: remove qemu_get_ram_fd, qemu_set_ram_fd, qemu_ram_block_host_ptr
Remove direct uses of ram_addr_t and optimize memory_region_{get,set}_fd
now that a MemoryRegion knows its RAMBlock directly.
Reviewed-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/misc')
-rw-r--r-- | hw/misc/ivshmem.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index e40f23b..90be9f7 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -33,7 +33,6 @@ #include "sysemu/hostmem.h" #include "sysemu/qtest.h" #include "qapi/visitor.h" -#include "exec/ram_addr.h" #include "hw/misc/ivshmem.h" @@ -533,7 +532,7 @@ static void process_msg_shmem(IVShmemState *s, int fd, Error **errp) } memory_region_init_ram_ptr(&s->server_bar2, OBJECT(s), "ivshmem.bar2", size, ptr); - qemu_set_ram_fd(memory_region_get_ram_addr(&s->server_bar2), fd); + memory_region_set_fd(&s->server_bar2, fd); s->ivshmem_bar2 = &s->server_bar2; } @@ -940,7 +939,7 @@ static void ivshmem_exit(PCIDevice *dev) strerror(errno)); } - fd = qemu_get_ram_fd(memory_region_get_ram_addr(s->ivshmem_bar2)); + fd = memory_region_get_fd(s->ivshmem_bar2); close(fd); } |