summaryrefslogtreecommitdiff
path: root/usr.sbin/vmd/vm.c
diff options
context:
space:
mode:
authorpd <pd@cvs.openbsd.org>2017-09-17 23:07:57 +0000
committerpd <pd@cvs.openbsd.org>2017-09-17 23:07:57 +0000
commite37b4d27e6047cdb07e873e21d5ac0502e0aabf4 (patch)
tree966b8f1cbbdc5f0990977c96265b1292b8e8043e /usr.sbin/vmd/vm.c
parent3053172d8c6b8a137e7e03942bc1c73635d262a2 (diff)
vmd: send/recv pci config space instead of recreating pci devices on receive
ok mlarkin@
Diffstat (limited to 'usr.sbin/vmd/vm.c')
-rw-r--r--usr.sbin/vmd/vm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/vmd/vm.c b/usr.sbin/vmd/vm.c
index 5849ff92765..5e7f8d68736 100644
--- a/usr.sbin/vmd/vm.c
+++ b/usr.sbin/vmd/vm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm.c,v 1.26 2017/09/17 22:47:03 pd Exp $ */
+/* $OpenBSD: vm.c,v 1.27 2017/09/17 23:07:56 pd Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
@@ -544,6 +544,8 @@ send_vm(int fd, struct vm_create_params *vcp)
goto err;
if ((ret = mc146818_dump(fd)))
goto err;
+ if ((ret = pci_dump(fd)))
+ goto err;
if ((ret = virtio_dump(fd)))
goto err;
if ((ret = dump_mem(fd, vcp)))
@@ -987,7 +989,7 @@ restore_emulated_hw(struct vm_create_params *vcp, int fd,
ioports_map[PCI_MODE1_DATA_REG + 1] = vcpu_exit_pci;
ioports_map[PCI_MODE1_DATA_REG + 2] = vcpu_exit_pci;
ioports_map[PCI_MODE1_DATA_REG + 3] = vcpu_exit_pci;
- pci_init();
+ pci_restore(fd);
virtio_restore(fd, current_vm, child_disks, child_taps);
}