[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 11/15] Revert "virtio: don't call device on !vm_ru
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v3 11/15] Revert "virtio: don't call device on !vm_running" |
Date: |
Thu, 18 Sep 2014 21:54:49 +0300 |
This reverts commit a1bc7b827e422e1ff065640d8ec5347c4aadfcd8.
virtio: don't call device on !vm_running
It turns out that virtio net assumes that vm_running
is updated before device status callback in many places,
so this change leads to asserts.
Previous commit fixes the root issue that motivated
a1bc7b827e422e1ff065640d8ec5347c4aadfcd8 differently,
so there's no longer a need for this change.
In the future, we might be able to drop checking vm_running
completely, and check vm state directly.
Reported-by: Dietmar Maurer <address@hidden>
Cc: address@hidden
Acked-by: Jason Wang <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/virtio/virtio.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index ac22238..5c98180 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -1108,10 +1108,7 @@ static void virtio_vmstate_change(void *opaque, int
running, RunState state)
BusState *qbus = qdev_get_parent_bus(DEVICE(vdev));
VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus);
bool backend_run = running && (vdev->status & VIRTIO_CONFIG_S_DRIVER_OK);
-
- if (running) {
- vdev->vm_running = running;
- }
+ vdev->vm_running = running;
if (backend_run) {
virtio_set_status(vdev, vdev->status);
@@ -1124,10 +1121,6 @@ static void virtio_vmstate_change(void *opaque, int
running, RunState state)
if (!backend_run) {
virtio_set_status(vdev, vdev->status);
}
-
- if (!running) {
- vdev->vm_running = running;
- }
}
void virtio_init(VirtIODevice *vdev, const char *name,
--
MST
- [Qemu-devel] [PULL v3 00/15] pci, pc, virtio, misc bugfixes, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v3 02/15] test-qdev-global-props: Trivial comment fix, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v3 03/15] tests: disable global props test for old glib, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v3 04/15] test-qdev-global-props: Run tests on subprocess, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v3 05/15] test-qdev-global-props: Initialize not_used=true for all props, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v3 06/15] test-qdev-global-props: Test handling of hotpluggable and non-device types, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v3 07/15] qdev: Rename qdev_prop_check_global() to qdev_prop_check_globals(), Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v3 08/15] qdev: Move global validation to a single function, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v3 09/15] Revert "rng-egd: remove redundant free", Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v3 10/15] virtio-net: drop assert on vm stop, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v3 11/15] Revert "virtio: don't call device on !vm_running",
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v3 13/15] vhost-user: fix VIRTIO_NET_F_MRG_RXBUF negotiation, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v3 12/15] virtio-pci: enable bus master for old guests, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v3 15/15] pc: leave more space for BIOS allocations, Michael S. Tsirkin, 2014/09/18
- [Qemu-devel] [PULL v3 14/15] virtio-pci: fix migration for pci bus master, Michael S. Tsirkin, 2014/09/18
- Re: [Qemu-devel] [PULL v3 14/15] virtio-pci: fix migration for pci bus master, Michael S. Tsirkin, 2014/09/29
- Re: [Qemu-devel] [PULL v3 14/15] virtio-pci: fix migration for pci bus master, Greg Kurz, 2014/09/29