qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-stable] [PATCH] vhost_net: init acked_features to backend_feat


From: Jason Wang
Subject: Re: [Qemu-stable] [PATCH] vhost_net: init acked_features to backend_features
Date: Wed, 03 Sep 2014 17:16:18 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

On 09/03/2014 04:57 PM, Michael S. Tsirkin wrote:
> commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add
> vhost_get_features and vhost_ack_features) removes the step that
> initializes the acked_features to backend_features.
>
> As this field is now uninitialized, vhost initialization will sometimes
> fail.
>
> To fix, initialize field in core vhost code.
>
> As the next step, cleanup vhost scsi code as well.
>
> Reported-by: Jason Wang <address@hidden>
> Reported-by: Andrey Korolyov <address@hidden>
> Cc: Nikolay Nikolaev <address@hidden>
> Cc: address@hidden
> Signed-off-by: Jason Wang <address@hidden>
> Reviewed-by: Michael S. Tsirkin <address@hidden>
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> ---
>  hw/virtio/vhost.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
> index 5d7c40a..e42e51f 100644
> --- a/hw/virtio/vhost.c
> +++ b/hw/virtio/vhost.c
> @@ -873,6 +873,9 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque,
>      hdev->memory_changed = false;
>      memory_listener_register(&hdev->memory_listener, &address_space_memory);
>      hdev->force = force;
> +    /* Set minimal required set of features. */
> +    hdev->acked_features = hdev->backend_features;
> +
>      return 0;
>  fail_vq:
>      while (--i >= 0) {

Since vhost_ack_features() never clear a bit, if rebooting from a guest
w/ mrg rx buffer to a guest w/o it, network is broken?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]