On 20/06/2025 15.07, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> tests/functional/test_aarch64_smmu.py | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/tests/functional/test_aarch64_smmu.py b/tests/functional/test_aarch64_smmu.py
> index c65d0f28178..59b62a55a9e 100755
> --- a/tests/functional/test_aarch64_smmu.py
> +++ b/tests/functional/test_aarch64_smmu.py
> @@ -22,6 +22,7 @@
>
> class SMMU(LinuxKernelTest):
>
> + accel = 'kvm'
> default_kernel_params = ('earlyprintk=pl011,0x9000000 no_timer_check '
> 'printk.time=1 rd_NO_PLYMOUTH net.ifnames=0 '
> 'console=ttyAMA0 rd.rescue')
> @@ -45,11 +46,11 @@ def set_up_boot(self, path):
> self.vm.add_args('-device', 'virtio-net,netdev=n1' + self.IOMMU_ADDON)
>
> def common_vm_setup(self, kernel, initrd, disk):
Wouldn't it be more straight-forward to do something like this here:
if hvf_available():
accel = "hvf"
else:
accel = "kvm"
... IMHO that's nicer than duplicating the test classes below.
Thomas
> - self.require_accelerator("kvm")
> + self.require_accelerator(self.accel)
> self.require_netdev('user')
> self.set_machine("virt")
> self.vm.add_args('-m', '1G')
> - self.vm.add_args("-accel", "kvm")
> + self.vm.add_args("-accel", self.accel)
> self.vm.add_args("-cpu", "host")
> self.vm.add_args("-machine", "iommu=smmuv3")
> self.vm.add_args("-d", "guest_errors")
> @@ -201,5 +202,9 @@ def test_smmu_ril_nostrict(self):
> self.run_and_check(self.F33_FILENAME, self.F33_HSUM)
>
>
> +class SMMU_HVF(SMMU):
> + accel = 'hvf'