* [PATCH] KVM: loongarch: selftests: Remove common tests built by TEST_GEN_PROGS_COMMON
@ 2025-08-11 8:24 Dong Yang
2025-08-11 10:49 ` Bibo Mao
0 siblings, 1 reply; 5+ messages in thread
From: Dong Yang @ 2025-08-11 8:24 UTC (permalink / raw)
To: pbonzini, shuah
Cc: kvm, linux-kselftest, linux-kernel, maobibo, chenhaucai,
Dong Yang, Quan Zhou
Remove the common KVM test cases already added to TEST_GEN_PROGS_COMMON
as following:
demand_paging_test
dirty_log_test
guest_print_test
kvm_binary_stats_test
kvm_create_max_vcpus
kvm_page_table_test
set_memory_region_test
Fixes: a867688c8cbb ("KVM: selftests: Add supported test cases for LoongArch")
Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Signed-off-by: Dong Yang <dayss1224@gmail.com>
---
tools/testing/selftests/kvm/Makefile.kvm | 7 -------
1 file changed, 7 deletions(-)
diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm
index 38b95998e1e6..d2ad85a8839f 100644
--- a/tools/testing/selftests/kvm/Makefile.kvm
+++ b/tools/testing/selftests/kvm/Makefile.kvm
@@ -199,17 +199,10 @@ TEST_GEN_PROGS_riscv += get-reg-list
TEST_GEN_PROGS_riscv += steal_time
TEST_GEN_PROGS_loongarch += coalesced_io_test
-TEST_GEN_PROGS_loongarch += demand_paging_test
TEST_GEN_PROGS_loongarch += dirty_log_perf_test
-TEST_GEN_PROGS_loongarch += dirty_log_test
-TEST_GEN_PROGS_loongarch += guest_print_test
TEST_GEN_PROGS_loongarch += hardware_disable_test
-TEST_GEN_PROGS_loongarch += kvm_binary_stats_test
-TEST_GEN_PROGS_loongarch += kvm_create_max_vcpus
-TEST_GEN_PROGS_loongarch += kvm_page_table_test
TEST_GEN_PROGS_loongarch += memslot_modification_stress_test
TEST_GEN_PROGS_loongarch += memslot_perf_test
-TEST_GEN_PROGS_loongarch += set_memory_region_test
SPLIT_TESTS += arch_timer
SPLIT_TESTS += get-reg-list
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: loongarch: selftests: Remove common tests built by TEST_GEN_PROGS_COMMON
2025-08-11 8:24 [PATCH] KVM: loongarch: selftests: Remove common tests built by TEST_GEN_PROGS_COMMON Dong Yang
@ 2025-08-11 10:49 ` Bibo Mao
2025-08-18 15:12 ` Dong Yang
2025-08-19 0:30 ` Andrew Jones
0 siblings, 2 replies; 5+ messages in thread
From: Bibo Mao @ 2025-08-11 10:49 UTC (permalink / raw)
To: Dong Yang, pbonzini, shuah
Cc: kvm, linux-kselftest, linux-kernel, chenhaucai, Quan Zhou
Hi Dong,
Thanks for you patch.
On 2025/8/11 下午4:24, Dong Yang wrote:
> Remove the common KVM test cases already added to TEST_GEN_PROGS_COMMON
> as following:
>
> demand_paging_test
> dirty_log_test
> guest_print_test
> kvm_binary_stats_test
> kvm_create_max_vcpus
> kvm_page_table_test
> set_memory_region_test
>
> Fixes: a867688c8cbb ("KVM: selftests: Add supported test cases for LoongArch")
> Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
> Signed-off-by: Dong Yang <dayss1224@gmail.com>
> ---
> tools/testing/selftests/kvm/Makefile.kvm | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm
> index 38b95998e1e6..d2ad85a8839f 100644
> --- a/tools/testing/selftests/kvm/Makefile.kvm
> +++ b/tools/testing/selftests/kvm/Makefile.kvm
> @@ -199,17 +199,10 @@ TEST_GEN_PROGS_riscv += get-reg-list
> TEST_GEN_PROGS_riscv += steal_time
>
TEST_GEN_PROGS_loongarch = $(TEST_GEN_PROGS_COMMON) is missing.
BTW irqfd_test in TEST_GEN_PROGS_COMMON fails to run on LoongArch, does
this test case pass to run on Riscv?
Regards
Bibo Mao
> TEST_GEN_PROGS_loongarch += coalesced_io_test
> -TEST_GEN_PROGS_loongarch += demand_paging_test
> TEST_GEN_PROGS_loongarch += dirty_log_perf_test
> -TEST_GEN_PROGS_loongarch += dirty_log_test
> -TEST_GEN_PROGS_loongarch += guest_print_test
> TEST_GEN_PROGS_loongarch += hardware_disable_test
> -TEST_GEN_PROGS_loongarch += kvm_binary_stats_test
> -TEST_GEN_PROGS_loongarch += kvm_create_max_vcpus
> -TEST_GEN_PROGS_loongarch += kvm_page_table_test
> TEST_GEN_PROGS_loongarch += memslot_modification_stress_test
> TEST_GEN_PROGS_loongarch += memslot_perf_test
> -TEST_GEN_PROGS_loongarch += set_memory_region_test
>
> SPLIT_TESTS += arch_timer
> SPLIT_TESTS += get-reg-list
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: loongarch: selftests: Remove common tests built by TEST_GEN_PROGS_COMMON
2025-08-11 10:49 ` Bibo Mao
@ 2025-08-18 15:12 ` Dong Yang
2025-08-19 0:30 ` Andrew Jones
1 sibling, 0 replies; 5+ messages in thread
From: Dong Yang @ 2025-08-18 15:12 UTC (permalink / raw)
To: Bibo Mao
Cc: pbonzini, shuah, kvm, linux-kselftest, linux-kernel, chenhaucai,
Quan Zhou
Hi Bibo,
Thanks for your review and for catching this mistake.
On Mon, Aug 11, 2025 at 06:49:07PM +0800, Bibo Mao wrote:
> Hi Dong,
>
> Thanks for you patch.
>
> On 2025/8/11 下午4:24, Dong Yang wrote:
> > Remove the common KVM test cases already added to TEST_GEN_PROGS_COMMON
> > as following:
> >
> > demand_paging_test
> > dirty_log_test
> > guest_print_test
> > kvm_binary_stats_test
> > kvm_create_max_vcpus
> > kvm_page_table_test
> > set_memory_region_test
> >
> > Fixes: a867688c8cbb ("KVM: selftests: Add supported test cases for LoongArch")
> > Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
> > Signed-off-by: Dong Yang <dayss1224@gmail.com>
> > ---
> > tools/testing/selftests/kvm/Makefile.kvm | 7 -------
> > 1 file changed, 7 deletions(-)
> >
> > diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm
> > index 38b95998e1e6..d2ad85a8839f 100644
> > --- a/tools/testing/selftests/kvm/Makefile.kvm
> > +++ b/tools/testing/selftests/kvm/Makefile.kvm
> > @@ -199,17 +199,10 @@ TEST_GEN_PROGS_riscv += get-reg-list
> > TEST_GEN_PROGS_riscv += steal_time
> TEST_GEN_PROGS_loongarch = $(TEST_GEN_PROGS_COMMON) is missing.
You are absolutely right. I will add this line and send a v2 patch.
>
> BTW irqfd_test in TEST_GEN_PROGS_COMMON fails to run on LoongArch, does this
> test case pass to run on Riscv?
I have tested it, and irqfd_test in TEST_GEN_PROGS_COMMON passes on the RISC-V.
Thanks,
Dong Yang
>
> Regards
> Bibo Mao
> > TEST_GEN_PROGS_loongarch += coalesced_io_test
> > -TEST_GEN_PROGS_loongarch += demand_paging_test
> > TEST_GEN_PROGS_loongarch += dirty_log_perf_test
> > -TEST_GEN_PROGS_loongarch += dirty_log_test
> > -TEST_GEN_PROGS_loongarch += guest_print_test
> > TEST_GEN_PROGS_loongarch += hardware_disable_test
> > -TEST_GEN_PROGS_loongarch += kvm_binary_stats_test
> > -TEST_GEN_PROGS_loongarch += kvm_create_max_vcpus
> > -TEST_GEN_PROGS_loongarch += kvm_page_table_test
> > TEST_GEN_PROGS_loongarch += memslot_modification_stress_test
> > TEST_GEN_PROGS_loongarch += memslot_perf_test
> > -TEST_GEN_PROGS_loongarch += set_memory_region_test
> > SPLIT_TESTS += arch_timer
> > SPLIT_TESTS += get-reg-list
> >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: loongarch: selftests: Remove common tests built by TEST_GEN_PROGS_COMMON
2025-08-11 10:49 ` Bibo Mao
2025-08-18 15:12 ` Dong Yang
@ 2025-08-19 0:30 ` Andrew Jones
2025-08-19 1:01 ` Bibo Mao
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Jones @ 2025-08-19 0:30 UTC (permalink / raw)
To: Bibo Mao
Cc: Dong Yang, pbonzini, shuah, kvm, linux-kselftest, linux-kernel,
chenhaucai, Quan Zhou
On Mon, Aug 11, 2025 at 06:49:07PM +0800, Bibo Mao wrote:
> Hi Dong,
>
> Thanks for you patch.
>
> On 2025/8/11 下午4:24, Dong Yang wrote:
> > Remove the common KVM test cases already added to TEST_GEN_PROGS_COMMON
> > as following:
> >
> > demand_paging_test
> > dirty_log_test
> > guest_print_test
> > kvm_binary_stats_test
> > kvm_create_max_vcpus
> > kvm_page_table_test
> > set_memory_region_test
> >
> > Fixes: a867688c8cbb ("KVM: selftests: Add supported test cases for LoongArch")
> > Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
> > Signed-off-by: Dong Yang <dayss1224@gmail.com>
> > ---
> > tools/testing/selftests/kvm/Makefile.kvm | 7 -------
> > 1 file changed, 7 deletions(-)
> >
> > diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm
> > index 38b95998e1e6..d2ad85a8839f 100644
> > --- a/tools/testing/selftests/kvm/Makefile.kvm
> > +++ b/tools/testing/selftests/kvm/Makefile.kvm
> > @@ -199,17 +199,10 @@ TEST_GEN_PROGS_riscv += get-reg-list
> > TEST_GEN_PROGS_riscv += steal_time
> TEST_GEN_PROGS_loongarch = $(TEST_GEN_PROGS_COMMON) is missing.
>
> BTW irqfd_test in TEST_GEN_PROGS_COMMON fails to run on LoongArch, does this
> test case pass to run on Riscv?
It appears to. It outputs the vm mode created and then exits with a zero
exit code.
Thanks,
drew
>
> Regards
> Bibo Mao
> > TEST_GEN_PROGS_loongarch += coalesced_io_test
> > -TEST_GEN_PROGS_loongarch += demand_paging_test
> > TEST_GEN_PROGS_loongarch += dirty_log_perf_test
> > -TEST_GEN_PROGS_loongarch += dirty_log_test
> > -TEST_GEN_PROGS_loongarch += guest_print_test
> > TEST_GEN_PROGS_loongarch += hardware_disable_test
> > -TEST_GEN_PROGS_loongarch += kvm_binary_stats_test
> > -TEST_GEN_PROGS_loongarch += kvm_create_max_vcpus
> > -TEST_GEN_PROGS_loongarch += kvm_page_table_test
> > TEST_GEN_PROGS_loongarch += memslot_modification_stress_test
> > TEST_GEN_PROGS_loongarch += memslot_perf_test
> > -TEST_GEN_PROGS_loongarch += set_memory_region_test
> > SPLIT_TESTS += arch_timer
> > SPLIT_TESTS += get-reg-list
> >
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: loongarch: selftests: Remove common tests built by TEST_GEN_PROGS_COMMON
2025-08-19 0:30 ` Andrew Jones
@ 2025-08-19 1:01 ` Bibo Mao
0 siblings, 0 replies; 5+ messages in thread
From: Bibo Mao @ 2025-08-19 1:01 UTC (permalink / raw)
To: Andrew Jones
Cc: Dong Yang, pbonzini, shuah, kvm, linux-kselftest, linux-kernel,
chenhaucai, Quan Zhou
On 2025/8/19 上午8:30, Andrew Jones wrote:
> On Mon, Aug 11, 2025 at 06:49:07PM +0800, Bibo Mao wrote:
>> Hi Dong,
>>
>> Thanks for you patch.
>>
>> On 2025/8/11 下午4:24, Dong Yang wrote:
>>> Remove the common KVM test cases already added to TEST_GEN_PROGS_COMMON
>>> as following:
>>>
>>> demand_paging_test
>>> dirty_log_test
>>> guest_print_test
>>> kvm_binary_stats_test
>>> kvm_create_max_vcpus
>>> kvm_page_table_test
>>> set_memory_region_test
>>>
>>> Fixes: a867688c8cbb ("KVM: selftests: Add supported test cases for LoongArch")
>>> Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
>>> Signed-off-by: Dong Yang <dayss1224@gmail.com>
>>> ---
>>> tools/testing/selftests/kvm/Makefile.kvm | 7 -------
>>> 1 file changed, 7 deletions(-)
>>>
>>> diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm
>>> index 38b95998e1e6..d2ad85a8839f 100644
>>> --- a/tools/testing/selftests/kvm/Makefile.kvm
>>> +++ b/tools/testing/selftests/kvm/Makefile.kvm
>>> @@ -199,17 +199,10 @@ TEST_GEN_PROGS_riscv += get-reg-list
>>> TEST_GEN_PROGS_riscv += steal_time
>> TEST_GEN_PROGS_loongarch = $(TEST_GEN_PROGS_COMMON) is missing.
>>
>> BTW irqfd_test in TEST_GEN_PROGS_COMMON fails to run on LoongArch, does this
>> test case pass to run on Riscv?
>
> It appears to. It outputs the vm mode created and then exits with a zero
> exit code.
Here is output of irqfd test on LoongArch
[root@kvm-131 kvm]# ./irqfd_test
Random seed: 0x6b8b4567
==== Test Assertion Failure ====
include/kvm_util.h:527: !ret
pid=4016 tid=4016 errno=11 - Resource temporarily unavailable
1 0x00000001200027ab: kvm_irqfd at kvm_util.h:527
2 0x00000001200020d7: main at irqfd_test.c:100
3 0x00007ffff38a8707: ?? ??:0
4 0x00007ffff38a87ef: ?? ??:0
5 0x00000001200023b7: _start at ??:?
KVM_IRQFD failed, rc: -1 errno: 11 (Resource temporarily unavailable)
The problem is that kernel irqchip is not created with irqfd_test, and
function kvm_arch_intc_initialized() returns false on LongArch.
/*
* returns true if the virtual interrupt controller is initialized and
* ready to accept virtual IRQ. On some architectures virtual interrupt
* controller is dynamically instantiated and this is not always true.
*/
bool kvm_arch_intc_initialized(struct kvm *kvm);
On LoongArch virtual irqchip is dynamically created by VMM.
Regards
Bibo Mao
>
> Thanks,
> drew
>
>>
>> Regards
>> Bibo Mao
>>> TEST_GEN_PROGS_loongarch += coalesced_io_test
>>> -TEST_GEN_PROGS_loongarch += demand_paging_test
>>> TEST_GEN_PROGS_loongarch += dirty_log_perf_test
>>> -TEST_GEN_PROGS_loongarch += dirty_log_test
>>> -TEST_GEN_PROGS_loongarch += guest_print_test
>>> TEST_GEN_PROGS_loongarch += hardware_disable_test
>>> -TEST_GEN_PROGS_loongarch += kvm_binary_stats_test
>>> -TEST_GEN_PROGS_loongarch += kvm_create_max_vcpus
>>> -TEST_GEN_PROGS_loongarch += kvm_page_table_test
>>> TEST_GEN_PROGS_loongarch += memslot_modification_stress_test
>>> TEST_GEN_PROGS_loongarch += memslot_perf_test
>>> -TEST_GEN_PROGS_loongarch += set_memory_region_test
>>> SPLIT_TESTS += arch_timer
>>> SPLIT_TESTS += get-reg-list
>>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-08-19 1:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-11 8:24 [PATCH] KVM: loongarch: selftests: Remove common tests built by TEST_GEN_PROGS_COMMON Dong Yang
2025-08-11 10:49 ` Bibo Mao
2025-08-18 15:12 ` Dong Yang
2025-08-19 0:30 ` Andrew Jones
2025-08-19 1:01 ` Bibo Mao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox