|
@@ -112,10 +112,13 @@ int pcie_aer_init(PCIDevice *dev, uint8_t cap_ver, uint16_t offset,
|
|
|
|
|
|
pci_set_long(dev->w1cmask + offset + PCI_ERR_UNCOR_STATUS,
|
|
pci_set_long(dev->w1cmask + offset + PCI_ERR_UNCOR_STATUS,
|
|
PCI_ERR_UNC_SUPPORTED);
|
|
PCI_ERR_UNC_SUPPORTED);
|
|
- pci_set_long(dev->config + offset + PCI_ERR_UNCOR_MASK,
|
|
|
|
- PCI_ERR_UNC_MASK_DEFAULT);
|
|
|
|
- pci_set_long(dev->wmask + offset + PCI_ERR_UNCOR_MASK,
|
|
|
|
- PCI_ERR_UNC_SUPPORTED);
|
|
|
|
|
|
+
|
|
|
|
+ if (dev->cap_present & QEMU_PCIE_ERR_UNC_MASK) {
|
|
|
|
+ pci_set_long(dev->config + offset + PCI_ERR_UNCOR_MASK,
|
|
|
|
+ PCI_ERR_UNC_MASK_DEFAULT);
|
|
|
|
+ pci_set_long(dev->wmask + offset + PCI_ERR_UNCOR_MASK,
|
|
|
|
+ PCI_ERR_UNC_SUPPORTED);
|
|
|
|
+ }
|
|
|
|
|
|
pci_set_long(dev->config + offset + PCI_ERR_UNCOR_SEVER,
|
|
pci_set_long(dev->config + offset + PCI_ERR_UNCOR_SEVER,
|
|
PCI_ERR_UNC_SEVERITY_DEFAULT);
|
|
PCI_ERR_UNC_SEVERITY_DEFAULT);
|