aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2015-11-18 16:13:54 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-11-18 18:49:27 +0200
commit48854f57ce3e6aa4bd13368559e5c292e1c44e49 (patch)
tree7eb28b24827211fad9f2a92e9b8918625edd82a7 /hw/virtio
parent72018d1e1917a56d05e24aedc9f582b7c8385e19 (diff)
downloadqemu-48854f57ce3e6aa4bd13368559e5c292e1c44e49.zip
qemu-48854f57ce3e6aa4bd13368559e5c292e1c44e49.tar.gz
qemu-48854f57ce3e6aa4bd13368559e5c292e1c44e49.tar.bz2
vhost-user: fix log size
commit 2b8819c6eee517c1582983773f8555bb3f9ed645 ("vhost-user: modify SET_LOG_BASE to pass mmap size and offset") passes log size in units of 4 byte chunks instead of the expected size in bytes. Fix this up. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio')
-rw-r--r--hw/virtio/vhost-user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 71c3e16..1b6c5ac 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -206,7 +206,7 @@ static int vhost_user_set_log_base(struct vhost_dev *dev, uint64_t base,
VhostUserMsg msg = {
.request = VHOST_USER_SET_LOG_BASE,
.flags = VHOST_USER_VERSION,
- .payload.log.mmap_size = log->size,
+ .payload.log.mmap_size = log->size * sizeof(*(log->log)),
.payload.log.mmap_offset = 0,
.size = sizeof(msg.payload.log),
};