mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
f45fd95ec9
According to VirtIO standard, "The class, command and
command-specific-data are set by the driver,
and the device sets the ack byte.
There is little it can do except issue a diagnostic
if ack is not VIRTIO_NET_OK."
Therefore, QEMU should stop sending the queued SVQ commands and
cancel the device startup if the device's ack is not VIRTIO_NET_OK.
Yet the problem is that, vhost_vdpa_net_load_mq() returns 1 based on
`*s->status != VIRTIO_NET_OK` when the device's ack is VIRTIO_NET_ERR.
As a result, net->nc->info->load() also returns 1, this makes
vhost_net_start_one() incorrectly assume the device state is
successfully loaded by vhost_vdpa_net_load() and return 0, instead of
goto `fail` label to cancel the device startup, as vhost_net_start_one()
only cancels the device startup when net->nc->info->load() returns a
negative value.
This patch fixes this problem by returning -EIO when the device's
ack is not VIRTIO_NET_OK.
Fixes:
|
||
---|---|---|
.. | ||
can | ||
announce.c | ||
checksum.c | ||
clients.h | ||
colo-compare.c | ||
colo-compare.h | ||
colo.c | ||
colo.h | ||
dgram.c | ||
dump.c | ||
eth.c | ||
filter-buffer.c | ||
filter-mirror.c | ||
filter-replay.c | ||
filter-rewriter.c | ||
filter.c | ||
hub.c | ||
hub.h | ||
l2tpv3.c | ||
meson.build | ||
net-hmp-cmds.c | ||
net.c | ||
netmap.c | ||
queue.c | ||
slirp.c | ||
socket.c | ||
stream.c | ||
tap-bsd.c | ||
tap-linux.c | ||
tap-linux.h | ||
tap-solaris.c | ||
tap-stub.c | ||
tap-win32.c | ||
tap.c | ||
tap_int.h | ||
trace-events | ||
trace.h | ||
util.c | ||
util.h | ||
vde.c | ||
vhost-user-stub.c | ||
vhost-user.c | ||
vhost-vdpa-stub.c | ||
vhost-vdpa.c | ||
vmnet-bridged.m | ||
vmnet-common.m | ||
vmnet-host.c | ||
vmnet-shared.c | ||
vmnet_int.h |