Skip to content

Commit

Permalink
vhost-user: fix log size
Browse files Browse the repository at this point in the history
commit 2b8819c
("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 <[email protected]>
  • Loading branch information
mstsirkin committed Nov 18, 2015
1 parent 72018d1 commit 48854f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/virtio/vhost-user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
Expand Down

0 comments on commit 48854f5

Please sign in to comment.