From: Kristina Martsenko <kristina.martsenko@arm.com>
To: "Tamir Duberstein" <tamird@gmail.com>,
"Brendan Higgins" <brendan.higgins@linux.dev>,
"David Gow" <davidgow@google.com>, "Rae Moar" <rmoar@google.com>,
"Alyssa Ross" <hi@alyssa.is>,
"Thomas Weißschuh" <thomas@t-8ch.de>
Cc: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] kunit: enable hardware acceleration when available
Date: Tue, 5 Nov 2024 12:36:40 +0000 [thread overview]
Message-ID: <4e57a6e6-f10c-4a35-88e7-ab4749f7e329@arm.com> (raw)
In-Reply-To: <20241102-kunit-qemu-accel-macos-v2-2-9d4579fddd20@gmail.com>
On 02/11/2024 12:09, Tamir Duberstein wrote:
> Use KVM or HVF if supported by the QEMU binary and available on the
> system.
>
> This produces a nice improvement on my Apple M3 Pro running macOS 14.7:
>
> Before:
> ./tools/testing/kunit/kunit.py exec --arch arm64
> [HH:MM:SS] Elapsed time: 10.145s
>
> After:
> ./tools/testing/kunit/kunit.py exec --arch arm64
> [HH:MM:SS] Elapsed time: 1.773s
>
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>
> ---
> tools/testing/kunit/kunit_kernel.py | 3 +++
> tools/testing/kunit/qemu_configs/arm64.py | 2 +-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py
> index 61931c4926fd6645f2c62dd13f9842a432ec4167..3146acb884ecf0bcff94d5938535aabd4486fe82 100644
> --- a/tools/testing/kunit/kunit_kernel.py
> +++ b/tools/testing/kunit/kunit_kernel.py
> @@ -123,6 +123,9 @@ class LinuxSourceTreeOperationsQemu(LinuxSourceTreeOperations):
> '-append', ' '.join(params + [self._kernel_command_line]),
> '-no-reboot',
> '-nographic',
> + '-accel', 'kvm',
> + '-accel', 'hvf',
> + '-accel', 'tcg',
> '-serial', self._serial] + self._extra_qemu_params
> # Note: shlex.join() does what we want, but requires python 3.8+.
> print('Running tests with:\n$', ' '.join(shlex.quote(arg) for arg in qemu_command))
> diff --git a/tools/testing/kunit/qemu_configs/arm64.py b/tools/testing/kunit/qemu_configs/arm64.py
> index d3ff27024755411441f910799be30399295c9541..5c44d3a87e6dd2cd6b086138186a277a1473585b 100644
> --- a/tools/testing/kunit/qemu_configs/arm64.py
> +++ b/tools/testing/kunit/qemu_configs/arm64.py
> @@ -9,4 +9,4 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y''',
> qemu_arch='aarch64',
> kernel_path='arch/arm64/boot/Image.gz',
> kernel_command_line='console=ttyAMA0',
> - extra_qemu_params=['-machine', 'virt', '-cpu', 'max,pauth-impdef=on'])
> + extra_qemu_params=['-machine', 'virt', '-cpu', 'max'])
Would it be possible to keep 'pauth-impdef=on' for TCG emulation? Otherwise
performance regresses by about 20%.
Before this patch:
./tools/testing/kunit/kunit.py exec --arch=arm64 --cross_compile=aarch64-linux-
[11:03:38] Elapsed time: 15.494s
After this patch:
./tools/testing/kunit/kunit.py exec --arch=arm64 --cross_compile=aarch64-linux-
[11:10:47] Elapsed time: 19.099s
Thanks,
Kristina
next prev parent reply other threads:[~2024-11-05 12:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-02 12:09 [PATCH v2 0/2] kunit: enable hardware virtualization Tamir Duberstein
2024-11-02 12:09 ` [PATCH v2 1/2] kunit: add fallback for os.sched_getaffinity Tamir Duberstein
2024-11-05 8:35 ` David Gow
2024-12-07 18:52 ` Tamir Duberstein
2025-01-13 21:05 ` Tamir Duberstein
2024-11-02 12:09 ` [PATCH v2 2/2] kunit: enable hardware acceleration when available Tamir Duberstein
2024-11-05 8:36 ` David Gow
2024-11-05 12:36 ` Kristina Martsenko [this message]
2024-11-05 19:51 ` Tamir Duberstein
2024-12-03 17:08 ` Tamir Duberstein
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=4e57a6e6-f10c-4a35-88e7-ab4749f7e329@arm.com \
--to=kristina.martsenko@arm.com \
--cc=brendan.higgins@linux.dev \
--cc=davidgow@google.com \
--cc=hi@alyssa.is \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=rmoar@google.com \
--cc=tamird@gmail.com \
--cc=thomas@t-8ch.de \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®