qemu-e2k/hw/remote
Akihiko Odaki 15377f6e79 msix: Assert that specified vector is in range
There were several different ways to deal with the situation where the
vector specified for a msix function is out of bound:
- early return a function and keep progresssing
- propagate the error to the caller
- mark msix unusable
- assert it is in bound
- just ignore

An out-of-bound vector should not be specified if the device
implementation is correct so let msix functions always assert that the
specified vector is in range.

An exceptional case is virtio-pci, which allows the guest to configure
vectors. For virtio-pci, it is more appropriate to introduce its own
checks because it is sometimes too late to check the vector range in
msix functions.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20220829083524.143640-1-akihiko.odaki@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Yuval Shaia <yuval.shaia.ml@gmail.com>
Signed-off-by: Akihiko Odaki &lt;<a href="mailto:akihiko.odaki@daynix.com" target="_blank">akihiko.odaki@daynix.com</a>&gt;<br>
2022-11-07 14:08:17 -05:00
..
iohub.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
iommu.c Use g_new() & friends where that makes obvious sense 2022-10-04 00:10:11 +02:00
Kconfig vfio-user: build library 2022-06-15 16:42:33 +01:00
machine.c vfio-user: handle device interrupts 2022-06-15 16:43:42 +01:00
memory.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
meson.build vfio-user: IOMMU support for remote device 2022-06-15 16:43:42 +01:00
message.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
mpqemu-link.c QIOChannel: Add flags on io_writev and introduce io_flush callback 2022-05-16 13:56:24 +01:00
proxy-memory-listener.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
proxy.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
remote-obj.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
trace-events vfio-user: handle device interrupts 2022-06-15 16:43:42 +01:00
trace.h
vfio-user-obj.c msix: Assert that specified vector is in range 2022-11-07 14:08:17 -05:00