From nobody Wed Oct 22 06:35:00 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=oracle.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1519398364632502.68470220852896; Fri, 23 Feb 2018 07:06:04 -0800 (PST) Received: from localhost ([::1]:45058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1epEvD-0002E7-TD for importer@patchew.org; Fri, 23 Feb 2018 10:06:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1epErS-0007k9-1L for qemu-devel@nongnu.org; Fri, 23 Feb 2018 10:02:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1epErO-0006r3-8I for qemu-devel@nongnu.org; Fri, 23 Feb 2018 10:02:10 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:57982) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1epErN-0006pM-VC for qemu-devel@nongnu.org; Fri, 23 Feb 2018 10:02:06 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1NEuovr044903; Fri, 23 Feb 2018 15:02:03 GMT Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2gamj2g9wu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 23 Feb 2018 15:02:03 +0000 Received: from thomastai-ThinkPad-T460.us.oracle.com ([10.39.243.145]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w1NF21Yw015799; Fri, 23 Feb 2018 15:02:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id; s=corp-2017-10-26; bh=98/lBDVNTZFFzyb+djIqIaURBziv79iyadjJgaOA9QM=; b=g4ZGSgsUfgZcpsOIvb/gZgOyEwwm+lJe+8VYJD9EVsTdL3NQmiQ+StUjUvivEpUDGRW7 9AE7hlRmp0wkRZMUltDc3hpU9uKywQJXO0iYmfuXgUQS0+N8QgfSsfpjz2qWQkVqKq2x INMlXdN99nEkbfWowyMphj6JFoY5LGG3gDILMRj6zKMFbSERvmSA0rEZ27y0CQyAL1M+ xBaRECtNnJL3tSg2cpGbw2NPNSduoibTRI4IXl/xvQj6FeIcNIlSsFLBL5Cpa4CC4545 ok981dsZi6vXYGuthTjvajkmwzSp73WRCvihHiz5pksQdwwhxqlF5M0VyGUzkVB98ZbB Ew== From: Thomas Tai To: thomas.tai@oracle.com, qemu-devel@nongnu.org, dmitry.fleytman@gmail.com Date: Fri, 23 Feb 2018 10:02:01 -0500 Message-Id: <20180223150201.2960-1-thomas.tai@oracle.com> X-Mailer: git-send-email 2.14.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8812 signatures=668677 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=910 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802230188 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.85 Subject: [Qemu-devel] [PATCH] e1000e : fix PCIe AER error injection X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" When using qemu pcie_aer_inject_error command to inject an error on e1000e, the error is not sent to the guest. The problem is caused by the e1000e did not initialize the device error control registers mask. Since the default mask is 0, any value written to the registers will be masked off. Followed pci-bridge/xio3130_downstream.c to use pcie_cap_deverr_init() to initialize the mask. Signed-off-by: Thomas Tai --- hw/net/e1000e.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index 191398a3d5..1ebcaa2d19 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -478,6 +478,7 @@ static void e1000e_pci_realize(PCIDevice *pci_dev, Erro= r **errp) hw_error("Failed to initialize PM capability"); } =20 + pcie_cap_deverr_init(pci_dev); if (pcie_aer_init(pci_dev, PCI_ERR_VER, e1000e_aer_offset, PCI_ERR_SIZEOF, NULL) < 0) { hw_error("Failed to initialize AER capability"); --=20 2.14.1