You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/hw/pci
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>
2 years ago
..
Kconfig kconfig: add CONFIG_MSI_NONBROKEN 6 years ago
meson.build hw/pci: PCIe Data Object Exchange emulation 2 years ago
msi.c msi: fix MSI vector limit check in msi_set_mask() 2 years ago
msix.c msix: Assert that specified vector is in range 2 years ago
pci-stub.c qapi: Extract PCI commands to 'pci.json' 4 years ago
pci.c vfio-user: handle device interrupts 2 years ago
pci_bridge.c pci: fix PCI resource reserve capability on BE 3 years ago
pci_host.c trace-events,pci: unify trace events format 3 years ago
pcie.c pcie: Don't try triggering a LSI when not defined 3 years ago
pcie_aer.c Trivial: 3 char repeat typos 2 years ago
pcie_doe.c hw/pci: PCIe Data Object Exchange emulation 2 years ago
pcie_host.c Do not include exec/address-spaces.h if it's not really necessary 4 years ago
pcie_port.c pci/pcie_port: Add pci_find_port_by_pn() 3 years ago
pcie_sriov.c Use g_new() & friends where that makes obvious sense 3 years ago
shpc.c Trivial: 3 char repeat typos 2 years ago
slotid_cap.c pci: Convert shpc_init() to Error 8 years ago
trace-events pcie: Add support for Single Root I/O Virtualization (SR/IOV) 3 years ago
trace.h trace: switch position of headers to what Meson requires 4 years ago