Skip to contentSkip to conversation

e1000e : fix PCIe AER error injection

PATCH New Thomas Tai 1 participant 1 message Feb 23, 2018

lore
Share & tools
lore

Thomas Tai

author
#0 lore raw

PATCH 1/1 e1000e : fix PCIe AER error injection

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.

---
 hw/net/e1000e.c | 1 +
 1 file changed, 1 insertion(+)
hw/net/e1000e.c +1 -0
index 191398a3d5..1ebcaa2d19 100644
@@ -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");
Signature · 1 line
2.14.1