From: Alexandru Elisei <alexandru.elisei@arm.com> To: drjones@redhat.com, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Subject: [kvm-unit-tests PATCH] arm/run: Use TCG with qemu-system-arm on arm64 systems Date: Thu, 17 Mar 2022 16:56:01 +0000 [thread overview] Message-ID: <20220317165601.356466-1-alexandru.elisei@arm.com> (raw) From: Andrew Jones <drjones@redhat.com> If the user sets QEMU=qemu-system-arm on arm64 systems, the tests can only be run by using the TCG accelerator. In this case use TCG instead of KVM. Signed-off-by: Andrew Jones <drjones@redhat.com> [ Alex E: Added commit message ] Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> --- arm/run | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arm/run b/arm/run index 28a0b4ad2729..128489125dcb 100755 --- a/arm/run +++ b/arm/run @@ -10,16 +10,24 @@ if [ -z "$KUT_STANDALONE" ]; then fi processor="$PROCESSOR" -ACCEL=$(get_qemu_accelerator) || +accel=$(get_qemu_accelerator) || exit $? -if [ "$ACCEL" = "kvm" ]; then +if [ "$accel" = "kvm" ]; then QEMU_ARCH=$HOST fi qemu=$(search_qemu_binary) || exit $? +if [ "$QEMU" ] && [ -z "$ACCEL" ] && + [ "$HOST" = "aarch64" ] && [ "$ARCH" = "arm" ] && + [ "$(basename $QEMU)" = "qemu-system-arm" ]; then + accel=tcg +fi + +ACCEL=$accel + if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > /dev/null; then echo "$qemu doesn't support mach-virt ('-machine virt'). Exiting." exit 2 -- 2.35.1
WARNING: multiple messages have this Message-ID (diff)
From: Alexandru Elisei <alexandru.elisei@arm.com> To: drjones@redhat.com, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Subject: [kvm-unit-tests PATCH] arm/run: Use TCG with qemu-system-arm on arm64 systems Date: Thu, 17 Mar 2022 16:56:01 +0000 [thread overview] Message-ID: <20220317165601.356466-1-alexandru.elisei@arm.com> (raw) From: Andrew Jones <drjones@redhat.com> If the user sets QEMU=qemu-system-arm on arm64 systems, the tests can only be run by using the TCG accelerator. In this case use TCG instead of KVM. Signed-off-by: Andrew Jones <drjones@redhat.com> [ Alex E: Added commit message ] Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> --- arm/run | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arm/run b/arm/run index 28a0b4ad2729..128489125dcb 100755 --- a/arm/run +++ b/arm/run @@ -10,16 +10,24 @@ if [ -z "$KUT_STANDALONE" ]; then fi processor="$PROCESSOR" -ACCEL=$(get_qemu_accelerator) || +accel=$(get_qemu_accelerator) || exit $? -if [ "$ACCEL" = "kvm" ]; then +if [ "$accel" = "kvm" ]; then QEMU_ARCH=$HOST fi qemu=$(search_qemu_binary) || exit $? +if [ "$QEMU" ] && [ -z "$ACCEL" ] && + [ "$HOST" = "aarch64" ] && [ "$ARCH" = "arm" ] && + [ "$(basename $QEMU)" = "qemu-system-arm" ]; then + accel=tcg +fi + +ACCEL=$accel + if ! $qemu -machine '?' 2>&1 | grep 'ARM Virtual Machine' > /dev/null; then echo "$qemu doesn't support mach-virt ('-machine virt'). Exiting." exit 2 -- 2.35.1 _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next reply other threads:[~2022-03-17 16:55 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-17 16:56 Alexandru Elisei [this message] 2022-03-17 16:56 ` [kvm-unit-tests PATCH] arm/run: Use TCG with qemu-system-arm on arm64 systems Alexandru Elisei 2022-03-17 17:45 ` Andrew Jones 2022-03-17 17:45 ` Andrew Jones 2022-03-17 18:03 ` Alexandru Elisei 2022-03-17 18:03 ` Alexandru Elisei 2022-05-17 14:43 ` Andrew Jones 2022-05-17 14:43 ` Andrew Jones
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220317165601.356466-1-alexandru.elisei@arm.com \ --to=alexandru.elisei@arm.com \ --cc=drjones@redhat.com \ --cc=kvm@vger.kernel.org \ --cc=kvmarm@lists.cs.columbia.edu \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.