From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>,
Andrey Korolyov <andrey@xdel.ru>,
qemu-stable@nongnu.org,
Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
Subject: [Qemu-devel] [PATCH] vhost_net: init acked_features to backend_features
Date: Wed, 3 Sep 2014 11:57:08 +0300 [thread overview]
Message-ID: <1409734590-6826-1-git-send-email-mst@redhat.com> (raw)
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 <jasowang@redhat.com>
Reported-by: Andrey Korolyov <andrey@xdel.ru>
Cc: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
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) {
--
MST
next reply other threads:[~2014-09-03 8:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 8:57 Michael S. Tsirkin [this message]
2014-09-03 9:16 ` [Qemu-devel] [PATCH] vhost_net: init acked_features to backend_features Jason Wang
2014-09-03 9:29 ` Andrey Korolyov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1409734590-6826-1-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=andrey@xdel.ru \
--cc=jasowang@redhat.com \
--cc=n.nikolaev@virtualopensystems.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).