diff options
author | Akihiko Odaki <akihiko.odaki@daynix.com> | 2023-07-11 00:38:36 +0900 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-07-10 18:59:32 -0400 |
commit | 7c228c5f3301113ffd7cfee7f982e7ae04c8ffda (patch) | |
tree | 6aed69b52bc5f58b3b0ce51128dd5ff756929430 /hw/pci/pcie.c | |
parent | 445416e3010a2525c577d692921979a64d88a998 (diff) | |
download | qemu-7c228c5f3301113ffd7cfee7f982e7ae04c8ffda.zip qemu-7c228c5f3301113ffd7cfee7f982e7ae04c8ffda.tar.gz qemu-7c228c5f3301113ffd7cfee7f982e7ae04c8ffda.tar.bz2 |
pcie: Specify 0 for ARI next function numbers
The current implementers of ARI are all SR-IOV devices. The ARI next
function number field is undefined for VF according to PCI Express Base
Specification Revision 5.0 Version 1.0 section 9.3.7.7. The PF still
requires some defined value so end the linked list formed with the field
by specifying 0 as required for any ARI implementation according to
section 7.8.7.2.
For migration, the field will keep having 1 as its value on the old
QEMU machine versions.
Fixes: 2503461691 ("pcie: Add some SR/IOV API documentation in docs/pcie_sriov.txt")
Fixes: 44c2c09488 ("hw/nvme: Add support for SR-IOV")
Fixes: 3a977deebe ("Intrdocue igb device emulation")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Ani Sinha <anisinha@redhat.com>
Message-Id: <20230710153838.33917-3-akihiko.odaki@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci/pcie.c')
-rw-r--r-- | hw/pci/pcie.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 6075ff5..6db0cf6 100644 --- a/hw/pci/pcie.c +++ b/hw/pci/pcie.c @@ -1041,7 +1041,7 @@ void pcie_sync_bridge_lnk(PCIDevice *bridge_dev) /* ARI */ void pcie_ari_init(PCIDevice *dev, uint16_t offset) { - uint16_t nextfn = 1; + uint16_t nextfn = dev->cap_present & QEMU_PCIE_ARI_NEXTFN_1 ? 1 : 0; pcie_add_capability(dev, PCI_EXT_CAP_ID_ARI, PCI_ARI_VER, offset, PCI_ARI_SIZEOF); |