diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2024-01-29 10:53:55 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2024-01-29 10:53:56 +0000 |
| commit | 11be70677c70fdccd452a3233653949b79e97908 (patch) | |
| tree | d21b6c819cfdb010a67f66499315476294de4693 | |
| parent | e7390150e78364a80924accde8bc5b8cd8f26bc9 (diff) | |
| parent | d2b668fca5652760b435ce812a743bba03d2f316 (diff) | |
| download | focaccia-qemu-11be70677c70fdccd452a3233653949b79e97908.tar.gz focaccia-qemu-11be70677c70fdccd452a3233653949b79e97908.zip | |
Merge tag 'pull-vfio-20240129' of https://github.com/legoater/qemu into staging
vfio queue: * Array type cleanup * Fix for IRQ enablement # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmW3VcQACgkQUaNDx8/7 # 7KGmzBAAqjkIO1ABKnXMTmObXqRwUjWzHyrn99Tl14f3dXeSEbiTkP/eha0yq9UQ # GrfJqxbLvz/umh+2el9yA1eF+B2SdozpSnIeqyg15307ujbCe6S01s8KOHQtu81v # V8wOFzyx/2S5PPQLGyNK5jiHIHuzbNrngcJXVYMg7pV75znbUNNQUUFoJNsrjQrG # vG99RVp+oY9U7f4BstUUL12n1VFD43y2cx5k/xVPCHh77vvdOhTXhm6G9qiiqROG # DG+yaghHDxPP96f4WAQOaSU9bBYFCQAkMtLUU/UBbD7nAWTY9onWq6YHcShyAnXg # LVcSoymwCCFo7n/NM+v4y6/cYOcttkgQhg4NYOTj6L8UeXIJppR047QwEcdIxMKY # CDFZbbkvxRma38Gr6eK0VwtINuTSZzzpPebhqQk0R3MQsvlJcCvc6PhkhgYOMzfb # POnqlrm+JAY4EMnlejkJhVJtpfrKwkThkFAS/hqponzJyNckyVnKiVkCp4i+YTtq # WOGelLGocA/IdEJT0Ca+zRFPjrm5BUCSVnmVUXekRiQrZ4BiBNIWKI8ZgrGIF0F4 # AOCH/J8SBbfZg4NVRTm7vMEctX7ji/A9Wo8RQ4DpPmfNxLLHsmzghNCtIzj47fzj # HwEWqgbDIBo7S8iB8lV6VKiznVnU67J4IZYjwwzU+AxJg3+O8wU= # =zTyl # -----END PGP SIGNATURE----- # gpg: Signature made Mon 29 Jan 2024 07:37:40 GMT # gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1 # gpg: Good signature from "Cédric Le Goater <clg@kaod.org>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: A0F6 6548 F048 95EB FE6B 0B60 51A3 43C7 CFFB ECA1 * tag 'pull-vfio-20240129' of https://github.com/legoater/qemu: vfio/pci: Clear MSI-X IRQ index always vfio: use matching sizeof type Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| -rw-r--r-- | hw/vfio/common.c | 2 | ||||
| -rw-r--r-- | hw/vfio/pci.c | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 4aa86f563c..059bfdc07a 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -1118,7 +1118,7 @@ static int vfio_device_dma_logging_report(VFIODevice *vbasedev, hwaddr iova, { uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature) + sizeof(struct vfio_device_feature_dma_logging_report), - sizeof(__u64))] = {}; + sizeof(uint64_t))] = {}; struct vfio_device_feature *feature = (struct vfio_device_feature *)buf; struct vfio_device_feature_dma_logging_report *report = (struct vfio_device_feature_dma_logging_report *)feature->data; diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index d7fe06715c..4fa387f043 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -826,9 +826,11 @@ static void vfio_msix_disable(VFIOPCIDevice *vdev) } } - if (vdev->nr_vectors) { - vfio_disable_irqindex(&vdev->vbasedev, VFIO_PCI_MSIX_IRQ_INDEX); - } + /* + * Always clear MSI-X IRQ index. A PF device could have enabled + * MSI-X with no vectors. See vfio_msix_enable(). + */ + vfio_disable_irqindex(&vdev->vbasedev, VFIO_PCI_MSIX_IRQ_INDEX); vfio_msi_disable_common(vdev); vfio_intx_enable(vdev, &err); |