[kvm-unit-tests PATCH 1/2] arm/arm64: Ensure proper host arch with kvmtool
Jesse Taube
jesse at rivosinc.com
Mon Jul 7 08:10:39 PDT 2025
On Fri, Jul 4, 2025 at 8:13 AM Andrew Jones <andrew.jones at linux.dev> wrote:
>
> When running on non-arm (e.g. an x86 machine) if the framework is
> configured to use kvmtool then, unlike with QEMU, it can't work.
>
> Signed-off-by: Andrew Jones <andrew.jones at linux.dev>
Reviewed-by: Jesse Taube <jesse at rivosinc.com>
> ---
> arm/run | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arm/run b/arm/run
> index 9ee795ae424c..858333fce465 100755
> --- a/arm/run
> +++ b/arm/run
> @@ -97,6 +97,11 @@ function arch_run_kvmtool()
> {
> local command
>
> + if [ "$HOST" != "arm" ] && [ "$HOST" != "aarch64" ]; then
> + echo "kvmtool requires KVM but the host ('$HOST') is not arm" >&2
> + exit 2
> + fi
> +
> kvmtool=$(search_kvmtool_binary) ||
> exit $?
>
> --
> 2.49.0
>
More information about the kvm-riscv
mailing list