ClangBuiltLinux / boot-utils

Collection of files for booting Linux kernels
26 stars 7 forks source link

boot-qemu.sh: arm64: Pass 'lpa2=off' when necessary #58

Closed nathanchance closed 2 years ago

nathanchance commented 2 years ago

Starting with QEMU commit 69b2265d5fe8e, aarch64 kernels older than 5.12.0 do not boot without "lpa2=off". Add this parameter when booting a kernel older than this version using a version of QEMU that has this commit.

We cannot universally pass this for all QEMU versions because the property is not recognized on older version:

qemu-system-aarch64: can't apply global max-arm-cpu.lpa2=off: Property 'max-arm-cpu.lpa2' not found

We could pass this for all kernel versions but we miss out on testing a default QEMU change.

The first three commits add the individual functions that are needed by the last commit for ease of reviewing.

Link: https://gitlab.com/qemu-project/qemu/-/commit/69b2265d5fe8e0f401d75e175e0a243a7d505e53