qemu-e2k/hw/nvme
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
..
ctrl.c msix: Assert that specified vector is in range 2022-11-07 14:08:17 -05:00
dif.c hw/nvme: add new command abort case 2022-06-03 21:48:24 +02:00
dif.h hw/nvme: 64-bit pi support 2022-03-03 09:30:21 +01:00
Kconfig
meson.build
ns.c hw/nvme: force nvme-ns param 'shared' to false if no nvme-subsys node 2022-07-15 10:40:33 +02:00
nvme.h hw/nvme: Use ioeventfd to handle doorbell updates 2022-07-15 10:40:33 +02:00
subsys.c hw/nvme: Add support for Secondary Controller List 2022-06-23 23:24:28 +02:00
trace-events hw/nvme: Add trace events for shadow doorbell buffer 2022-07-15 10:40:33 +02:00
trace.h