diff options
| author | Wanpeng Qian <wanpengqian@gmail.com> | 2026-11-04 17:32:43 +0000 |
|---|---|---|
| committer | Bojan Novković <bnovkov@FreeBSD.org> | 2026-11-04 17:33:44 +0000 |
| commit | 75b1f96772688c4feb698bd5aece8793324b9e23 (patch) | |
| tree | 3202e5ffd83390436035578bfba3e82b82f0ec0d /sys/cam/ctl/ctl_ser_table.c | |
| parent | 9db8ae83e62e9a1391674a14b0b7d76de2e3c3f7 (diff) | |
A restore set the addresses in the BARs and the command register to
those of the snapshot, but left the regions registered where
pci_emul_alloc_bar() had put them when bhyve started. That is only
right for a guest that kept bhyve's addresses. The UEFI firmware moves
64-bit BARs above 4 GB, and after a restore every access to such a BAR
went nowhere:
Emulating access to non-existent address to 0x800001014
Before the devices are restored, unregister the regions of all of them;
when a device is restored, register its regions at the restored
addresses, if the restored command register enables them. All devices
go first because a restored BAR may be where another device's BAR is
before the restore.
Signed-off-by: Wanpeng Qian <wanpengqian@gmail.com>
Sponsored by: keelos.dev
Reviewed by: bnovkov
Differential Revision: https://reviews.freebsd.org/D60235
MFC after: 2 weeks
Tested by: bnovkov
Diffstat (limited to 'sys/cam/ctl/ctl_ser_table.c')
0 files changed, 0 insertions, 0 deletions
