Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix e820_alloc_memory() may overlap hypervisor memory #8739

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jiaqingz-intel
Copy link
Contributor

e820_alloc_memory() finds a usable area in hypervisor e820 table, but
currently hypervisor memory range is also marked as usable. Mark it as
unusable to avoid corrupting hypervisor.

The hypervisor image size is determined at link time, but now it is
calculated and stored in a global variable during mmu initialization,
and the helper function reads from that variable. Change to calculate
it inside helper function to avoid inconsistency.

Tracked-On: projectacrn#8738
Signed-off-by: Jiaqing Zhao <[email protected]>
Reviewed-by: Fei Li <[email protected]>
Mark hypervisor memory region as unusable in its e820 table to avoid
being overlapped by e820_alloc_memory(). As it is already filtered out
in hypervisor e820 table, there is no longer need to filter it out in
service VM e820.

Tracked-On: projectacrn#8738
Signed-off-by: Jiaqing Zhao <[email protected]>
Reviewed-by: Fei Li <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants