W dniu 17.10.2024 o 18:58, Michael S. Tsirkin pisze:
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 4b2f0805c6..54c0f1ec67 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -86,7 +86,8 @@ pcie_cap_v1_fill(PCIDevice *dev, uint8_t port, uint8_t type, 
uint8_t version)
       * Specification, Revision 1.1., or subsequent PCI Express Base
       * Specification revisions.
       */
-    pci_set_long(exp_cap + PCI_EXP_DEVCAP, PCI_EXP_DEVCAP_RBER);
+    pci_set_long(exp_cap + PCI_EXP_DEVCAP, PCI_EXP_DEVCAP_RBER |
+                 PCI_EXP_DEVCAP_EXT_TAG);
pci_set_long(exp_cap + PCI_EXP_LNKCAP,
                   (port << PCI_EXP_LNKCAP_PN_SHIFT) |

We can't change capabilities unconditionally.
It needs at least a machine type compat thing.

Started looking and wonder how to pass it from MachineClass level down to pcie.c/pcie_cap_v1_fill() level.

hw/arm/sbsa-ref.c (the machine I know best) has create_pcie() which allocates PCI_HOST_BRIDGE and then creates 2 pcie devices (default_nic (e1000e) and bochs-display gfx).

If I add "pcie_uses_ext_tags = true" to SBSAMachineState then I need to have it stored in PCIBus structure so pci_create_simple() will know. This function would copy it into "dev" (PCIDevice) to make it pass to pcie_cap_v1_fill() function.

But that's not right way because other PCIe devices are created in other places.

Need to dig deeper.

Reply via email to