Skip to content

Support guest memory sizes >=1028 GiB - #912

Merged
iximeow merged 4 commits into
masterfrom
ixi/e820
Jun 24, 2025
Merged

iximeow merged 4 commits into
masterfrom
ixi/e820

Conversation

@iximeow

@iximeow iximeow commented Jun 21, 2025

Copy link
Copy Markdown
Member

Fixes #907.

This change both produces an E820 table for OVMF to consult for highmem layout, and clamps the RTC CMOS bytes through which we communicate highmem size to OVMF. The E820 table supplants the RTC CMOS for OVMF's purposes, so in theory nothing will check those bytes anymore. Even so, clamping to them to ffffff seems more legible.

Fixes #907.

This change both produces an E820 table for OVMF to consult for highmem
layout, and clamps the RTC CMOS bytes through which we communicate
highmem size to OVMF. The E820 table supplants the RTC CMOS for OVMF's
purposes, so in theory nothing will check those bytes anymore. Even so,
clamping to them to `ffffff` seems more legible.
@iximeow
iximeow requested a review from pfmooney June 21, 2025 00:09
Comment on lines +1238 to +1240
fwcfg
.insert_named("etc/e820", e820_entry)
.map_err(|e| MachineInitError::FwcfgInsertFailed("e820", e))?;

@iximeow iximeow Jun 21, 2025 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really see a reason to make this optional, at least. Regardless of offering up an e820 map the guest OS will use UEFI services and get the map that OVMF builds of the system.

Comment thread lib/propolis/src/hw/qemu/fwcfg.rs Resolved
Comment thread lib/propolis/src/hw/qemu/fwcfg.rs Resolved

@pfmooney pfmooney left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The broad strokes look good.

Comment thread lib/propolis/src/hw/bhyve/rtc.rs Resolved
Comment thread lib/propolis/src/hw/qemu/fwcfg.rs Resolved
@iximeow

iximeow commented Jun 24, 2025

Copy link
Copy Markdown
Member Author

gave this a double-check on Alpine/Ubuntu/Windows Server 2022/OmniOS guests real quick on a whim and they all come up happy as expected.

@iximeow
iximeow merged commit 0e06506 into master Jun 24, 2025
@iximeow
iximeow deleted the ixi/e820 branch June 24, 2025 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VMs with >1TiB of memory confuse EDK2

2 participants