Re: PcdPciBusHotplugDevice

Laszlo Ersek

On 07/31/20 21:29, Quach, Natalie wrote:
Hi All,

Does anyone know whether the development status of Pcie Hotplug support using PcdPciBusHotplugDevice is completed (especially with respect to NVME drives)? Has anyone successfully enabled this feature on any platform?
Not sure what should be mising at this point; the DEC default for
PcdPciBusHotplugDeviceSupport is TRUE.

Using OVMF, virtual PCI and PCIe devices can be hot-plugged. (Not sure
about NVME, but virtio-blk-pci and such have been tested.)

I *vaguely* recall successful hotpug of assigned physical PCIe devices
too (such as GPUs); but I don't have any particular pointers.

OVMF does need a separate (plaform) driver for this; see

EFI_PCI_HOT_PLUG_INIT_PROTOCOL is described in the PI spec. OVMF
produces this protocol in this driver. The goal is to make PciBusDxe
allocate sufficient PCI resources in advance, on hotplug controllers
(that is, on bridges).

In case of OVMF, the resource reservation hints come from QEMU. On other
(physical) platforms, the reservation sizes are probably controlled in
the BIOS setup utility (via HII), or they are hard-coded in some
platform-specific way.

So, yes, the feature works. (I vaguely recall I had to contribute some
fixes to PciBusDxe too, but it's been quite a while.)


Join { to automatically receive all group messages.