Page MenuHomeFreeBSD

Allow guest device MMIO access from bootmem memory segments.
ClosedPublic

Authored by grehan on Aug 5 2020, 11:25 AM.
Tags
None
Referenced Files
F147065590: D25955.id.diff
Sun, Mar 8, 1:21 AM
Unknown Object (File)
Thu, Mar 5, 10:03 AM
Unknown Object (File)
Tue, Feb 24, 3:11 AM
Unknown Object (File)
Sat, Feb 14, 2:31 PM
Unknown Object (File)
Feb 2 2026, 6:49 AM
Unknown Object (File)
Jan 25 2026, 2:52 AM
Unknown Object (File)
Jan 25 2026, 1:23 AM
Unknown Object (File)
Jan 25 2026, 1:21 AM

Details

Summary

Recent versions of UEFI have moved local APIC timer initialization into
the early SEC phase which runs out of ROM, prior to self-relocating
into RAM. This results in a hypervisor exit.

Currently bhyve prevents instruction emulation from segments that aren't
marked as "sysmem" aka guest RAM, with the vm_gpa_hold() routine failing.
However, there is no reason for this restriction: the hypervisor already
controls whether EPT mappings are marked as executable.

Fix by dropping the redundant check of sysmem.

(Note: this problem was first seen by D Scott Phillips and worked around in
UEFI by moving APIC initialization to the later PEI phase
github.com/freebsd/uefi-edk2/pull/7/commits/e8c6872573cd6c8642b0ed2fbeb5c08433dba21b

Test Plan

Boot the most recent bcran UEFI snapshot.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable