qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Tai <thomas.tai@oracle.com>
To: thomas.tai@oracle.com, qemu-devel@nongnu.org, dmitry.fleytman@gmail.com
Subject: [Qemu-devel] [PATCH] e1000e : fix PCIe AER error injection
Date: Fri, 23 Feb 2018 10:02:01 -0500	[thread overview]
Message-ID: <20180223150201.2960-1-thomas.tai@oracle.com> (raw)

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 <thomas.tai@oracle.com>
---
 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, Error **errp)
         hw_error("Failed to initialize PM capability");
     }
 
+    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");
-- 
2.14.1

                 reply	other threads:[~2018-02-23 15:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180223150201.2960-1-thomas.tai@oracle.com \
    --to=thomas.tai@oracle.com \
    --cc=dmitry.fleytman@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).