qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vhost: pass corrent log base to kernel
@ 2015-04-15  4:06 Wen Congyang
  2015-04-15  9:36 ` Michael S. Tsirkin
  0 siblings, 1 reply; 2+ messages in thread
From: Wen Congyang @ 2015-04-15  4:06 UTC (permalink / raw)
  To: qemu-devl, Paolo Bonzini, Michael S. Tsirkin

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
 hw/virtio/vhost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 5a12861..4e334ca 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -1060,7 +1060,7 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev)
         hdev->log_size = vhost_get_log_size(hdev);
         hdev->log = hdev->log_size ?
             g_malloc0(hdev->log_size * sizeof *hdev->log) : NULL;
-        r = hdev->vhost_ops->vhost_call(hdev, VHOST_SET_LOG_BASE, hdev->log);
+        r = hdev->vhost_ops->vhost_call(hdev, VHOST_SET_LOG_BASE, &hdev->log);
         if (r < 0) {
             r = -errno;
             goto fail_log;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] vhost: pass corrent log base to kernel
  2015-04-15  4:06 [Qemu-devel] [PATCH] vhost: pass corrent log base to kernel Wen Congyang
@ 2015-04-15  9:36 ` Michael S. Tsirkin
  0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2015-04-15  9:36 UTC (permalink / raw)
  To: Wen Congyang; +Cc: Paolo Bonzini, qemu-devl

On Wed, Apr 15, 2015 at 12:06:42PM +0800, Wen Congyang wrote:
> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> ---
>  hw/virtio/vhost.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
> index 5a12861..4e334ca 100644
> --- a/hw/virtio/vhost.c
> +++ b/hw/virtio/vhost.c
> @@ -1060,7 +1060,7 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev)
>          hdev->log_size = vhost_get_log_size(hdev);
>          hdev->log = hdev->log_size ?
>              g_malloc0(hdev->log_size * sizeof *hdev->log) : NULL;
> -        r = hdev->vhost_ops->vhost_call(hdev, VHOST_SET_LOG_BASE, hdev->log);
> +        r = hdev->vhost_ops->vhost_call(hdev, VHOST_SET_LOG_BASE, &hdev->log);
>          if (r < 0) {
>              r = -errno;
>              goto fail_log;

Wow that's a serious bug.
But your patch won't work correctly on 32 bit systems.
I'll send a fixed patch.
Thanks!

> -- 
> 2.1.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-15  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-15  4:06 [Qemu-devel] [PATCH] vhost: pass corrent log base to kernel Wen Congyang
2015-04-15  9:36 ` Michael S. Tsirkin

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).