Skip to content

Conversation

@bysui
Copy link

@bysui bysui commented Feb 6, 2026

Summary of the PR

For the x86-64 kernel, the loaded address must be aligned to 2MB; otherwise, the check in __startup_64() in the Linux kernel would fail and cause the kernel to hang. Therefore, verify the alignment of the LOAD segment during the loading process.

Actually, there is a check for the alignment of each LOAD segment [c55b8550fa57] in the Linux kernel decompression process; however, I didn't see such a check in QEMU PVH booting code, so I only checked the last loaded address.

Requirements

Before submitting your PR, please make sure you addressed the following
requirements:

  • All commits in this PR have Signed-Off-By trailers (with
    git commit -s), and the commit message has max 60 characters for the
    summary and max 75 characters for each description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • All added/changed public-facing functionality has entries in the "Upcoming
    Release" section of CHANGELOG.md (if no such section exists, please create one).
  • Any newly added unsafe code is properly documented.

For the x86-64 kernel, the loaded address must be aligned to 2MB;
otherwise, the check in __startup_64() in the Linux kernel would fail
and cause the kernel to hang. Therefore, verify the alignment of the
LOAD segment during the loading process.

Signed-off-by: Hou Wenlong <houwenlong.hwl@antgroup.com>
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.

1 participant