Wanpeng Qian
75b1f96772
bhyve: restore the BARs at the addresses the guest gave them
...
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 <[email protected] >
Sponsored by: keelos.dev
Reviewed by: bnovkov
Differential Revision: https://reviews.freebsd.org/D60235
MFC after: 2 weeks
Tested by: bnovkov
2026-11-04 18:33:44 +01:00
..
2026-10-24 13:01:53 +02:00
2026-10-24 13:01:53 +02:00
2024-10-14 10:26:17 -07:00
2024-07-15 16:43:39 -06:00
2026-10-24 13:01:53 +02:00
2026-01-08 18:01:13 +01:00
2023-05-12 10:44:03 -06:00
2023-05-12 10:44:03 -06:00
2025-07-27 18:31:48 +02:00
2025-07-27 18:31:49 +02:00
2023-08-16 11:54:16 -06:00
2023-12-26 09:36:31 -07:00
2023-08-16 11:54:16 -06:00
2023-08-22 07:49:00 +02:00
2023-06-20 10:56:23 +02:00
2026-09-19 16:19:35 +00:00
2026-10-24 13:01:53 +02:00
2023-11-26 22:24:01 -07:00
2026-10-14 16:00:47 +00:00
2026-09-18 12:28:32 +02:00
2026-08-11 14:15:02 +00:00
2026-10-24 13:01:53 +02:00
2026-10-24 13:01:53 +02:00
2025-07-27 18:31:48 +02:00
2024-08-19 13:55:47 +00:00
2026-10-24 13:01:53 +02:00
2026-10-24 13:01:53 +02:00
2026-01-16 10:48:34 -04:00
2026-01-16 10:48:34 -04:00
2023-11-26 22:24:01 -07:00
2023-08-16 11:54:16 -06:00
2023-08-16 11:54:16 -06:00
2026-10-19 18:53:53 +00:00
2023-12-12 15:28:59 -08:00
2024-10-03 17:14:11 -04:00
2023-08-16 11:54:16 -06:00
2023-08-16 11:54:16 -06:00
2026-08-05 18:58:32 +00:00
2026-04-01 15:05:26 -04:00
2026-09-19 16:19:35 +00:00
2026-08-23 14:02:49 +02:00
2026-10-24 13:01:53 +02:00
2023-08-16 11:55:03 -06:00
2023-08-16 11:55:03 -06:00
2025-05-15 17:01:40 +03:00
2025-05-15 17:01:40 +03:00
2025-05-15 17:01:40 +03:00
2025-12-17 15:08:32 +01:00
2025-12-17 15:08:32 +01:00
2024-04-10 11:17:56 -04:00
2023-11-22 15:18:46 -05:00
2023-11-22 15:18:46 -05:00
2026-01-08 18:01:13 +01:00
2023-11-22 15:18:46 -05:00
2026-03-04 12:30:02 -05:00
2023-11-22 15:18:46 -05:00
2023-11-26 22:24:01 -07:00
2023-08-16 11:54:16 -06:00
2024-10-24 10:18:09 -04:00
2023-11-26 22:24:01 -07:00
2026-11-04 18:33:44 +01:00
2026-11-04 18:33:44 +01:00
2026-10-14 16:00:47 +00:00
2026-10-14 16:00:47 +00:00
2023-08-16 11:54:16 -06:00
2023-08-16 11:54:42 -06:00
2024-10-31 20:24:12 +00:00
2026-10-24 13:01:53 +02:00
2025-09-16 08:55:09 +02:00
2026-10-08 11:20:45 -04:00
2025-08-05 16:02:09 +02:00
2025-12-11 10:11:50 +02:00
2023-11-26 22:24:01 -07:00
2023-11-26 22:24:01 -07:00
2026-09-30 15:53:51 +00:00
2026-10-19 15:29:13 +00:00
2023-11-26 22:24:01 -07:00
2023-11-26 22:24:01 -07:00
2026-05-26 16:03:12 +00:00
2026-05-26 16:03:12 +00:00
2026-05-26 16:03:12 +00:00
2026-10-14 16:00:47 +00:00
2023-08-16 11:54:16 -06:00
2025-06-24 08:13:29 +02:00
2023-11-26 22:24:01 -07:00
2023-08-16 11:54:16 -06:00
2023-10-17 15:57:28 +02:00
2023-05-12 10:44:03 -06:00
2023-04-25 08:29:25 +02:00
2023-04-25 08:29:25 +02:00
2026-10-14 16:00:47 +00:00
2026-01-08 15:24:52 +00:00
2026-08-07 14:04:30 +01:00
2024-04-10 11:17:56 -04:00
2026-07-18 15:07:07 -07:00
2023-08-16 11:54:16 -06:00
2026-11-04 18:33:44 +01:00
2026-08-23 14:02:49 +02:00
2023-11-26 22:24:01 -07:00
2023-08-16 11:54:16 -06:00
2023-08-17 08:17:59 +02:00
2023-08-17 08:17:59 +02:00
2023-08-10 09:23:42 +02:00
2024-10-22 14:04:24 +02:00
2023-06-20 10:59:00 +02:00
2026-09-15 09:04:28 -05:00
2023-08-10 09:23:33 +02:00
2025-07-27 18:31:49 +02:00
2023-08-14 10:17:36 +02:00
2024-10-02 17:31:59 -04:00
2024-05-01 11:09:31 -04:00
2024-05-01 11:09:31 -04:00
2024-04-10 11:17:55 -04:00
2024-05-01 11:09:31 -04:00
2023-11-26 22:24:01 -07:00
2025-08-09 23:15:41 -04:00
2026-02-19 14:27:49 -08:00
2026-11-04 17:53:03 +01:00
2024-04-11 11:53:37 -06:00
2023-10-04 12:53:16 -04:00
2023-11-26 22:24:01 -07:00
2023-08-16 11:54:16 -06:00