Blob Blame History Raw
From 83375cf67c9567c94808e70fa9def3383a97320c Mon Sep 17 00:00:00 2001
From: Amos Kong <akong@redhat.com>
Date: Fri, 19 Dec 2014 13:51:53 +0100
Subject: [PATCH 02/16] virtio-net: drop assert on vm stop

Message-id: <1418997113-32517-1-git-send-email-akong@redhat.com>
Patchwork-id: 62996
O-Subject: [RHEL-7.2 qemu-kvm PATCH] virtio-net: drop assert on vm stop
Bugzilla: 1139562
RH-Acked-by: Vlad Yasevich <vyasevic@redhat.com>
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
RH-Acked-by: Fam Zheng <famz@redhat.com>
RH-Acked-by: Xiao Wang <jasowang@redhat.com>

From: Michael S. Tsirkin <mst@redhat.com>

On vm stop, vm_running state set to stopped
before device is notified, so callbacks can get envoked with
vm_running = false; and this is not an error.

Cc: qemu-stable@nongnu.org
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 131c5221fe25a9547c4a388a3d26ff7fd14843e5)

Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/net/virtio-net.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 4a50869..3fde455 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1025,8 +1025,6 @@ static int32_t virtio_net_flush_tx(VirtIONetQueue *q)
         return num_packets;
     }
 
-    assert(vdev->vm_running);
-
     if (q->async_tx.elem.out_num) {
         virtio_queue_set_notification(q->tx_vq, 0);
         return num_packets;
-- 
1.8.3.1