aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2014-09-03 14:25:30 +0800
committerMichael Roth <mdroth@linux.vnet.ibm.com>2014-09-10 09:30:57 -0500
commit6f8d05a8f801e09c9cdf9e2146225e826e5d7cc5 (patch)
treed020b03eda1660ea4c7d3424ac5128fc44a059d5 /hw
parent5e83dae44ee121a6c5a388486db8d8e51511cab7 (diff)
vhost_net: init acked_features to backend_features
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 acked_features on each ack. Tested-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> (cherry picked from commit b49ae9138d5cadb47fb868297fbcdac8292fb666) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/net/vhost_net.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index 131807521a..b37438ba09 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -115,6 +115,7 @@ unsigned vhost_net_get_features(struct vhost_net *net, unsigned features)
void vhost_net_ack_features(struct vhost_net *net, unsigned features)
{
+ net->dev.acked_features = net->dev.backend_features;
vhost_ack_features(&net->dev, vhost_net_get_feature_bits(net), features);
}