* [Qemu-devel] [PATCH] vhost-user: fix log size
@ 2015-11-18 14:16 Michael S. Tsirkin
2015-11-18 16:39 ` Marc-André Lureau
0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2015-11-18 14:16 UTC (permalink / raw)
To: qemu-devel; +Cc: Victor Kaplansky
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>
---
hw/virtio/vhost-user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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),
};
--
MST
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] vhost-user: fix log size
2015-11-18 14:16 [Qemu-devel] [PATCH] vhost-user: fix log size Michael S. Tsirkin
@ 2015-11-18 16:39 ` Marc-André Lureau
0 siblings, 0 replies; 2+ messages in thread
From: Marc-André Lureau @ 2015-11-18 16:39 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Victor Kaplansky, QEMU
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
On Wed, Nov 18, 2015 at 3:16 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> 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>
> ---
> hw/virtio/vhost-user.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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),
> };
> --
> MST
>
--
Marc-André Lureau
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-18 16:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-18 14:16 [Qemu-devel] [PATCH] vhost-user: fix log size Michael S. Tsirkin
2015-11-18 16:39 ` Marc-André Lureau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).