qemu-e2k/hw/net
Jason Wang 70e53e6e4d virtio-net: don't touch virtqueue if vm is stopped
Guest state should not be touched if VM is stopped, unfortunately we
didn't check running state and tried to drain tx queue unconditionally
in virtio_net_set_status(). A crash was then noticed as a migration
destination when user type quit after virtqueue state is loaded but
before region cache is initialized. In this case,
virtio_net_drop_tx_queue_data() tries to access the uninitialized
region cache.

Fix this by only dropping tx queue data when vm is running.

Fixes: 283e2c2adc ("net: virtio-net discards TX data after link down")
Cc: Yuri Benditovich <yuri.benditovich@daynix.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2017-11-28 11:54:50 +08:00
..
fsl_etsec sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE 2017-05-17 10:37:01 -03:00
rocker pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
allwinner_emac.c
cadence_gem.c cadence_gem: Make the revision a property 2017-04-20 17:39:17 +01:00
dp8393x.c memory: Rename memory_region_init_ram() to memory_region_init_ram_nomigrate() 2017-07-14 17:59:42 +01:00
e1000_regs.h e1000: Rename the SEC symbol to SEQEC 2017-09-08 08:17:37 +08:00
e1000.c net: Transmit zero UDP checksum as 0xFFFF 2017-11-20 11:08:00 +08:00
e1000e_core.c e1000: Rename the SEC symbol to SEQEC 2017-09-08 08:17:37 +08:00
e1000e_core.h
e1000e.c pci: Add INTERFACE_PCIE_DEVICE to all PCIe devices 2017-10-15 05:54:42 +03:00
e1000x_common.c
e1000x_common.h e1000: Rename the SEC symbol to SEQEC 2017-09-08 08:17:37 +08:00
eepro100.c hw/net/eepro100: Fix endianness problem on big endian hosts 2017-11-20 11:08:00 +08:00
etraxfs_eth.c qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable 2017-05-17 10:37:00 -03:00
ftgmac100.c net/ftgmac100: add a 'aspeed' property 2017-04-25 19:17:25 +08:00
imx_fec.c net: imx: limit buffer descriptor count 2017-02-15 11:18:57 +08:00
lan9118.c
lance.c lance: move TYPE_LANCE and SysBusPCNetState from lance.c to lance.h 2017-10-31 17:25:36 +00:00
Makefile.objs net: add Sun HME (Happy Meal Ethernet) on-board NIC 2017-09-21 08:38:42 +01:00
mcf_fec.c hw/net: implement MIB counters in mcf_fec driver 2017-03-14 15:39:55 +08:00
milkymist-minimac2.c memory: Rename memory_region_init_ram() to memory_region_init_ram_nomigrate() 2017-07-14 17:59:42 +01:00
mipsnet.c
ne2000-isa.c
ne2000.c pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
ne2000.h
net_rx_pkt.c net: Transmit zero UDP checksum as 0xFFFF 2017-11-20 11:08:00 +08:00
net_rx_pkt.h
net_tx_pkt.c net: Transmit zero UDP checksum as 0xFFFF 2017-11-20 11:08:00 +08:00
net_tx_pkt.h
opencores_eth.c
pcnet-pci.c pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
pcnet.c net: pcnet: fix source formatting and indentation 2016-10-26 09:57:59 +08:00
pcnet.h
rtl8139.c pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
smc91c111.c
spapr_llan.c hw/net/spapr_llan: 6 byte mac address device tree entry 2017-02-22 14:28:53 +11:00
stellaris_enet.c arm: stellaris: make MII accesses complete immediately 2017-01-27 15:29:08 +00:00
sungem.c pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
sunhme.c pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
trace-events net: add Sun HME (Happy Meal Ethernet) on-board NIC 2017-09-21 08:38:42 +01:00
vhost_net.c spec/vhost-user spec: Add IOMMU support 2017-06-02 18:57:17 +03:00
virtio-net.c virtio-net: don't touch virtqueue if vm is stopped 2017-11-28 11:54:50 +08:00
vmware_utils.h hw/net/vmxnet3: Fix code to work on big endian hosts, too 2017-11-20 11:08:00 +08:00
vmxnet3.c hw/net/vmxnet3: Fix code to work on big endian hosts, too 2017-11-20 11:08:00 +08:00
vmxnet3.h hw/net/vmxnet3: Fix code to work on big endian hosts, too 2017-11-20 11:08:00 +08:00
vmxnet_debug.h
xen_nic.c xen: Rename xen_be_send_notify 2016-10-28 17:54:21 -07:00
xgmac.c Remove/replace sysemu/char.h inclusion 2017-06-02 11:33:52 +04:00
xilinx_axienet.c xilinx_axienet: Convert to DEFINE_PROP_LINK 2017-09-07 13:54:51 +01:00
xilinx_ethlite.c