bhyve: add .pe_snapshot method for PCI 'hostbridge'

There is no error when dump doesn't have it, but to be more
consistent this PCI devices should be saved as well.

Reviewed by:		corvink, rew
MFC after:		1 week
Sponsored by:		vStack
Differential Revision:	https://reviews.freebsd.org/D40108
This commit is contained in:
Vitaliy Gusev 2023-05-15 16:29:56 +00:00 committed by Corvin Köhne
parent 14c80457b0
commit 6f7d2cf8bb
No known key found for this signature in database
GPG Key ID: D854DA56315E026A

View File

@ -86,6 +86,14 @@ pci_amd_hostbridge_legacy_config(nvlist_t *nvl, const char *opts __unused)
return (0);
}
#ifdef BHYVE_SNAPSHOT
static int
pci_de_snapshot(struct vm_snapshot_meta *meta __unused)
{
return (0);
}
#endif
static const struct pci_devemu pci_de_amd_hostbridge = {
.pe_emu = "amd_hostbridge",
.pe_legacy_config = pci_amd_hostbridge_legacy_config,
@ -96,5 +104,8 @@ PCI_EMUL_SET(pci_de_amd_hostbridge);
static const struct pci_devemu pci_de_hostbridge = {
.pe_emu = "hostbridge",
.pe_init = pci_hostbridge_init,
#ifdef BHYVE_SNAPSHOT
.pe_snapshot = pci_de_snapshot,
#endif
};
PCI_EMUL_SET(pci_de_hostbridge);