qemu-e2k/hw
Simon Veith 05ff2fb80c hw/arm/smmuv3: Check stream IDs against actual table LOG2SIZE
When checking whether a stream ID is in range of the stream table, we
have so far been only checking it against our implementation limit
(SMMU_IDR1_SIDSIZE). However, the guest can program the
STRTAB_BASE_CFG.LOG2SIZE field to a size that is smaller than this
limit.

Check the stream ID against this limit as well to match the hardware
behavior of raising C_BAD_STREAMID events in case the limit is exceeded.
Also, ensure that we do not go one entry beyond the end of the table by
checking that its index is strictly smaller than the table size.

ref. ARM IHI 0070C, section 6.3.24.

Signed-off-by: Simon Veith <sveith@amazon.de>
Acked-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Message-id: 1576509312-13083-4-git-send-email-sveith@amazon.de
Cc: Eric Auger <eric.auger@redhat.com>
Cc: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-20 14:03:00 +00:00
..
9pfs 9pfs: make Error **errp const where it is appropriate 2019-12-18 08:43:19 +01:00
acpi * More uses of RCU_READ_LOCK_GUARD (Dave, myself) 2019-12-20 11:20:25 +00:00
adc
alpha hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
arm hw/arm/smmuv3: Check stream IDs against actual table LOG2SIZE 2019-12-20 14:03:00 +00:00
audio hw/audio: Remove the "use_broken_id" hack from the AC97 device 2019-12-18 02:34:12 +01:00
block
bt
char
core * More uses of RCU_READ_LOCK_GUARD (Dave, myself) 2019-12-20 11:20:25 +00:00
cpu
cris
display vga: cleanup mapping of VRAM for non-PCI VGA 2019-12-18 02:34:13 +01:00
dma
gpio
hppa hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
hyperv hyperv: Use auto rcu_read macros 2019-12-17 19:33:52 +01:00
i2c
i386 * More uses of RCU_READ_LOCK_GUARD (Dave, myself) 2019-12-20 11:20:25 +00:00
ide
input hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
intc * More uses of RCU_READ_LOCK_GUARD (Dave, myself) 2019-12-20 11:20:25 +00:00
ipack
ipmi hw/ipmi: Fix realize() error API violations 2019-12-18 08:36:15 +01:00
isa hw/isa/isa-bus: cleanup irq functions 2019-12-17 19:33:51 +01:00
lm32
m68k
mem memory-device: Fix memory pre-plug error API violations 2019-12-18 08:36:15 +01:00
microblaze
mips hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
misc
moxie
net
nios2
nubus
nvram
openrisc
pci hw/pci: Remove the "command_serr_enable" property 2019-12-18 02:34:12 +01:00
pci-bridge
pci-host hw/pci-host: Add Kconfig entry to select the IGD Passthrough Host Bridge 2019-12-18 02:34:12 +01:00
pcmcia
ppc * More uses of RCU_READ_LOCK_GUARD (Dave, myself) 2019-12-20 11:20:25 +00:00
rdma
riscv
rtc
s390x hw/s390x: rename Error ** parameter to more common errp 2019-12-18 08:43:19 +01:00
scsi
sd hw/sd: drop extra whitespace in sdhci_sysbus_realize() header 2019-12-18 08:43:19 +01:00
semihosting
sh4
smbios
sparc
sparc64
ssi
timer
tpm hw/tpm: rename Error ** parameter to more common errp 2019-12-18 08:43:19 +01:00
tricore
unicore32
usb hw/usb: rename Error ** parameter to more common errp 2019-12-18 08:43:19 +01:00
vfio hw/vfio/ap: drop local_err from vfio_ap_realize 2019-12-18 08:43:19 +01:00
virtio configure: simplify vhost condition with Kconfig 2019-12-17 19:32:48 +01:00
watchdog
xen xen: convert "-machine igd-passthru" to an accelerator property 2019-12-17 19:32:27 +01:00
xenpv
xtensa
Kconfig
Makefile.objs