qemu/hw
Peter Maydell 5c10495ab1 hw/net/stellaris_enet: Restructure tx_fifo code to avoid buffer overrun
The current tx_fifo code has a corner case where the guest can overrun
the fifo buffer: if automatic CRCs are disabled we allow the guest to write
the CRC word even if there isn't actually space for it in the FIFO.
The datasheet is unclear about exactly how the hardware deals with this
situation; the most plausible answer seems to be that the CRC word is
just lost.

Implement this fix by separating the "can we stuff another word in the
FIFO" logic from the "should we transmit the packet now" check. This
also moves us closer to the real hardware, which has a number of ways
it can be configured to trigger sending the packet, some of which we
don't implement.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: qemu-stable@nongnu.org
2014-05-13 16:09:36 +01:00
..
9pfs hw/9pfs: Add include file for exported symbol 2014-05-07 21:00:43 +04:00
acpi acpi/pcihp.c: Rewrite acpi_pcihp_get_bsel using object_property_get_int 2014-05-07 12:13:42 +03:00
alpha exec: Make stq_*_phys input an AddressSpace 2014-02-11 22:57:12 +10:00
arm savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
audio savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
block savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
bt Preparation for usb-bt-dongle conditional build 2013-09-10 11:14:41 +02:00
char savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
core hw/9pfs: Add missing 'static' attributes 2014-05-07 21:00:43 +04:00
cpu icc_bus: QOM'ify ICC 2013-12-24 18:02:18 +01:00
cris cris: Remove the CRIS PIC glue 2014-02-03 14:04:00 +00:00
display savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
dma savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
gpio savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
i2c pm_smbus: correctly report unclaimed cycles 2014-05-07 19:14:51 +03:00
i386 pci-assign: assigned_initfn(): set monitor error in common error handler 2014-05-08 14:20:00 -04:00
ide ahci: fix buffer overrun on invalid state load 2014-05-05 22:15:02 +02:00
input savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
intc savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
ipack ipack: Move IndustryPack out of hw/char/ 2014-02-14 21:11:53 +01:00
isa PortioList: Store PortioList in device state 2014-05-05 20:58:33 +02:00
lm32 hw/lm32: print error if cpu model is not found 2014-02-04 19:47:39 +01:00
m68k an5206: Don't enforce use of kernel for qtest 2013-11-05 17:47:29 +01:00
microblaze microblaze: boot: Don't hack the elf entry point 2014-05-13 09:12:40 +10:00
mips hw/mips: Add missing 'static' and 'const' attributes 2014-05-07 21:00:43 +04:00
misc savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
moxie moxie: fix load_elf() usage 2014-03-05 03:06:46 +01:00
net hw/net/stellaris_enet: Restructure tx_fifo code to avoid buffer overrun 2014-05-13 16:09:36 +01:00
nvram vl.c: Extend get_boot_devices_list() to ignore suffixes 2014-03-20 02:40:07 +01:00
openrisc openrisc-timer: Reduce overhead, Separate clock update functions 2013-11-20 21:46:45 +08:00
pci pci: add Error-propagating pci_add_capability2() 2014-05-08 14:19:59 -04:00
pci-bridge pci/shpc: convert SHPC hotplug to use hotplug-handler API 2014-02-10 10:27:00 +02:00
pci-host hw/pci-host/prep: Don't reverse IO accesses on bigendian hosts 2014-04-08 18:37:45 +01:00
pcmcia qom: Add check() argument to object_property_add_link() 2014-03-19 22:23:13 +01:00
ppc hw: Add missing 'static' attributes 2014-05-07 21:00:43 +04:00
s390x hw/s390x: Add missing 'static' attribute 2014-05-07 21:00:43 +04:00
scsi hw: Add missing 'static' attributes 2014-05-07 21:00:43 +04:00
sd ssi-sd: fix buffer overrun on invalid state load 2014-05-05 22:15:03 +02:00
sh4 cputlb: Change tlb_flush() argument to CPUState 2014-03-13 19:52:47 +01:00
sparc sun4m: Add Sun CG3 framebuffer initialisation function 2014-02-27 10:01:41 +00:00
sparc64 pc,pci,virtio fixes and cleanups 2013-09-03 12:31:07 -05:00
ssi savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
timer savevm: Remove all the unneeded version_minimum_id_old (arm) 2014-05-13 16:09:35 +01:00
tpm aio / timers: Untangle include files 2013-08-22 19:10:27 +02:00
unicore32 console: add head to index to qemu consoles. 2014-03-05 09:52:04 +01:00
usb libcacard: remove libcacard-specific CFLAGS and LIBS from global vars 2014-05-09 22:59:40 +02:00
virtio migration/next for 20140505 2014-05-07 14:51:21 +01:00
watchdog PortioList: Store PortioList in device state 2014-05-05 20:58:33 +02:00
xen trivial patches for 2014-05-07 2014-05-07 18:38:39 +01:00
xenpv xen: move Xen PV machine files to hw/xenpv 2014-05-07 16:14:50 +00:00
xtensa hw/xtensa: add support for ML605 and KC705 FPGA board 2014-02-24 04:47:01 +04:00
Makefile.objs hw/9pfs: Include virtio-9p-device.o in build 2014-03-04 09:20:49 +05:30