From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLXw7-00014q-GW for qemu-devel@nongnu.org; Sun, 24 Aug 2014 09:34:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLXvm-0005Pb-1T for qemu-devel@nongnu.org; Sun, 24 Aug 2014 09:34:23 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:30470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLXvl-0005PQ-S2 for qemu-devel@nongnu.org; Sun, 24 Aug 2014 09:34:01 -0400 From: Knut Omang Date: Sun, 24 Aug 2014 15:32:17 +0200 Message-Id: <1408887140-3320-2-git-send-email-knut.omang@oracle.com> In-Reply-To: <1408887140-3320-1-git-send-email-knut.omang@oracle.com> References: <1408887140-3320-1-git-send-email-knut.omang@oracle.com> Subject: [Qemu-devel] [PATCH v2 1/4] pcie: Fix incorrect write to the ari capability next function field List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , Alexey Kardashevskiy , Juan Quintela , Knut Omang , Markus Armbruster , "Gonglei (Arei)" , "Michael S. Tsirkin" , Igor Mammedov , Paolo Bonzini PCI_ARI_CAP_NFN, a macro for reading next function was used instead of the intended write. Signed-off-by: Knut Omang --- hw/pci/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index a123c01..de0e967 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); } -- 1.9.0