Skip to content

boot-qemu.sh: Use different CPU for arm64 with new QEMU + old kernel#61

Merged
nathanchance merged 1 commit into
ClangBuiltLinux:mainfrom
nathanchance:update-aarch64-cpu
Apr 6, 2022
Merged

boot-qemu.sh: Use different CPU for arm64 with new QEMU + old kernel#61
nathanchance merged 1 commit into
ClangBuiltLinux:mainfrom
nathanchance:update-aarch64-cpu

Conversation

@nathanchance

Copy link
Copy Markdown
Member

After FEAT_LPA was implemented in QEMU's TCG, kernels older than 4.19,
namely 4.9 and 4.14, fail to boot. We already have a workaround for
FEAT_LPA2 not working with kernels older than 5.12, which is known.
Reporting this to QEMU upstream resulted in the recommendation to use
one of the ARMv8.0 CPUs for these older kernels. Use 'cortex-a72' for
booting anything older than 4.19 with QEMU 6.2.50 (master) and newer.

Link: https://gitlab.com/qemu-project/qemu/-/issues/964

@nickdesaulniers

Copy link
Copy Markdown
Member

From that thread, it sounds like there's perhaps a missing backport we should take into stable instead?
https://gitlab.com/qemu-project/qemu/-/issues/964#note_903279226

@nathanchance

Copy link
Copy Markdown
Member Author

Maybe, I'll see.

After FEAT_LPA was implemented in QEMU's TCG, kernels without
commit 787fd1d019b2 ("arm64: limit PA size to supported range") fail to
boot; this change first showed up in 4.16.

We already have a workaround for FEAT_LPA2 not working with kernels
older than 5.12, which is known. Reporting this to QEMU upstream
resulted in the recommendation to use one of the ARMv8.0 CPUs for these
older kernels. Use 'cortex-a72' for booting anything older than 4.16
with QEMU 6.2.50 (master) and newer.

Link: https://gitlab.com/qemu-project/qemu/-/issues/964
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
@nathanchance

nathanchance commented Apr 6, 2022

Copy link
Copy Markdown
Member Author

I've updated the kernel check and commit message based on my analysis at https://gitlab.com/qemu-project/qemu/-/issues/964#note_903403849.

@nickdesaulniers nickdesaulniers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks for running the bisection to identify the change, the asses the risks in backporting it. Looks like this is the way to go. 🆔 ⛲

@nathanchance nathanchance merged commit c2d25a4 into ClangBuiltLinux:main Apr 6, 2022
@nathanchance

Copy link
Copy Markdown
Member Author

Thanks for double checking my analysis as always!

@nathanchance nathanchance deleted the update-aarch64-cpu branch April 6, 2022 21:25
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.

2 participants