Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boot-qemu.sh: Support booting ARMv7 kernels under KVM on AArch64 hosts
It is possible to use KVM on AArch64 hosts to boot ARMv7 kernels, which can result in a significant amount of speed up. On a Raspberry Pi 4: Benchmark 1: boot-qemu.sh Time (mean ± σ): 3.879 s ± 0.041 s [User: 1.389 s, System: 0.405 s] Range (min … max): 3.839 s … 3.982 s 20 runs Benchmark 2: boot-qemu.sh --no-kvm Time (mean ± σ): 17.997 s ± 0.091 s [User: 15.614 s, System: 0.422 s] Range (min … max): 17.850 s … 18.200 s 20 runs Summary 'boot-qemu.sh' ran 4.64 ± 0.05 times faster than 'boot-qemu.sh --no-kvm' However, the host must support 32-bit EL1, which is not always true so we need to add a small C program to check for it before using 'aarch64=off' + '-enable-kvm'. This has no detectable overhead on a system that does not support it. Benchmark 1: boot-qemu.sh (with check) Time (mean ± σ): 6.148 s ± 0.027 s [User: 3.944 s, System: 0.219 s] Range (min … max): 6.098 s … 6.193 s 20 runs Benchmark 2: boot-qemu.sh (without check) Time (mean ± σ): 6.137 s ± 0.029 s [User: 3.981 s, System: 0.170 s] Range (min … max): 6.079 s … 6.208 s 20 runs Summary 'boot-utils-ro' ran 1.00 ± 0.01 times faster than 'boot-utils' Link: https://fedoraproject.org/wiki/Architectures/AArch64/Booting_a_32-Bit_QEMU_image Signed-off-by: Nathan Chancellor <[email protected]>
- Loading branch information