summaryrefslogtreecommitdiff
path: root/hw/pci/pcie.c
diff options
context:
space:
mode:
authorKnut Omang <knut.omang@oracle.com>2014-08-24 15:32:17 +0200
committerMichael S. Tsirkin <mst@redhat.com>2014-08-25 00:16:06 +0200
commitec70b46babac79efc249c8780cafeae97d1c3059 (patch)
treebf139b24041c853a9e6e6b96171bb4260ed9b692 /hw/pci/pcie.c
parentcec391d752801d1b8b30de2fb1b2dab29ad7e38c (diff)
downloadqemu-ec70b46babac79efc249c8780cafeae97d1c3059.tar.gz
qemu-ec70b46babac79efc249c8780cafeae97d1c3059.tar.bz2
qemu-ec70b46babac79efc249c8780cafeae97d1c3059.zip
pcie: Fix incorrect write to the ari capability next function field
PCI_ARI_CAP_NFN, a macro for reading next function was used instead of the intended write. Signed-off-by: Knut Omang <knut.omang@oracle.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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index a123c01ef1..de0e967327 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -630,5 +630,5 @@ void pcie_ari_init(PCIDevice *dev, uint16_t offset, uint16_t nextfn)
{
pcie_add_capability(dev, PCI_EXT_CAP_ID_ARI, PCI_ARI_VER,
offset, PCI_ARI_SIZEOF);
- pci_set_long(dev->config + offset + PCI_ARI_CAP, PCI_ARI_CAP_NFN(nextfn));
+ pci_set_long(dev->config + offset + PCI_ARI_CAP, (nextfn & 0xff) << 8);
}