)]}'
{
  "commit": "0e84fd3b98feb2bdbfea75b9f7ff7993b2d5300f",
  "tree": "8f080891c3b0dabf3faef21216d78e6da562c5dd",
  "parents": [
    "1c103f35d19601d6ded430d4303be8d3b9ff44bd"
  ],
  "author": {
    "name": "Igor Mammedov",
    "email": "imammedo@redhat.com",
    "time": "Thu Mar 02 17:15:18 2023 +0100"
  },
  "committer": {
    "name": "Michael S. Tsirkin",
    "email": "mst@redhat.com",
    "time": "Tue Mar 07 12:38:59 2023 -0500"
  },
  "message": "x86: pcihp: fix missing bridge AML when intermediate root-port has \u0027hotplug\u003doff\u0027 set\n\n(I practice [1] hasn\u0027t broke anything since on hardware side we unset\nhotplug_handler on such intermediate port \u003d\u003e hotplug behind it has\nnever worked)\n\nWhen deciding if bridge should be described, the original\ncondition was\n\n  cold_plugged_bridge \u0026\u0026 pcihp_bridge_en\n\nwhich was replaced [1] by\n\n  bridge has ACPI_PCIHP_PROP_BSEL\n\nthe later however is not the same thing as the original\nand flips to false if intermediate bridge has hotplug\nturned off (root-port with \u0027hotplug\u003doff\u0027 option).\n\nSince we already in build_pci_bridge_aml(), the question\nif it\u0027s bridge is answered. Use DeviceState::hotplugged\nto make decision if bridge should describe its slots.\n\nWhat\u0027s left out is pcihp_bridge_en, which tells us if\nACPI bridge hotplug is enabled.\n\nWith hotplug and non hotplug part now being mostly\nseparated, omitting this check will only lead to\ncolplugged bridges describe occupied slots in case\nwhen ACPI bridge hotplug is disabled.\nWhich makes behavior consistent with occupied slots\non hostbridge.\n\nEx (pc/DSDT.hpbrroot diff):\n  ...\n               Device (S20)\n               {\n                   Name (_ADR, 0x00040000)  // _ADR: Address\n  +                Device (S08)\n  +                {\n  +                    Name (_ADR, 0x00010000)  // _ADR: Address\n  +                }\n  +\n  +                Device (S10)\n  +                {\n  +                    Name (_ADR, 0x00020000)  // _ADR: Address\n  +                }\n               }\n  ...\n\nPS:\ntesting shows that above doesn\u0027t affect adversely guest OS\nbehavior: i.e. if ACPI bridge hotplug is enabled it\u0027s\nexpected behaviour, and with ACPI bridge hotplug is disabled\n(a.k. native hotplug), it doesn\u0027t break slot enumeration\nnor native hotplug. (tested with RHEL9.0 and WS2022).\n\n1)\nFixes: 6c36ec46b0d (\"pcihp: make bridge describe itself using AcpiDevAmlIfClass:build_dev_aml\")\nSigned-off-by: Igor Mammedov \u003cimammedo@redhat.com\u003e\nMessage-Id: \u003c20230302161543.286002-10-imammedo@redhat.com\u003e\nReviewed-by: Michael S. Tsirkin \u003cmst@redhat.com\u003e\nSigned-off-by: Michael S. Tsirkin \u003cmst@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5f3ee5157fe9a35ff1119f4a09889b21f449b74f",
      "old_mode": 33188,
      "old_path": "hw/acpi/pci-bridge.c",
      "new_id": "4fbf6da6ad70da787baecb41c7949d3fdcd0e479",
      "new_mode": 33188,
      "new_path": "hw/acpi/pci-bridge.c"
    }
  ]
}
