Skip to content

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

Merged
msfjarvis merged 1 commit into
ClangBuiltLinux:mainfrom
nathanchance:fix-aarch64-kvm
May 12, 2022
Merged

boot-qemu.sh: Fix aarch64 KVM after cb0698a#63
msfjarvis merged 1 commit into
ClangBuiltLinux:mainfrom
nathanchance:fix-aarch64-kvm

Conversation

@nathanchance

Copy link
Copy Markdown
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