ClangBuiltLinux / boot-utils

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

boot-qemu.sh: Fix aarch64 KVM after cb0698a #63

Closed nathanchance closed 2 years ago

nathanchance commented 2 years ago

After commit cb0698a ("boot-qemu.sh: Use implementation defined pointer authentication algorithm"), using boot-qemu.sh on AArch64 hardware fails:

$ boot-qemu.sh -a arm64 -k ...
qemu-system-aarch64: can't apply global max-arm-cpu.pauth-impdef=true: Property 'max-arm-cpu.pauth-impdef' not found

This property only applies to TCG, so it should not be applied to KVM. In fact, none of the CPU handling that we have in the aarch64 block applies to KVM, as '-cpu max' is implicitly treated as '-cpu host' when '-enable-kvm' is passed. To make this explicit, add '-cpu host' to the KVM arguments and move all the CPU handling into the non-KVM (TCG) block.