bhyve: Reject unsupported checkpoints before saving RAM
pci_snapshot() rejects devices without a pe_snapshot callback, but
vm_checkpoint() reaches that check only after truncating checkpoint
files, pausing the VM, and saving RAM and kernel state.
Check for unsupported PCI devices at the start of vm_checkpoint(),
before creating files or pausing the VM. This preserves existing
checkpoint files when the request cannot succeed. Add
pci_can_snapshot() so that the new check and pci_snapshot() use the
same test.
Reviewed by: markj, kevans
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D61003
camcontrol: Fix extended host identifier retrieval
The Get Features command for the host identifier always requested
the 64-bit form (cdw11 EXHID=0), but the decoding logic sized the
identifier from the controller's CTRATT extended host identifier
capability bit, or always treated it as 128 bits when -U was
given. On a controller supporting the extended host identifier,
the printed value did not match what was requested from the
controller.
Fetch the controller data before issuing the command, request the
extended form when the controller supports it, and decode the form
that was requested. Reject -U when the controller only supports
64-bit host identifiers, since an 8 byte value cannot be shown as
a UUID.
sys/cam/nvme/nvme_all.c,
sys/cam/nvme/nvme_all.h:
Add an exhid argument to nvme_get_feature_hostid(),
[19 lines not shown]