From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYDBW-0002H8-O0 for qemu-devel@nongnu.org; Wed, 18 Mar 2015 08:34:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYDBV-00022S-Rz for qemu-devel@nongnu.org; Wed, 18 Mar 2015 08:34:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42270) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYDBV-00022I-D9 for qemu-devel@nongnu.org; Wed, 18 Mar 2015 08:34:53 -0400 Date: Wed, 18 Mar 2015 13:34:45 +0100 From: "Michael S. Tsirkin" Message-ID: <1426682025-20844-5-git-send-email-mst@redhat.com> References: <1426682025-20844-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1426682025-20844-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 4/8] aer: fix wrong check on expose aer tlp prefix log List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Chen Fan , Peter Maydell From: Chen Fan when specify TLP Prefix log as using pcie_aer_inject_error, the TLP prefix log is always discarded. because the check is incorrect, the End-End TLP Prefix Supported bit (PCI_EXP_DEVCAP2_EETLPP) should be in Device Capabilities 2 Register. Signed-off-by: Chen Fan Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/pcie_aer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c index 5a25c32..c7fad34 100644 --- a/hw/pci/pcie_aer.c +++ b/hw/pci/pcie_aer.c @@ -433,7 +433,7 @@ static void pcie_aer_update_log(PCIDevice *dev, const PCIEAERErr *err) } if ((err->flags & PCIE_AER_ERR_TLP_PREFIX_PRESENT) && - (pci_get_long(dev->config + dev->exp.exp_cap + PCI_EXP_DEVCTL2) & + (pci_get_long(dev->config + dev->exp.exp_cap + PCI_EXP_DEVCAP2) & PCI_EXP_DEVCAP2_EETLPP)) { for (i = 0; i < ARRAY_SIZE(err->prefix); ++i) { /* 7.10.12 tlp prefix log register */ -- MST