summary refs log tree commit diff stats
path: root/hw/pci
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-06-28 11:51:07 +0530
committerRichard Henderson <richard.henderson@linaro.org>2022-06-28 11:51:07 +0530
commit2a8835cb45371a1f05c9c5899741d66685290f28 (patch)
tree0ffc5882f2e248c3ed5d00789b20aff87b7f2205 /hw/pci
parentad4c7f529a279685da84297773b4ec8080153c2d (diff)
parent81cf38f3ff3c7db8fcd2f46df9a294fdf6f4a910 (diff)
downloadfocaccia-qemu-2a8835cb45371a1f05c9c5899741d66685290f28.tar.gz
focaccia-qemu-2a8835cb45371a1f05c9c5899741d66685290f28.zip
Merge tag 'for_upstream' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging
virtio: fixes

fixes all over the place

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# -----BEGIN PGP SIGNATURE-----
#
# iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmK6NQoPHG1zdEByZWRo
# YXQuY29tAAoJECgfDbjSjVRp/sQIAJGiYliUHElJapM/4KSsXKWCFtk9B8wJuUie
# yeMKOdD6QSk9tk/HkYSCnMB7G6Fe+MtoE+sPm/6l5nOFqvqVVJw9vOKteWHSpQ0E
# 9CgbR7s7K1MoLG9J613iB2OtAfhPrWEvSOJ6mvTAxGgxhCQw6UzC88cYfBHJ/efn
# GAhVlriSfSCRANmivjY+g4h4JFWWSMTH6m9u4wKBJF8GRkNgN+C50Z+bp8aE7wRT
# KiMoaaYUDOjxzD+8nGYggg/t+UIM7jG2t8M5BMbC0NMP+ovVZeesWK6ZOzoda2tI
# ZONV0dLikLCicyOvfMH6YDqzGtchCDmS0hpfuorhlzsntm42RBM=
# =T+gr
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 28 Jun 2022 04:24:02 AM +0530
# gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:                issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [undefined]
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [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: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* tag 'for_upstream' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu:
  include/hw/virtio: document vhost_ack_features
  include/hw/virtio: document vhost_get_features
  contrib/vhost-user-blk: fix 32 bit build and enable
  MAINTAINERS: Collect memory device files in "Memory devices"
  libvhost-user: Fix VHOST_USER_ADD_MEM_REG reply
  libvhost-user: Fix VHOST_USER_GET_MAX_MEM_SLOTS reply
  docs/vhost-user: Fix mismerge
  virtio-iommu: Fix migration regression
  vhost: setup error eventfd and dump errors
  vhost: add method vhost_set_vring_err
  msi: fix MSI vector limit check in msi_set_mask()
  virtio-iommu: Fix the partial copy of probe request

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/pci')
-rw-r--r--hw/pci/msi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/pci/msi.c b/hw/pci/msi.c
index 5c471b9616..058d1d1ef1 100644
--- a/hw/pci/msi.c
+++ b/hw/pci/msi.c
@@ -322,9 +322,9 @@ void msi_set_mask(PCIDevice *dev, int vector, bool mask, Error **errp)
     bool msi64bit = flags & PCI_MSI_FLAGS_64BIT;
     uint32_t irq_state, vector_mask, pending;
 
-    if (vector > PCI_MSI_VECTORS_MAX) {
+    if (vector >= PCI_MSI_VECTORS_MAX) {
         error_setg(errp, "msi: vector %d not allocated. max vector is %d",
-                   vector, PCI_MSI_VECTORS_MAX);
+                   vector, (PCI_MSI_VECTORS_MAX - 1));
         return;
     }