)]}'
{
  "commit": "dd87bafc40adb36d96e2bcc96ae1be464709db69",
  "tree": "0a11f2c84aaef9a4f2bf0a5a14d565ed2af2e2b4",
  "parents": [
    "01bd046e7b4bf3087821945a480c9ec90c6fb35a"
  ],
  "author": {
    "name": "Kevin Loughlin",
    "email": "kevinloughlin@google.com",
    "time": "Wed Oct 21 15:34:24 2026 +0000"
  },
  "committer": {
    "name": "mergify[bot]",
    "email": "37929162+mergify[bot]@users.noreply.github.com",
    "time": "Mon Oct 26 20:45:42 2026 +0000"
  },
  "message": "OvmfPkg/PlatformBootManagerLib: Avoid full 64-byte PCI header reads in BDS\n\nVisitingAPciInstance() currently reads the entire 64-byte PCI_TYPE00\nconfiguration header (16 32-bit reads per device) on every invocation of\nVisitAllPciInstances(). Under virtualization (especially confidential\ncomputing guests such as SEV-SNP and TDX where each config-space access\ntriggers a #VC/#VE exit to the VMM), reading all 16 DWORDs per device\nacross multiple BDS passes adds significant unnecessary exit overhead:\n\n1. SetPciIntLine() only inspects the 1-byte InterruptPin register\n   (PCI_INT_PIN_OFFSET, 0x3D). Convert SetPciIntLine() to a\n   PROTOCOL_INSTANCE_CALLBACK invoked via VisitAllInstancesOfProtocol()\n   that reads PCI_INT_PIN_OFFSET directly with a single 8-bit read,\n   eliminating 15 config-space reads per PCI device during\n   PciAcpiInitialization().\n2. With SetPciIntLine() converted, all remaining VisitAllPciInstances()\n   callbacks (DetectAndPreparePlatformPciDevicePath() and\n   ConnectRecursivelyIfPciMassStorage()) only inspect fields within the\n   16-byte PCI_DEVICE_INDEPENDENT_REGION (Pci.Hdr). Update\n   VisitingAPciInstance() to read only sizeof (Pci.Hdr) / sizeof (UINT32)\n   (4 DWORDs instead of 16) while zeroing the remainder of PCI_TYPE00.\n\nSigned-off-by: Kevin Loughlin \u003ckevinloughlin@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4252c32f127c127ca5dba6094234d742feac91c9",
      "old_mode": 33188,
      "old_path": "OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c",
      "new_id": "31f89123ef1c25b12c2d1f00a774640e4cef66e0",
      "new_mode": 33188,
      "new_path": "OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c"
    },
    {
      "type": "modify",
      "old_id": "b6dcf3de060bb1d2508d8747d22e61effb0f1f66",
      "old_mode": 33188,
      "old_path": "OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c",
      "new_id": "34c1dbf07b801753a3b3e14cf49c65d365c4513f",
      "new_mode": 33188,
      "new_path": "OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c"
    }
  ]
}
