HomeFreeBSD

bhyve: use pci_next() to save/restore pci devices

Description

bhyve: use pci_next() to save/restore pci devices

Current snapshot implementation doesn't support multiple devices with
similar type. For example, two virtio-blk or two CD-ROM-s, etc.

So the following configuration cannot be restored.

bhyve \
-s 3,virtio-blk,disk.img \
-s 4,virtio-blk,disk2.img

In some cases it is restored silently, but doesn't work. In some cases
it fails during restore stage.

This commit fixes that issue.

Reviewed by: corvink, rew
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D40109

Details

Provenance
gusev.vitaliy_gmail.comAuthored on May 15 2023, 2:29 PM
corvinkCommitted on Jun 19 2023, 5:57 AM
Reviewer
corvink
Differential Revision
D40109: bhyve: [snapshot] Use pci_next() to save/restore pci devices
Parents
rG6f7d2cf8bbb5: bhyve: add .pe_snapshot method for PCI 'hostbridge'
Branches
Unknown
Tags
Unknown