]> git.proxmox.com Git - mirror_qemu.git/commit
vhost-user: Fix VHOST_SET_MEM_TABLE processing
authorNikolay Nikolaev <n.nikolaev@virtualopensystems.com>
Sat, 12 Jul 2014 01:42:35 +0000 (04:42 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 17 Jul 2014 23:14:15 +0000 (02:14 +0300)
commitf69a28051f856e906bd9c2f9f27b3106a47e18f6
treeb6818245d7e770ae59de26ff9e8537117df944f0
parent0e3cd8334aa800b947e2511720a8dcb792f68871
vhost-user: Fix VHOST_SET_MEM_TABLE processing

qemu_get_ram_fd doesn't accept a guest physical address. ram_addr_t are
opaque values that are assigned in qemu_ram_alloc.

Find the ram_addr_t corresponding to the userspace_addr using qemu_ram_addr_from_host,
and then call qemu_get_ram_fd on it.

Thanks to Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
hw/virtio/vhost-user.c