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

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

Merged
merged 1 commit into from
May 12, 2022

Conversation

nathanchance
Copy link
Member

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.

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.

Fixes: cb0698a ("boot-qemu.sh: Use implementation defined pointer authentication algorithm")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
@msfjarvis msfjarvis merged commit bc0d177 into ClangBuiltLinux:main May 12, 2022
@nathanchance nathanchance deleted the fix-aarch64-kvm branch May 12, 2022 17:18
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