summary refs log tree commit diff stats
path: root/include/hw
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2023-08-29 16:14:29 -0400
committerMichael S. Tsirkin <mst@redhat.com>2023-10-04 04:53:52 -0400
commit4565917bb034479a29c04f0b44124e7f61585ccf (patch)
treefe087c680bd572a2fdeafa343876177705ad0fdc /include/hw
parent494a6a2cf7f775d2c20fd6df9601e30606cc2014 (diff)
downloadfocaccia-qemu-4565917bb034479a29c04f0b44124e7f61585ccf.tar.gz
focaccia-qemu-4565917bb034479a29c04f0b44124e7f61585ccf.zip
pci: SLT must be RO
current code sets PCI_SEC_LATENCY_TIMER to RW, but for
pcie to pcie bridges it must be RO 0 according to
pci express spec which says:
    This register does not apply to PCI Express. It must be read-only
    and hardwired to 00h. For PCI Express to PCI/PCI-X Bridges, refer to the
    [PCIe-to-PCI-PCI-X-Bridge] for requirements for this register.

also, fix typo in comment where it's made writeable - this typo
is likely what prevented us noticing we violate this requirement
in the 1st place.

Reported-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Message-Id: <de9d05366a70172e1789d10591dbe59e39c3849c.1693432039.git.mst@redhat.com>
Tested-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/pci/pci_bridge.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/pci/pci_bridge.h b/include/hw/pci/pci_bridge.h
index ea54a81a15..5cd452115a 100644
--- a/include/hw/pci/pci_bridge.h
+++ b/include/hw/pci/pci_bridge.h
@@ -77,6 +77,9 @@ struct PCIBridge {
 
     pci_map_irq_fn map_irq;
     const char *bus_name;
+
+    /* SLT is RO for PCIE to PCIE bridges, but old QEMU versions had it RW */
+    bool pcie_writeable_slt_bug;
 };
 
 #define PCI_BRIDGE_DEV_PROP_CHASSIS_NR "chassis_nr"