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

Qemu : add patch to fix bios linker loader assert #4204

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

shjala
Copy link
Member

@shjala shjala commented Sep 4, 2024

  • Since commit c161dfb EVE runs VMs with
    TPM 2.0 device enabled, and it can cause VMs to fail to boot with the
    below assertion, reason is that if there is not enough contiguous memory
    available, the ACPI table is relocated but some table offsets, including
    tpm table are not updated. This is not always the case and the failure
    shows up only if the app assigned memory is too small (triggers the relocation),
    for example testing Ubuntu 20.04 and 22.04 images with memory lower than
    4GB triggers the issue.

  • This patch fixes the bios linker loader assert:
    "bios_linker_loader_add_checksum: Assertion `start_offset < file->blob->len' failed."

  • This patch is base on the following commit, This has been part of the
    qemu mainline since v6.1.0 release :
    qemu/qemu@bb9feea

Copy link
Member

@OhmSpectator OhmSpectator left a comment

Choose a reason for hiding this comment

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

With the commit message fixed, looks fine.

@shjala shjala force-pushed the fix_qemu_bios_assert branch from f6d82c4 to a6a6d43 Compare September 4, 2024 11:12
@shjala shjala force-pushed the fix_qemu_bios_assert branch 2 times, most recently from 96e2c63 to 17c161a Compare September 4, 2024 11:26
* Since commit c161dfb EVE runs VMs with
TPM 2.0 device enabled, and it can cause VMs to fail to boot with the
below assertion, reason is that if there is not enough contiguous memory
available, the ACPI table is relocated but some table offsets, including
tpm table are not updated. This is not always the case and the failure
shows up only if the app assigned memory is too small (triggers the relocation),
for example testing Ubuntu 20.04 and 22.04 images with memory lower than
4GB triggers the issue.

* This patch fixes the bios linker loader assert:
"bios_linker_loader_add_checksum: Assertion `start_offset < file->blob->len' failed."

* This patch is base on the following commit, This has been part of the
qemu mainline since v6.1.0 release :
qemu/qemu@bb9feea

Signed-off-by: Shahriyar Jalayeri <[email protected]>
@shjala shjala force-pushed the fix_qemu_bios_assert branch from 17c161a to 5e510f5 Compare September 4, 2024 11:27
@shjala
Copy link
Member Author

shjala commented Sep 4, 2024

Fixed typo in the commit message, added a bit more explanation.

Copy link
Contributor

@rene rene left a comment

Choose a reason for hiding this comment

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

LGTM

@OhmSpectator
Copy link
Member

As far as I understand, @rene has already tested it in his environment and it works) Nevertheless, we could wait for the test results...

@eriknordmark eriknordmark merged commit a452da1 into lf-edge:master Sep 4, 2024
35 of 39 checks passed
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.

4 participants