This feature implements save-restore for multiple devices of the same type.
Initially the restore feature only restored the first device of a certain type.
The feature was rebased over commit 4a16bd8bb4cf1217720c21ae363626df51474edd.
Differential D26387
bhyve - Snapshot Save and Restore multiple devices Authored by ionut.mihalache1506_gmail.com on Sep 10 2020, 10:21 AM. Tags Referenced Files
Details This feature implements save-restore for multiple devices of the same type. Initially the restore feature only restored the first device of a certain type. The feature was rebased over commit 4a16bd8bb4cf1217720c21ae363626df51474edd. For a guest that has 2 ahci disks and 2 virtio-net network adapters the teste cases were:
Diff Detail
Event TimelineComment Actions vm_snapshot_kern_structs was called two times and probably caused a problem with save restore for multiple devices Comment Actions Besides my another comments and questions, what is advantage of changing order of the vm_snapshot_kern_structs and vm_snapshot_user_devs (if look at the diff) ?
Comment Actions
So I am adding rework of this review multiple-devices-v1.patch. Please look at this. Probably, if this patch is considered as good and better, I can Idea is: using unique name as identifier. For PCI devices it would be, for example, virtio-blk-pci-$bus-$slot-$func Changes:
For example: "devices" section in $dumpfile.meta would be: "devices": [
{
"device": "lpc-pci-0-31-0",
"size": 520,
"file_offset": 80418
},
{
"device": "virtio-net-pci-0-4-0",
"size": 66180,
"file_offset": 80938
},
{
"device": "virtio-blk-pci-0-3-0",
"size": 8819,
"file_offset": 147118
},
{
"device": "hostbridge-pci-0-0-0",
"size": 436,
"file_offset": 155937
},
{
"device": "atkbdc",
"size": 141,
"file_offset": 156373
}
]Comment Actions Rebased with a newer upstream and applied the changes from the review https://reviews.freebsd.org/D29538. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||