freebsd-dev/usr.sbin/bhyve
John Baldwin 483d953a86 Initial support for bhyve save and restore.
Save and restore (also known as suspend and resume) permits a snapshot
to be taken of a guest's state that can later be resumed.  In the
current implementation, bhyve(8) creates a UNIX domain socket that is
used by bhyvectl(8) to send a request to save a snapshot (and
optionally exit after the snapshot has been taken).  A snapshot
currently consists of two files: the first holds a copy of guest RAM,
and the second file holds other guest state such as vCPU register
values and device model state.

To resume a guest, bhyve(8) must be started with a matching pair of
command line arguments to instantiate the same set of device models as
well as a pointer to the saved snapshot.

While the current implementation is useful for several uses cases, it
has a few limitations.  The file format for saving the guest state is
tied to the ABI of internal bhyve structures and is not
self-describing (in that it does not communicate the set of device
models present in the system).  In addition, the state saved for some
device models closely matches the internal data structures which might
prove a challenge for compatibility of snapshot files across a range
of bhyve versions.  The file format also does not currently support
versioning of individual chunks of state.  As a result, the current
file format is not a fixed binary format and future revisions to save
and restore will break binary compatiblity of snapshot files.  The
goal is to move to a more flexible format that adds versioning,
etc. and at that point to commit to providing a reasonable level of
compatibility.  As a result, the current implementation is not enabled
by default.  It can be enabled via the WITH_BHYVE_SNAPSHOT=yes option
for userland builds, and the kernel option BHYVE_SHAPSHOT.

Submitted by:	Mihai Tiganus, Flavius Anton, Darius Mihai
Submitted by:	Elena Mihailescu, Mihai Carabas, Sergiu Weisz
Relnotes:	yes
Sponsored by:	University Politehnica of Bucharest
Sponsored by:	Matthew Grooms (student scholarships)
Sponsored by:	iXsystems
Differential Revision:	https://reviews.freebsd.org/D19495
2020-05-05 00:02:04 +00:00
..
acpi.c bhyve(8): Add VM Generation Counter ACPI device 2020-04-15 02:00:17 +00:00
acpi.h bhyve(8): Add VM Generation Counter ACPI device 2020-04-15 02:00:17 +00:00
ahci.h Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
atkbdc.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
atkbdc.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
audio.c bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
audio.h Add SPDX tags to bhyve(8) HD Audio device. 2019-06-25 06:24:56 +00:00
bhyve.8 Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
bhyvegc.c When this code was introduced at r300829 the author forgot to add 2018-06-13 04:00:21 +00:00
bhyvegc.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
bhyverun.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
bhyverun.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
block_if.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
block_if.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
bootrom.c bhyve(8): Add bootrom allocation abstraction 2020-04-15 01:58:51 +00:00
bootrom.h bhyve(8): Add bootrom allocation abstraction 2020-04-15 01:58:51 +00:00
console.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
console.h Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
consport.c bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
dbgport.c Use capsicum_helpers(3) that allow us to simplify the code and its functions 2019-01-16 00:39:23 +00:00
dbgport.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
debug.h bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
fwctl.c Always treat firmware request and response sizes as unsigned. 2018-12-04 18:28:25 +00:00
fwctl.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
gdb.c Support software breakpoints in the debug server on Intel CPUs. 2019-12-13 19:21:58 +00:00
gdb.h Support software breakpoints in the debug server on Intel CPUs. 2019-12-13 19:21:58 +00:00
hda_codec.c bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
hda_reg.h Add SPDX tags to bhyve(8) HD Audio device. 2019-06-25 06:24:56 +00:00
hdac_reg.h Add SPDX tags to bhyve(8) HD Audio device. 2019-06-25 06:24:56 +00:00
inout.c Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
inout.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ioapic.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ioapic.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
iov.c bhyve: enable virtio-net mergeable rx buffers for tap(4) 2020-02-20 21:07:23 +00:00
iov.h bhyve: enable virtio-net mergeable rx buffers for tap(4) 2020-02-20 21:07:23 +00:00
Makefile Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
Makefile.depend Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00
mem.c Add support for writing to guest memory in the debug server. 2019-05-24 00:34:13 +00:00
mem.h Add support for writing to guest memory in the debug server. 2019-05-24 00:34:13 +00:00
mevent_test.c Improve bhyve exit(3) error code. 2018-07-11 03:23:09 +00:00
mevent.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
mevent.h bhyve: add backend rx backpressure to virtio-net 2019-11-03 19:02:32 +00:00
mptbl.c bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
mptbl.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
net_backends.c bhyve: enable virtio-net mergeable rx buffers for tap(4) 2020-02-20 21:07:23 +00:00
net_backends.h Add VIRTIO_NET_F_MTU flag support for the bhyve virtio-net device. 2020-04-07 17:06:33 +00:00
net_utils.c Add VIRTIO_NET_F_MTU flag support for the bhyve virtio-net device. 2020-04-07 17:06:33 +00:00
net_utils.h Add VIRTIO_NET_F_MTU flag support for the bhyve virtio-net device. 2020-04-07 17:06:33 +00:00
pci_ahci.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
pci_e82545.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
pci_emul.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
pci_emul.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
pci_fbuf.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
pci_hda.c bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
pci_hda.h bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
pci_hostbridge.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
pci_irq.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
pci_irq.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
pci_lpc.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
pci_lpc.h Add -s "help" and -l "help" to print a list of supported PCI and LPC devices. 2018-08-22 20:23:08 +00:00
pci_nvme.c bhyve: fix NVMe emulation update of SQHD 2020-03-27 15:28:27 +00:00
pci_passthru.c Emulate reads of the PCI command register for passthrough devices. 2019-12-11 23:41:39 +00:00
pci_uart.c bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
pci_virtio_block.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
pci_virtio_console.c bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
pci_virtio_net.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
pci_virtio_rnd.c bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
pci_virtio_scsi.c bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
pci_xhci.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
pci_xhci.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
pm.c bhyve(8): Add VM Generation Counter ACPI device 2020-04-15 02:00:17 +00:00
post.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
ps2kbd.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
ps2kbd.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
ps2mouse.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
ps2mouse.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
rfb.c Bhyve: log message when rfb client connects 2020-03-18 03:17:15 +00:00
rfb.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
rtc.c Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
rtc.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
smbiostbl.c In the past changes have been made to smbios->minor without updating the 2020-04-07 23:17:44 +00:00
smbiostbl.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
snapshot.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
snapshot.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
sockstream.c Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
sockstream.h Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
spinup_ap.c various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
spinup_ap.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00
task_switch.c bhyve: add wrapper for debug printf statements 2020-01-08 22:55:22 +00:00
uart_emul.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
uart_emul.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
usb_emul.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
usb_emul.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
usb_mouse.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
vga.c Add SPDX tags to bhyve(8). 2018-06-13 03:22:08 +00:00
vga.h Fix style(9) space vs tab. 2018-06-14 01:34:53 +00:00
virtio.c Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
virtio.h Initial support for bhyve save and restore. 2020-05-05 00:02:04 +00:00
vmgenc.c bhyve(8): Correct copyright boilerplate for r359950 2020-04-15 05:55:14 +00:00
vmgenc.h bhyve(8): Correct copyright boilerplate for r359950 2020-04-15 05:55:14 +00:00
xmsr.c bhyve, bhyvectl: Add Hygon Dhyana support. 2020-02-13 19:05:14 +00:00
xmsr.h various: general adoption of SPDX licensing ID tags. 2017-11-27 15:37:16 +00:00