Page MenuHomeFreeBSD

bhyve: merge adjacent E820 entries
Needs ReviewPublic

Authored by corvink on May 24 2024, 11:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 3, 12:55 PM
Unknown Object (File)
May 26 2024, 5:24 PM
Subscribers

Details

Reviewers
jhb
markj
Group Reviewers
bhyve
Summary

EDKII can allocate adjacent E820 entries only if they are at a page boundary.
For some unknown and probably strange reasons, Intel puts it's OpRegion at an
offset of 0x18 bytes. If the VBT lays directly behind the OpRegion, we're going
to try allocating two adjacent E820 sharing the same page. This causes EDKII to
do not properly allocate those entries. A Linux guest then isn't able to map
the VBT and those fails to find it.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 58047
Build 54935: arc lint + arc unit

Event Timeline

Suppose there are two E820 entries with a hole in the middle, and then a new entry fills that hole. Then we could potentially merge the new entry with both the predecessor and successor. Do we need to handle that case?

usr.sbin/bhyve/amd64/e820.c
294
  • merge entries with predecessor and successor if possible