Related to multiple devices support.
There is no error when dump doesn't have it, but to be more consistent this PCI devices should be saved as well.
Sponsored by: vStack
Differential D40108
bhyve: [snapshot] Add .pe_snapshot method for PCI 'hostbridge' gusev.vitaliy_gmail.com on May 15 2023, 2:03 PM. Authored by Tags Referenced Files
Details Related to multiple devices support. There is no error when dump doesn't have it, but to be more consistent this PCI devices should be saved as well. Sponsored by: vStack
Diff Detail
Event TimelineComment Actions not sure that devices should define a snapshot handler when not supported by the device. pci_snapshot() could be setup to silently ignore devices that dont implement snapshot functionality. either way, I don't have a preference Comment Actions At least it saves pdi.pi_cfgdata. Do you think it is waste doing and .pi_cfgdata can not be changed by guest OS or be changed between bhyve versions ?
Currently it is mandatory to have .pe_snapshot(). Some devices do not support save/restore, for example, virtio-scsi. And if allow to be .pe_snapshot() as optional, bhyve process will be snapshotted, but result snapshot can not be resumed properly. Comment Actions I don't know off the top of my head - haven't looked at it that close.
Alright. Comment Actions If .pe_snapshot() is NULL, save stage must fail. Otherwise it will succeed for PCI devices that still don't support suspend/resume, but resume will be Undefined behavior (UB). |