qemu-irix/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
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
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
cris
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
isa PortioList: Store PortioList in device state 2014-05-05 20:58:33 +02:00
lm32
m68k
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
pci pci: add Error-propagating pci_add_capability2() 2014-05-08 14:19:59 -04:00
pci-bridge
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
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
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
Makefile.objs hw/9pfs: Include virtio-9p-device.o in build 2014-03-04 09:20:49 +05:30