qemu/hw/net
Jason Wang e9016ee2bd virtio-net: count VIRTIO_NET_F_MAC when calculating config_len
Commit 14f9b664 (hw/virtio-net.c: set config size using host features) tries to
calculate config size based on the host features. But it forgets the
VIRTIO_NET_F_MAC were always set for qemu later. This will lead a zero config
len for virtio-net device when both VIRTIO_NET_F_STATUS and VIRTIO_NET_F_MQ were
disabled form command line. Then qemu will crash when user tries to read the
config of virtio-net.

Fix this by counting VIRTIO_NET_F_MAC and make sure the config at least contains
the mac address.

Cc: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 1366874814-2658-1-git-send-email-jasowang@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-30 16:04:24 -05:00
..
cadence_gem.c
dp8393x.c
e1000_regs.h
e1000.c
eepro100.c
etraxfs_eth.c
lan9118.c
lance.c
Makefile.objs
mcf_fec.c Remove unneeded type casts 2013-04-19 11:36:33 +02:00
milkymist-minimac2.c qdev: Drop taddr properties 2013-04-20 17:54:52 +00:00
mipsnet.c
ne2000-isa.c ne2000-isa: QOM'ify 2013-04-29 08:27:48 -05:00
ne2000.c
ne2000.h
opencores_eth.c
pcnet-pci.c
pcnet.c
pcnet.h
rtl8139.c
smc91c111.c
spapr_llan.c pseries: Convert VIO code to QOM style type safe(ish) casts 2013-04-26 23:02:41 +02:00
stellaris_enet.c
vhost_net.c virtio: remove virtiobindings. 2013-04-24 11:50:20 -05:00
virtio-net.c virtio-net: count VIRTIO_NET_F_MAC when calculating config_len 2013-04-30 16:04:24 -05:00
vmware_utils.h
vmxnet3.c
vmxnet3.h
vmxnet_debug.h
vmxnet_rx_pkt.c
vmxnet_rx_pkt.h
vmxnet_tx_pkt.c include: avoid useless includes of exec/ headers 2013-04-15 18:19:26 +02:00
vmxnet_tx_pkt.h
xen_nic.c
xgmac.c sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
xilinx_axienet.c stream: Remove app argument hack 2013-04-16 10:04:23 +02:00
xilinx_ethlite.c