svn commit: r368118 - head/usr.sbin/bhyve
John Baldwin
jhb at FreeBSD.org
Sat Nov 28 04:06:09 UTC 2020
Author: jhb
Date: Sat Nov 28 04:06:09 2020
New Revision: 368118
URL: https://svnweb.freebsd.org/changeset/base/368118
Log:
bhyve: Add snapshot support for virtio-rnd.
This uses the same snapshot routine as other VirtIO devices.
Submitted by: Vitaliy Gusev <gusev.vitaliy at gmail.com>
Differential Revision: https://reviews.freebsd.org/D26265
Modified:
head/usr.sbin/bhyve/pci_virtio_rnd.c
head/usr.sbin/bhyve/snapshot.c
Modified: head/usr.sbin/bhyve/pci_virtio_rnd.c
==============================================================================
--- head/usr.sbin/bhyve/pci_virtio_rnd.c Sat Nov 28 03:54:48 2020 (r368117)
+++ head/usr.sbin/bhyve/pci_virtio_rnd.c Sat Nov 28 04:06:09 2020 (r368118)
@@ -205,6 +205,9 @@ struct pci_devemu pci_de_vrnd = {
.pe_emu = "virtio-rnd",
.pe_init = pci_vtrnd_init,
.pe_barwrite = vi_pci_write,
- .pe_barread = vi_pci_read
+ .pe_barread = vi_pci_read,
+#ifdef BHYVE_SNAPSHOT
+ .pe_snapshot = vi_pci_snapshot,
+#endif
};
PCI_EMUL_SET(pci_de_vrnd);
Modified: head/usr.sbin/bhyve/snapshot.c
==============================================================================
--- head/usr.sbin/bhyve/snapshot.c Sat Nov 28 03:54:48 2020 (r368117)
+++ head/usr.sbin/bhyve/snapshot.c Sat Nov 28 04:06:09 2020 (r368118)
@@ -147,6 +147,7 @@ const struct vm_snapshot_dev_info snapshot_devs[] = {
{ "atkbdc", atkbdc_snapshot, NULL, NULL },
{ "virtio-net", pci_snapshot, pci_pause, pci_resume },
{ "virtio-blk", pci_snapshot, pci_pause, pci_resume },
+ { "virtio-rnd", pci_snapshot, NULL, NULL },
{ "lpc", pci_snapshot, NULL, NULL },
{ "fbuf", pci_snapshot, NULL, NULL },
{ "xhci", pci_snapshot, NULL, NULL },
More information about the svn-src-all
mailing list