xemu/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
..
Makefile.objs hw: move NICs to hw/net/, configure via default-configs/ 2013-04-08 18:13:13 +02:00
cadence_gem.c hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
dp8393x.c hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
e1000.c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
e1000_regs.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
eepro100.c hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
etraxfs_eth.c hw: move NICs to hw/net/, configure via default-configs/ 2013-04-08 18:13:13 +02:00
lan9118.c arm: fix location of some include files 2013-04-15 15:16:01 +02:00
lance.c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
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 hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
ne2000-isa.c ne2000-isa: QOM'ify 2013-04-29 08:27:48 -05:00
ne2000.c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
ne2000.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
opencores_eth.c hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
pcnet-pci.c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
pcnet.c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
pcnet.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
rtl8139.c hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
smc91c111.c arm: fix location of some include files 2013-04-15 15:16:01 +02:00
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 hw: move NICs to hw/net/, configure via default-configs/ 2013-04-08 18:13:13 +02:00
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 hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
vmxnet3.c Merge remote-tracking branch 'bonzini/hw-dirs' into staging 2013-04-08 13:12:33 -05:00
vmxnet3.h Merge remote-tracking branch 'bonzini/hw-dirs' into staging 2013-04-08 13:12:33 -05:00
vmxnet_debug.h hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
vmxnet_rx_pkt.c hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
vmxnet_rx_pkt.h hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
vmxnet_tx_pkt.c include: avoid useless includes of exec/ headers 2013-04-15 18:19:26 +02:00
vmxnet_tx_pkt.h hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
xen_nic.c hw: move target-independent files to subdirectories 2013-04-08 18:13:12 +02:00
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 hw: move NICs to hw/net/, configure via default-configs/ 2013-04-08 18:13:13 +02:00