Skip to content

Newer qemu versions need a cpu flag to boot older aarch64 kernels #116

@pinealservo

Description

@pinealservo

While upgrading the OS versions in a CI pipeline, I ended up with a more recent version of QEMU that adds support for the aarch64 FEAT_LPA2 (52-bit virtual addresses). It turns out that the Linux boot code before version 5.12.0 (and recent 5.10 LTS versions) interprets the architecture register indicating support for this feature incorrectly and halts the CPU very early in the boot process.

Here's the QEMU issue about this: https://gitlab.com/qemu-project/qemu/-/issues/964

I have made a tiny patch that always disables lpa2 for non-kvm booting of aarch64 kernels: https://github.com/pinealservo/vmtest/tree/disable_lpa2

I'd be happy to open a PR with that change, but according to the info in the QEMU issue, it's not quite universal if you want to boot even older kernels. Maybe some sort of override for setting the cpu flag is warranted? I didn't want to dive into things involving config changes without any discussion, so I figured I'd open an issue instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions