qemu/hw
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
..
9pfs virtio: remove the function pointer. 2013-04-24 11:50:20 -05:00
acpi ich9: kill cmos_s3 2013-04-24 11:50:18 -05:00
alpha include: avoid useless includes of exec/ headers 2013-04-15 18:19:26 +02:00
arm console: add device link to QemuConsoles 2013-04-25 14:45:46 -05:00
audio audio: replace audio card configuration with default-configs 2013-04-29 12:16:37 -05:00
block fdc: QOM'ify ISA floppy controller 2013-04-29 08:27:47 -05:00
bt sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
char serial: QOM'ify ISA serial 2013-04-29 08:27:49 -05:00
core qdev: Report errors collected during device realization 2013-04-30 09:52:48 -05:00
cpu hw: move ARM CPU cores to hw/cpu/, configure with default-configs/ 2013-04-08 18:13:16 +02:00
cris hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
display vga-isa: QOM'ify ISA VGA 2013-04-29 08:27:49 -05:00
dma i82374: QOM'ify 2013-04-29 08:27:47 -05:00
gpio Remove unneeded type casts 2013-04-19 11:36:33 +02:00
i2c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
i386 pvpanic: create pvpanic by default for machine 1.5 2013-04-30 10:30:01 -05:00
ide ide: QOM'ify ISA IDE 2013-04-29 08:27:47 -05:00
input vmmouse: QOM'ify 2013-04-29 08:27:50 -05:00
intc i8259: QOM cleanups 2013-04-29 08:27:47 -05:00
isa ich9: kill cmos_s3 2013-04-24 11:50:18 -05:00
lm32 qdev: Drop taddr properties 2013-04-20 17:54:52 +00:00
m68k hw: move char devices to hw/char/, configure via default-configs/ 2013-04-08 18:13:14 +02:00
microblaze Remove unneeded type casts 2013-04-19 11:36:33 +02:00
mips audio: enable PCI audio cards for all PCI-enabled targets 2013-04-29 12:17:06 -05:00
misc pvpanic: create pvpanic by default for machine 1.5 2013-04-30 10:30:01 -05:00
moxie hw: move MC146818RTC to hw/timer/, configure via default-configs/ 2013-04-08 18:13:13 +02:00
net virtio-net: count VIRTIO_NET_F_MAC when calculating config_len 2013-04-30 16:04:24 -05:00
nvram pvpanic: pass configurable ioport to seabios 2013-04-30 10:30:01 -05:00
openrisc hw: move headers to include/ 2013-04-08 18:13:10 +02:00
pci hw: move PCI bridges to hw/pci-* or hw/ARCH 2013-04-08 18:13:14 +02:00
pci-bridge hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
pci-host sparc64: use direct interrupt mapping for PCI devices 2013-04-27 11:13:08 +00:00
ppc audio: enable PCI audio cards for all PCI-enabled targets 2013-04-29 12:17:06 -05:00
s390x virtio-rng-s390: add properties. 2013-04-26 20:18:25 +02:00
scsi pseries: Convert VIO code to QOM style type safe(ish) casts 2013-04-26 23:02:41 +02:00
sd Typo, spelling and grammatical fixes 2013-04-12 14:33:20 +02:00
sh4 arm: fix location of some include files 2013-04-15 15:16:01 +02:00
sparc qdev: Drop taddr properties 2013-04-20 17:54:52 +00:00
sparc64 sparc64: allow 64 IRQ lines 2013-04-27 10:35:30 +00:00
ssi hw: move SSI controllers to hw/ssi/, configure via default-configs/ 2013-04-08 18:13:13 +02:00
timer mc146818rtc: QOM'ify 2013-04-29 08:27:48 -05:00
tpm Move TPM passthrough specific command line options to backend structure 2013-04-23 10:40:40 -05:00
unicore32 console: add device link to QemuConsoles 2013-04-25 14:45:46 -05:00
usb audio: remove the need for audio card CONFIG_* symbols 2013-04-29 12:16:36 -05:00
virtio virtio: cleanup: init and exit function. 2013-04-24 11:50:21 -05:00
watchdog wdt_ib700: QOM'ify 2013-04-29 08:27:50 -05:00
xen sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
xtensa sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
Makefile.objs virtio: simplify Makefile conditionals 2013-04-19 16:18:11 +02:00