* [PATCH v3 0/3] KVM: riscv: selftests: Enable supported test cases
@ 2025-09-01 7:35 dayss1224
2025-09-01 7:35 ` [PATCH v3 1/3] KVM: riscv: selftests: Use the existing RISCV_FENCE macro in `rseq-riscv.h` dayss1224
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: dayss1224 @ 2025-09-01 7:35 UTC (permalink / raw)
To: pbonzini, shuah, anup
Cc: atish.patra, paul.walmsley, palmer, aou, alex, kvm,
linux-kselftest, linux-kernel, kvm-riscv, linux-riscv, Dong Yang
From: Dong Yang <dayss1224@gmail.com>
Add supported KVM test cases and fix the compilation dependencies.
---
Changes in v3:
- Reorder patches to fix build dependencies
- Sort common supported test cases alphabetically
- Move ucall_common.h include from common header to specific source files
Changes in v2:
- Delete some repeat KVM test cases on riscv
- Add missing headers to fix the build for new RISC-V KVM selftests
Dong Yang (1):
KVM: riscv: selftests: Add missing headers for new testcases
Quan Zhou (2):
KVM: riscv: selftests: Use the existing RISCV_FENCE macro in
`rseq-riscv.h`
KVM: riscv: selftests: Add common supported test cases
tools/testing/selftests/kvm/Makefile.kvm | 6 ++++++
tools/testing/selftests/kvm/access_tracking_perf_test.c | 1 +
tools/testing/selftests/kvm/include/riscv/processor.h | 1 +
.../selftests/kvm/memslot_modification_stress_test.c | 1 +
tools/testing/selftests/kvm/memslot_perf_test.c | 1 +
tools/testing/selftests/rseq/rseq-riscv.h | 3 +--
6 files changed, 11 insertions(+), 2 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 1/3] KVM: riscv: selftests: Use the existing RISCV_FENCE macro in `rseq-riscv.h`
2025-09-01 7:35 [PATCH v3 0/3] KVM: riscv: selftests: Enable supported test cases dayss1224
@ 2025-09-01 7:35 ` dayss1224
2025-09-01 7:35 ` [PATCH v3 2/3] KVM: riscv: selftests: Add missing headers for new testcases dayss1224
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dayss1224 @ 2025-09-01 7:35 UTC (permalink / raw)
To: pbonzini, shuah, anup
Cc: atish.patra, paul.walmsley, palmer, aou, alex, kvm,
linux-kselftest, linux-kernel, kvm-riscv, linux-riscv, Quan Zhou,
Dong Yang, Andrew Jones
From: Quan Zhou <zhouquan@iscas.ac.cn>
To avoid redefinition issues with RISCV_FENCE,
directly reference the existing macro in `rseq-riscv.h`.
Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Signed-off-by: Dong Yang <dayss1224@gmail.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
---
tools/testing/selftests/rseq/rseq-riscv.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/testing/selftests/rseq/rseq-riscv.h b/tools/testing/selftests/rseq/rseq-riscv.h
index 67d544aaa9a3..06c840e81c8b 100644
--- a/tools/testing/selftests/rseq/rseq-riscv.h
+++ b/tools/testing/selftests/rseq/rseq-riscv.h
@@ -8,6 +8,7 @@
* exception when executed in all modes.
*/
#include <endian.h>
+#include <asm/fence.h>
#if defined(__BYTE_ORDER) ? (__BYTE_ORDER == __LITTLE_ENDIAN) : defined(__LITTLE_ENDIAN)
#define RSEQ_SIG 0xf1401073 /* csrr mhartid, x0 */
@@ -24,8 +25,6 @@
#define REG_L __REG_SEL("ld ", "lw ")
#define REG_S __REG_SEL("sd ", "sw ")
-#define RISCV_FENCE(p, s) \
- __asm__ __volatile__ ("fence " #p "," #s : : : "memory")
#define rseq_smp_mb() RISCV_FENCE(rw, rw)
#define rseq_smp_rmb() RISCV_FENCE(r, r)
#define rseq_smp_wmb() RISCV_FENCE(w, w)
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 2/3] KVM: riscv: selftests: Add missing headers for new testcases
2025-09-01 7:35 [PATCH v3 0/3] KVM: riscv: selftests: Enable supported test cases dayss1224
2025-09-01 7:35 ` [PATCH v3 1/3] KVM: riscv: selftests: Use the existing RISCV_FENCE macro in `rseq-riscv.h` dayss1224
@ 2025-09-01 7:35 ` dayss1224
2025-09-01 7:35 ` [PATCH v3 3/3] KVM: riscv: selftests: Add common supported test cases dayss1224
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dayss1224 @ 2025-09-01 7:35 UTC (permalink / raw)
To: pbonzini, shuah, anup
Cc: atish.patra, paul.walmsley, palmer, aou, alex, kvm,
linux-kselftest, linux-kernel, kvm-riscv, linux-riscv, Dong Yang,
Quan Zhou
From: Dong Yang <dayss1224@gmail.com>
Add missing headers to fix the build for new RISC-V KVM selftests.
Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Signed-off-by: Dong Yang <dayss1224@gmail.com>
---
tools/testing/selftests/kvm/access_tracking_perf_test.c | 1 +
tools/testing/selftests/kvm/include/riscv/processor.h | 1 +
tools/testing/selftests/kvm/memslot_modification_stress_test.c | 1 +
tools/testing/selftests/kvm/memslot_perf_test.c | 1 +
4 files changed, 4 insertions(+)
diff --git a/tools/testing/selftests/kvm/access_tracking_perf_test.c b/tools/testing/selftests/kvm/access_tracking_perf_test.c
index c9de66537ec3..b058f27b2141 100644
--- a/tools/testing/selftests/kvm/access_tracking_perf_test.c
+++ b/tools/testing/selftests/kvm/access_tracking_perf_test.c
@@ -50,6 +50,7 @@
#include "memstress.h"
#include "guest_modes.h"
#include "processor.h"
+#include "ucall_common.h"
#include "cgroup_util.h"
#include "lru_gen_util.h"
diff --git a/tools/testing/selftests/kvm/include/riscv/processor.h b/tools/testing/selftests/kvm/include/riscv/processor.h
index 162f303d9daa..e58282488beb 100644
--- a/tools/testing/selftests/kvm/include/riscv/processor.h
+++ b/tools/testing/selftests/kvm/include/riscv/processor.h
@@ -9,6 +9,7 @@
#include <linux/stringify.h>
#include <asm/csr.h>
+#include <asm/vdso/processor.h>
#include "kvm_util.h"
#define INSN_OPCODE_MASK 0x007c
diff --git a/tools/testing/selftests/kvm/memslot_modification_stress_test.c b/tools/testing/selftests/kvm/memslot_modification_stress_test.c
index c81a84990eab..3cdfa3b19b85 100644
--- a/tools/testing/selftests/kvm/memslot_modification_stress_test.c
+++ b/tools/testing/selftests/kvm/memslot_modification_stress_test.c
@@ -22,6 +22,7 @@
#include "processor.h"
#include "test_util.h"
#include "guest_modes.h"
+#include "ucall_common.h"
#define DUMMY_MEMSLOT_INDEX 7
diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c b/tools/testing/selftests/kvm/memslot_perf_test.c
index e3711beff7f3..5087d082c4b0 100644
--- a/tools/testing/selftests/kvm/memslot_perf_test.c
+++ b/tools/testing/selftests/kvm/memslot_perf_test.c
@@ -25,6 +25,7 @@
#include <test_util.h>
#include <kvm_util.h>
#include <processor.h>
+#include <ucall_common.h>
#define MEM_EXTRA_SIZE SZ_64K
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 3/3] KVM: riscv: selftests: Add common supported test cases
2025-09-01 7:35 [PATCH v3 0/3] KVM: riscv: selftests: Enable supported test cases dayss1224
2025-09-01 7:35 ` [PATCH v3 1/3] KVM: riscv: selftests: Use the existing RISCV_FENCE macro in `rseq-riscv.h` dayss1224
2025-09-01 7:35 ` [PATCH v3 2/3] KVM: riscv: selftests: Add missing headers for new testcases dayss1224
@ 2025-09-01 7:35 ` dayss1224
2025-09-02 15:36 ` [PATCH v3 0/3] KVM: riscv: selftests: Enable " Andrew Jones
2025-09-03 14:31 ` Anup Patel
4 siblings, 0 replies; 6+ messages in thread
From: dayss1224 @ 2025-09-01 7:35 UTC (permalink / raw)
To: pbonzini, shuah, anup
Cc: atish.patra, paul.walmsley, palmer, aou, alex, kvm,
linux-kselftest, linux-kernel, kvm-riscv, linux-riscv, Quan Zhou,
Dong Yang
From: Quan Zhou <zhouquan@iscas.ac.cn>
Some common KVM test cases are supported on riscv now as following:
access_tracking_perf_test
dirty_log_perf_test
memslot_modification_stress_test
memslot_perf_test
mmu_stress_test
rseq_test
Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Signed-off-by: Dong Yang <dayss1224@gmail.com>
---
tools/testing/selftests/kvm/Makefile.kvm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selftests/kvm/Makefile.kvm
index f6fe7a07a0a2..88613a851cc1 100644
--- a/tools/testing/selftests/kvm/Makefile.kvm
+++ b/tools/testing/selftests/kvm/Makefile.kvm
@@ -195,9 +195,15 @@ TEST_GEN_PROGS_s390 += rseq_test
TEST_GEN_PROGS_riscv = $(TEST_GEN_PROGS_COMMON)
TEST_GEN_PROGS_riscv += riscv/sbi_pmu_test
TEST_GEN_PROGS_riscv += riscv/ebreak_test
+TEST_GEN_PROGS_riscv += access_tracking_perf_test
TEST_GEN_PROGS_riscv += arch_timer
TEST_GEN_PROGS_riscv += coalesced_io_test
+TEST_GEN_PROGS_riscv += dirty_log_perf_test
TEST_GEN_PROGS_riscv += get-reg-list
+TEST_GEN_PROGS_riscv += memslot_modification_stress_test
+TEST_GEN_PROGS_riscv += memslot_perf_test
+TEST_GEN_PROGS_riscv += mmu_stress_test
+TEST_GEN_PROGS_riscv += rseq_test
TEST_GEN_PROGS_riscv += steal_time
TEST_GEN_PROGS_loongarch += coalesced_io_test
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 0/3] KVM: riscv: selftests: Enable supported test cases
2025-09-01 7:35 [PATCH v3 0/3] KVM: riscv: selftests: Enable supported test cases dayss1224
` (2 preceding siblings ...)
2025-09-01 7:35 ` [PATCH v3 3/3] KVM: riscv: selftests: Add common supported test cases dayss1224
@ 2025-09-02 15:36 ` Andrew Jones
2025-09-03 14:31 ` Anup Patel
4 siblings, 0 replies; 6+ messages in thread
From: Andrew Jones @ 2025-09-02 15:36 UTC (permalink / raw)
To: dayss1224
Cc: pbonzini, shuah, anup, atish.patra, paul.walmsley, palmer, aou,
alex, kvm, linux-kselftest, linux-kernel, kvm-riscv, linux-riscv
On Mon, Sep 01, 2025 at 03:35:48PM +0800, dayss1224@gmail.com wrote:
> From: Dong Yang <dayss1224@gmail.com>
>
> Add supported KVM test cases and fix the compilation dependencies.
> ---
> Changes in v3:
> - Reorder patches to fix build dependencies
> - Sort common supported test cases alphabetically
> - Move ucall_common.h include from common header to specific source files
>
> Changes in v2:
> - Delete some repeat KVM test cases on riscv
> - Add missing headers to fix the build for new RISC-V KVM selftests
>
> Dong Yang (1):
> KVM: riscv: selftests: Add missing headers for new testcases
>
> Quan Zhou (2):
> KVM: riscv: selftests: Use the existing RISCV_FENCE macro in
> `rseq-riscv.h`
> KVM: riscv: selftests: Add common supported test cases
>
> tools/testing/selftests/kvm/Makefile.kvm | 6 ++++++
> tools/testing/selftests/kvm/access_tracking_perf_test.c | 1 +
> tools/testing/selftests/kvm/include/riscv/processor.h | 1 +
> .../selftests/kvm/memslot_modification_stress_test.c | 1 +
> tools/testing/selftests/kvm/memslot_perf_test.c | 1 +
> tools/testing/selftests/rseq/rseq-riscv.h | 3 +--
> 6 files changed, 11 insertions(+), 2 deletions(-)
>
> --
> 2.34.1
In the future please CC previous reviewers on the entire series
(particularly when they have reviewed the entire previous series).
For the series,
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 0/3] KVM: riscv: selftests: Enable supported test cases
2025-09-01 7:35 [PATCH v3 0/3] KVM: riscv: selftests: Enable supported test cases dayss1224
` (3 preceding siblings ...)
2025-09-02 15:36 ` [PATCH v3 0/3] KVM: riscv: selftests: Enable " Andrew Jones
@ 2025-09-03 14:31 ` Anup Patel
4 siblings, 0 replies; 6+ messages in thread
From: Anup Patel @ 2025-09-03 14:31 UTC (permalink / raw)
To: dayss1224
Cc: pbonzini, shuah, atish.patra, paul.walmsley, palmer, aou, alex,
kvm, linux-kselftest, linux-kernel, kvm-riscv, linux-riscv
On Mon, Sep 1, 2025 at 1:06 PM <dayss1224@gmail.com> wrote:
>
> From: Dong Yang <dayss1224@gmail.com>
>
> Add supported KVM test cases and fix the compilation dependencies.
> ---
> Changes in v3:
> - Reorder patches to fix build dependencies
> - Sort common supported test cases alphabetically
> - Move ucall_common.h include from common header to specific source files
>
> Changes in v2:
> - Delete some repeat KVM test cases on riscv
> - Add missing headers to fix the build for new RISC-V KVM selftests
>
> Dong Yang (1):
> KVM: riscv: selftests: Add missing headers for new testcases
>
> Quan Zhou (2):
> KVM: riscv: selftests: Use the existing RISCV_FENCE macro in
> `rseq-riscv.h`
> KVM: riscv: selftests: Add common supported test cases
Queued this series for Linux-6.18
Thanks,
Anup
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-09-03 14:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-01 7:35 [PATCH v3 0/3] KVM: riscv: selftests: Enable supported test cases dayss1224
2025-09-01 7:35 ` [PATCH v3 1/3] KVM: riscv: selftests: Use the existing RISCV_FENCE macro in `rseq-riscv.h` dayss1224
2025-09-01 7:35 ` [PATCH v3 2/3] KVM: riscv: selftests: Add missing headers for new testcases dayss1224
2025-09-01 7:35 ` [PATCH v3 3/3] KVM: riscv: selftests: Add common supported test cases dayss1224
2025-09-02 15:36 ` [PATCH v3 0/3] KVM: riscv: selftests: Enable " Andrew Jones
2025-09-03 14:31 ` Anup Patel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).