Branch: qemu_bootorder_connect

Adding tens or hundreds of bootable devices to a QEMU VM config slows
the OVMF and ArmVirtQemu boots to a crawl, several people have reported
in the past.

There are at least two reasons for this (high pflash traffic due to
heavy nvvar massaging per device, and PCI config space access slowing
down on QEMU as the number of regions increases). However, part of the
pain is self-inflicted in our PlatformBootManagerLib instances: we
connect all bootable devices (for maximum compatibility with the user's
VM config) even if the user doesn't intend to boot off most of them.

It's oft repeated that the set of devices connected during boot is
platform policy, so this series replaces the culprit
EfiBootManagerConnectAll() calls with a bit smarter algorithm.

I sought to keep the commit messages under control.

Cc: Ard Biesheuvel <>
Cc: Jordan Justen <>
Cc: Shannon Zhao <>
Cc: Xiang Zheng <>


Laszlo Ersek (6):
  OvmfPkg/QemuBootOrderLib: wrap overlong line
  OvmfPkg/QemuBootOrderLib: add missing EFIAPI specifiers
  OvmfPkg/QemuBootOrderLib: clean up translation of virtio-net over MMIO
  OvmfPkg/QemuBootOrderLib: add ConnectDevicesFromQemu()
  OvmfPkg/PlatformBootManagerLib: minimize the set of connected devices
  ArmVirtPkg/PlatformBootManagerLib: minimize the set of connected

 ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c |  12 +-
 OvmfPkg/Include/Library/QemuBootOrderLib.h             |  41 ++++-
 OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c   |  16 +-
 OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c    | 165 
 4 files changed, 218 insertions(+), 16 deletions(-)


edk2-devel mailing list

Reply via email to