Re: [PATCH] pciehp: fast unplug for virtual machines

Gerd Hoffmann
2021-11-15T10:11:09Z

Hi,

> Same for the 1 second delay in remove_board(). That's mandated by
> PCIe r5.0, sec. 6.7.1.8, but it's only observed if a Power Controller
> is present. So just clear the Power Controller Present bit in the
> Slot Capabilities register and the delay is gone.

Well, the power control bit is a useful data channel. qemu can use that
to figure whenever the guest uses the device (power is on) or not (power
is off). And in case power is off anyway we can simply remove the
device without the attention button dance.

take care,
Gerd