提交 e0c472d8 编写于 作者: M Michael S. Tsirkin

virtio: invoke set_status callback on reset

As status is set to 0 on reset, invoke the relevant callback. This makes
for a cleaner code in devices as they don't need to duplicate the code
in their reset routine, as well as excercises this path a little more.

In particular this makes it possible to unify
vhost-net handling code with the following patch.
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 a083a89d
......@@ -458,6 +458,8 @@ void virtio_reset(void *opaque)
VirtIODevice *vdev = opaque;
int i;
virtio_set_status(vdev, 0);
if (vdev->reset)
vdev->reset(vdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册