Skip to contentSkip to conversation

Add riscv tests to cover the base extension specs

PATCH Superseded [email protected] 3 participants 18 messages Mar 13, 2024 – Mar 20, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v4 cover Add riscv tests to cover the base extension specs

From: Carlos Maiolino <[email protected]>

Hi,

This is a new (V4) version of this series to create tests to cover functions of the riscv's SBI base implementation spec. The series also includes a a few helpers to reduce code duplication.

This new version includes updates related to Drew reviews, and rebasing of the patches according to the changes.
This new series has also been rebased on TOT, didn't affect the patches, but worth the heads up.

Patches tagged with V4 needed modifications from the previous version.

Detailed updates are specified on a patch-basis

Carlos Maiolino (6):
riscv: Add a wrapper to call sbi_ecall for base extension
riscv: Add test to probe SBI Extension
riscv: Factor out environment variable check and report generation
riscv: Implement test for architecture ID register
riscv: Enable gen_report() to print the wrong value in case of failure
riscv: Test for specific SBI implementation ID

 riscv/sbi.c | 81 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 69 insertions(+), 12 deletions(-)
Signature · 1 line
2.44.0
#1 lore raw

PATCH v4 1/6 riscv: Add a wrapper to call sbi_ecall for base extension

From: Carlos Maiolino <[email protected]>

All SBI extension functions accepts at most one argument, so create a wrapper around sbi_ecall() to avoid needing to pass in arguments 1 to 5 all the time, also, the wrapper can specify SBI_EXT_BASE directly.

---
V4:
- Remove stray blank line
V3:
- Move to the beginning of the series
- Don't mark __base_sbi_ecall() as inline
V2:
- This patch was introduced in V2

 riscv/sbi.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
riscv/sbi.c +6 -1
index ffb07a25..76b72a80 100644
@@ -14,6 +14,11 @@ static void help(void)
 	puts("An environ must be provided where expected values are given.\n");
 }
 
+static struct sbiret __base_sbi_ecall(int fid, unsigned long arg0)
+{
+	return sbi_ecall(SBI_EXT_BASE, fid, arg0, 0, 0, 0, 0, 0);
+}
+
 int main(int argc, char **argv)
 {
 	struct sbiret ret;
@@ -32,7 +37,7 @@ int main(int argc, char **argv)
 	}
 	expected = strtol(getenv("MVENDORID"), NULL, 0);
 
-	ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_GET_MVENDORID, 0, 0, 0, 0, 0, 0);
+	ret = __base_sbi_ecall(SBI_EXT_BASE_GET_MVENDORID, 0);
 	report(!ret.error, "mvendorid: no error");
 	report(ret.value == expected, "mvendorid");
 
Signature · 1 line
2.44.0
#2 lore raw

PATCH v4 2/6 riscv: Add test to probe SBI Extension

In reply to [email protected]

From: Carlos Maiolino <[email protected]>

Factor out vendor id test to a new helper, and add a new test for probing the SBI extension.
Compare the retrieved value against an environment variable, as the implementation can return any non-zero value.

---
V4:
- rebase on previous patch update (blank line removal)
- Fix sbi_ecall to pass SBI_BASE_EXT as argument
V3:
- Adapt patch to use __base_sbi_ecall

 riscv/sbi.c | 43 ++++++++++++++++++++++++++++++++-----------
 1 file changed, 32 insertions(+), 11 deletions(-)
riscv/sbi.c +32 -11
index 76b72a80..519c5a0c 100644
@@ -19,28 +19,49 @@ static struct sbiret __base_sbi_ecall(int fid, unsigned long arg0)
 	return sbi_ecall(SBI_EXT_BASE, fid, arg0, 0, 0, 0, 0, 0);
 }
 
-int main(int argc, char **argv)
+static void check_base(void)
 {
 	struct sbiret ret;
 	long expected;
 
-	if (argc > 1 && !strcmp(argv[1], "-h")) {
-		help();
-		exit(0);
-	}
-
-	report_prefix_push("sbi");
+	report_prefix_push("base");
 
 	if (!getenv("MVENDORID")) {
 		report_skip("mvendorid: missing MVENDORID environment variable");
-		goto done;
+		return;
 	}
+
+	report_prefix_push("mvendorid");
 	expected = strtol(getenv("MVENDORID"), NULL, 0);
 
 	ret = __base_sbi_ecall(SBI_EXT_BASE_GET_MVENDORID, 0);
-	report(!ret.error, "mvendorid: no error");
-	report(ret.value == expected, "mvendorid");
 
-done:
+	report(!ret.error, "no sbi.error");
+	report(ret.value == expected, "expected sbi.value");
+	report_prefix_pop();
+
+	report_prefix_push("probe_ext");
+	expected = getenv("PROBE_EXT") ? strtol(getenv("PROBE_EXT"), NULL, 0) : 1;
+
+	ret = __base_sbi_ecall(SBI_EXT_BASE_PROBE_EXT, SBI_EXT_BASE);
+
+	report(!ret.error, "no sbi.error");
+	report(ret.value == expected, "expected sbi.value");
+	report_prefix_pop();
+
+	report_prefix_pop();
+}
+
+int main(int argc, char **argv)
+{
+
+	if (argc > 1 && !strcmp(argv[1], "-h")) {
+		help();
+		exit(0);
+	}
+
+	report_prefix_push("sbi");
+	check_base();
+
 	return report_summary();
 }
Signature · 1 line
2.44.0
#4 lore raw

PATCH v4 3/6 riscv: Factor out environment variable check and report generation

In reply to [email protected]

From: Carlos Maiolino <[email protected]>

We do check Environment variables and generate reports all the time, so use a couple of helpers for that

---
V4:
- Fix blank line
- rebase on top of previous fix for probing extension
V3:
- Adapt to use __base_sbi_ecall()

 riscv/sbi.c | 37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)
riscv/sbi.c +22 -15
index 519c5a0c..6be78dae 100644
@@ -19,6 +19,22 @@ static struct sbiret __base_sbi_ecall(int fid, unsigned long arg0)
 	return sbi_ecall(SBI_EXT_BASE, fid, arg0, 0, 0, 0, 0, 0);
 }
 
+static bool env_or_skip(const char *env)
+{
+	if (!getenv(env)) {
+		report_skip("missing %s environment variable", env);
+		return false;
+	}
+
+	return true;
+}
+
+static void gen_report(struct sbiret *ret, long expected)
+{
+	report(!ret->error, "no sbi.error");
+	report(ret->value == expected, "expected sbi.value");
+}
+
 static void check_base(void)
 {
 	struct sbiret ret;
@@ -26,27 +42,18 @@ static void check_base(void)
 
 	report_prefix_push("base");
 
-	if (!getenv("MVENDORID")) {
-		report_skip("mvendorid: missing MVENDORID environment variable");
-		return;
-	}
-
 	report_prefix_push("mvendorid");
-	expected = strtol(getenv("MVENDORID"), NULL, 0);
-
-	ret = __base_sbi_ecall(SBI_EXT_BASE_GET_MVENDORID, 0);
-
-	report(!ret.error, "no sbi.error");
-	report(ret.value == expected, "expected sbi.value");
+	if (env_or_skip("MVENDORID")) {
+		expected = strtol(getenv("MVENDORID"), NULL, 0);
+		ret = __base_sbi_ecall(SBI_EXT_BASE_GET_MVENDORID, 0);
+		gen_report(&ret, expected);
+	}
 	report_prefix_pop();
 
 	report_prefix_push("probe_ext");
 	expected = getenv("PROBE_EXT") ? strtol(getenv("PROBE_EXT"), NULL, 0) : 1;
-
 	ret = __base_sbi_ecall(SBI_EXT_BASE_PROBE_EXT, SBI_EXT_BASE);
-
-	report(!ret.error, "no sbi.error");
-	report(ret.value == expected, "expected sbi.value");
+	gen_report(&ret, expected);
 	report_prefix_pop();
 
 	report_prefix_pop();
Signature · 1 line
2.44.0
#5 lore raw

PATCH v4 4/6 riscv: Implement test for architecture ID register

In reply to [email protected]

From: Carlos Maiolino <[email protected]>

Probe the MARCHID register and compare it to the specified MARCHID environment variable.

---
 riscv/sbi.c | 8 ++++++++
 1 file changed, 8 insertions(+)
riscv/sbi.c +8 -0
index 6be78dae..f33c19f4 100644
@@ -56,6 +56,14 @@ static void check_base(void)
 	gen_report(&ret, expected);
 	report_prefix_pop();
 
+	report_prefix_push("marchid");
+	if (env_or_skip("MARCHID")) {
+		expected = strtol(getenv("MARCHID"), NULL, 0);
+		ret = __base_sbi_ecall(SBI_EXT_BASE_GET_MARCHID, 0);
+		gen_report(&ret, expected);
+	}
+	report_prefix_pop();
+
 	report_prefix_pop();
 }
 
Signature · 1 line
2.44.0
#6 lore raw

PATCH v4 5/6 riscv: Enable gen_report() to print the wrong value in case of failure

In reply to [email protected]

From: Carlos Maiolino <[email protected]>

If the test fails because the expected value doesn't match, it's useful to know what value was actually printed.

---
V4:
- Rebase on top of previous changes related to sbi probe extension

 riscv/sbi.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
riscv/sbi.c +14 -6
index f33c19f4..043beb04 100644
@@ -29,10 +29,18 @@ static bool env_or_skip(const char *env)
 	return true;
 }
 
-static void gen_report(struct sbiret *ret, long expected)
+static void gen_report(struct sbiret *ret,
+		       long expected_error, long expected_value)
 {
-	report(!ret->error, "no sbi.error");
-	report(ret->value == expected, "expected sbi.value");
+	bool check_error = ret->error == expected_error;
+	bool check_value = ret->value == expected_value;
+
+	if (!check_error || !check_value)
+		report_info("expected (error: %ld, value: %ld), received: (error: %ld, value %ld)\n",
+			    expected_error, expected_value, ret->error, ret->value);
+
+	report(check_error, "expected sbi.error");
+	report(check_value, "expected sbi.value");
 }
 
 static void check_base(void)
@@ -46,21 +54,21 @@ static void check_base(void)
 	if (env_or_skip("MVENDORID")) {
 		expected = strtol(getenv("MVENDORID"), NULL, 0);
 		ret = __base_sbi_ecall(SBI_EXT_BASE_GET_MVENDORID, 0);
-		gen_report(&ret, expected);
+		gen_report(&ret, 0, expected);
 	}
 	report_prefix_pop();
 
 	report_prefix_push("probe_ext");
 	expected = getenv("PROBE_EXT") ? strtol(getenv("PROBE_EXT"), NULL, 0) : 1;
 	ret = __base_sbi_ecall(SBI_EXT_BASE_PROBE_EXT, SBI_EXT_BASE);
-	gen_report(&ret, expected);
+	gen_report(&ret, 0, expected);
 	report_prefix_pop();
 
 	report_prefix_push("marchid");
 	if (env_or_skip("MARCHID")) {
 		expected = strtol(getenv("MARCHID"), NULL, 0);
 		ret = __base_sbi_ecall(SBI_EXT_BASE_GET_MARCHID, 0);
-		gen_report(&ret, expected);
+		gen_report(&ret, 0, expected);
 	}
 	report_prefix_pop();
 
Signature · 1 line
2.44.0
#8 lore raw

PATCH v4 6/6 riscv: Test for specific SBI implementation ID

In reply to [email protected]

From: Carlos Maiolino <[email protected]>

Retrieve the ID from the SBI, and test it against the IMPL_ID enviroment variable.

---
V4:
- Definitely update to use __base_sbi_ecall
V3:
- Update to use __base_sbi_ecall (also fixes the correct paramenters)
- Rename env var to IMPL_ID to match the other tests
V2:
- Update commit description to fit 70 chars
- Move sbi_ecall() after expected assignment to make consistent with other tests

 riscv/sbi.c | 8 ++++++++
 1 file changed, 8 insertions(+)
riscv/sbi.c +8 -0
index 043beb04..2a4002df 100644
@@ -58,6 +58,14 @@ static void check_base(void)
 	}
 	report_prefix_pop();
 
+	report_prefix_push("impl_id");
+	if (env_or_skip("IMPL_ID")) {
+		expected = strtol(getenv("IMPL_ID"), NULL, 0);
+		ret = __base_sbi_ecall(SBI_EXT_BASE_GET_IMP_ID, 0);
+		gen_report(&ret, 0, expected);
+	}
+	report_prefix_pop();
+
 	report_prefix_push("probe_ext");
 	expected = getenv("PROBE_EXT") ? strtol(getenv("PROBE_EXT"), NULL, 0) : 1;
 	ret = __base_sbi_ecall(SBI_EXT_BASE_PROBE_EXT, SBI_EXT_BASE);
Signature · 1 line
2.44.0
#3 lore raw

PATCH v4 2/6 riscv: Add test to probe SBI Extension

In reply to [email protected]
Quoted 87 lines · cem at kernel.org

From: Carlos Maiolino <[email protected]>

Factor out vendor id test to a new helper, and add a new test for probing the SBI extension.
Compare the retrieved value against an environment variable, as the implementation can return any non-zero value.

---
V4:
- rebase on previous patch update (blank line removal)
- Fix sbi_ecall to pass SBI_BASE_EXT as argument
V3:
- Adapt patch to use __base_sbi_ecall

 riscv/sbi.c | 43 ++++++++++++++++++++++++++++++++-----------
 1 file changed, 32 insertions(+), 11 deletions(-)
riscv/sbi.c +32 -11
index 76b72a80..519c5a0c 100644
@@ -19,28 +19,49 @@ static struct sbiret __base_sbi_ecall(int fid, unsigned long arg0)
 	return sbi_ecall(SBI_EXT_BASE, fid, arg0, 0, 0, 0, 0, 0);
 }
 
-int main(int argc, char **argv)
+static void check_base(void)
 {
 	struct sbiret ret;
 	long expected;
 
-	if (argc > 1 && !strcmp(argv[1], "-h")) {
-		help();
-		exit(0);
-	}
-
-	report_prefix_push("sbi");
+	report_prefix_push("base");
 
 	if (!getenv("MVENDORID")) {
 		report_skip("mvendorid: missing MVENDORID environment variable");
-		goto done;
+		return;
 	}
+
+	report_prefix_push("mvendorid");
 	expected = strtol(getenv("MVENDORID"), NULL, 0);
 
 	ret = __base_sbi_ecall(SBI_EXT_BASE_GET_MVENDORID, 0);
-	report(!ret.error, "mvendorid: no error");
-	report(ret.value == expected, "mvendorid");
 
-done:
+	report(!ret.error, "no sbi.error");
+	report(ret.value == expected, "expected sbi.value");
+	report_prefix_pop();
+
+	report_prefix_push("probe_ext");
+	expected = getenv("PROBE_EXT") ? strtol(getenv("PROBE_EXT"), NULL, 0) : 1;
+
+	ret = __base_sbi_ecall(SBI_EXT_BASE_PROBE_EXT, SBI_EXT_BASE);
+
+	report(!ret.error, "no sbi.error");
+	report(ret.value == expected, "expected sbi.value");
+	report_prefix_pop();
+
+	report_prefix_pop();
+}
+
+int main(int argc, char **argv)
+{
+
+	if (argc > 1 && !strcmp(argv[1], "-h")) {
+		help();
+		exit(0);
+	}
+
+	report_prefix_push("sbi");
+	check_base();
+
 	return report_summary();
 }
Signature · 1 line
2.44.0
#9 lore raw

PATCH v4 6/6 riscv: Test for specific SBI implementation ID

In reply to [email protected]
Quoted 43 lines · cem at kernel.org

From: Carlos Maiolino <[email protected]>

Retrieve the ID from the SBI, and test it against the IMPL_ID enviroment variable.

---
V4:
- Definitely update to use __base_sbi_ecall
V3:
- Update to use __base_sbi_ecall (also fixes the correct paramenters)
- Rename env var to IMPL_ID to match the other tests
V2:
- Update commit description to fit 70 chars
- Move sbi_ecall() after expected assignment to make consistent with other tests

 riscv/sbi.c | 8 ++++++++
 1 file changed, 8 insertions(+)
riscv/sbi.c +8 -0
index 043beb04..2a4002df 100644
@@ -58,6 +58,14 @@ static void check_base(void)
 	}
 	report_prefix_pop();
 
+	report_prefix_push("impl_id");
+	if (env_or_skip("IMPL_ID")) {
+		expected = strtol(getenv("IMPL_ID"), NULL, 0);
+		ret = __base_sbi_ecall(SBI_EXT_BASE_GET_IMP_ID, 0);
+		gen_report(&ret, 0, expected);
+	}
+	report_prefix_pop();
+
 	report_prefix_push("probe_ext");
 	expected = getenv("PROBE_EXT") ? strtol(getenv("PROBE_EXT"), NULL, 0) : 1;
 	ret = __base_sbi_ecall(SBI_EXT_BASE_PROBE_EXT, SBI_EXT_BASE);
Signature · 1 line
2.44.0
#7 lore raw

PATCH v4 5/6 riscv: Enable gen_report() to print the wrong value in case of failure

In reply to [email protected]
Quoted 24 lines · cem at kernel.org

From: Carlos Maiolino <[email protected]>

If the test fails because the expected value doesn't match, it's useful to know what value was actually printed.

---
V4:
- Rebase on top of previous changes related to sbi probe extension

 riscv/sbi.c | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)
riscv/sbi.c +0 -1
index f33c19f4..043beb04 100644
@@ -29,10 +29,18 @@ static bool env_or_skip(const char *env)
 	return true;
 }
 
-static void gen_report(struct sbiret *ret, long expected)

riscv/sbi.c static bool env_or_skip(const char *env) · line 39

Quoted 10 lines
riscv/sbi.c +7 -2
+static void gen_report(struct sbiret *ret,
+		       long expected_error, long expected_value)
 {
-	report(!ret->error, "no sbi.error");
-	report(ret->value == expected, "expected sbi.value");
+	bool check_error = ret->error == expected_error;
+	bool check_value = ret->value == expected_value;
+
+	if (!check_error || !check_value)
+		report_info("expected (error: %ld, value: %ld), received: (error: %ld, value %ld)\n",

I dropped the '\n' while queuing this since report_info appends its own.

Quoted 35 lines
riscv/sbi.c +7 -3
+			    expected_error, expected_value, ret->error, ret->value);
+
+	report(check_error, "expected sbi.error");
+	report(check_value, "expected sbi.value");
 }
 
 static void check_base(void)
@@ -46,21 +54,21 @@ static void check_base(void)
 	if (env_or_skip("MVENDORID")) {
 		expected = strtol(getenv("MVENDORID"), NULL, 0);
 		ret = __base_sbi_ecall(SBI_EXT_BASE_GET_MVENDORID, 0);
-		gen_report(&ret, expected);
+		gen_report(&ret, 0, expected);
 	}
 	report_prefix_pop();
 
 	report_prefix_push("probe_ext");
 	expected = getenv("PROBE_EXT") ? strtol(getenv("PROBE_EXT"), NULL, 0) : 1;
 	ret = __base_sbi_ecall(SBI_EXT_BASE_PROBE_EXT, SBI_EXT_BASE);
-	gen_report(&ret, expected);
+	gen_report(&ret, 0, expected);
 	report_prefix_pop();
 
 	report_prefix_push("marchid");
 	if (env_or_skip("MARCHID")) {
 		expected = strtol(getenv("MARCHID"), NULL, 0);
 		ret = __base_sbi_ecall(SBI_EXT_BASE_GET_MARCHID, 0);
-		gen_report(&ret, expected);
+		gen_report(&ret, 0, expected);
 	}
 	report_prefix_pop();
 
Signature · 1 line
2.44.0
#10 lore raw

PATCH v4 6/6 riscv: Test for specific SBI implementation ID

In reply to [email protected]
Quoted 43 lines · cem at kernel.org

From: Carlos Maiolino <[email protected]>

Retrieve the ID from the SBI, and test it against the IMPL_ID enviroment variable.

---
V4:
- Definitely update to use __base_sbi_ecall
V3:
- Update to use __base_sbi_ecall (also fixes the correct paramenters)
- Rename env var to IMPL_ID to match the other tests
V2:
- Update commit description to fit 70 chars
- Move sbi_ecall() after expected assignment to make consistent with other tests

 riscv/sbi.c | 8 ++++++++
 1 file changed, 8 insertions(+)
riscv/sbi.c +8 -0
index 043beb04..2a4002df 100644
@@ -58,6 +58,14 @@ static void check_base(void)
 	}
 	report_prefix_pop();
 
+	report_prefix_push("impl_id");
+	if (env_or_skip("IMPL_ID")) {
+		expected = strtol(getenv("IMPL_ID"), NULL, 0);
+		ret = __base_sbi_ecall(SBI_EXT_BASE_GET_IMP_ID, 0);
+		gen_report(&ret, 0, expected);
+	}
+	report_prefix_pop();
+
 	report_prefix_push("probe_ext");
 	expected = getenv("PROBE_EXT") ? strtol(getenv("PROBE_EXT"), NULL, 0) : 1;
 	ret = __base_sbi_ecall(SBI_EXT_BASE_PROBE_EXT, SBI_EXT_BASE);
Signature · 1 line
2.44.0

I adjusted the order of the tests to match the function order in the spec while queuing.

#11 lore raw

PATCH v4 6/6 riscv: Test for specific SBI implementation ID

Quoted 39 lines · Andrew Jones
Quoted 38 lines · cem at kernel.org

From: Carlos Maiolino <[email protected]>

Retrieve the ID from the SBI, and test it against the IMPL_ID enviroment variable.

---
V4:
- Definitely update to use __base_sbi_ecall
V3:
- Update to use __base_sbi_ecall (also fixes the correct paramenters)
- Rename env var to IMPL_ID to match the other tests
V2:
- Update commit description to fit 70 chars
- Move sbi_ecall() after expected assignment to make consistent with other tests

 riscv/sbi.c | 8 ++++++++
 1 file changed, 8 insertions(+)
riscv/sbi.c +8 -0
index 043beb04..2a4002df 100644
@@ -58,6 +58,14 @@ static void check_base(void)
 	}
 	report_prefix_pop();
 
+	report_prefix_push("impl_id");
+	if (env_or_skip("IMPL_ID")) {
+		expected = strtol(getenv("IMPL_ID"), NULL, 0);
+		ret = __base_sbi_ecall(SBI_EXT_BASE_GET_IMP_ID, 0);
+		gen_report(&ret, 0, expected);
+	}
+	report_prefix_pop();
+
 	report_prefix_push("probe_ext");
Quoted 9 lines
Quoted 5 lines
riscv/sbi.c +0 -1
 	expected = getenv("PROBE_EXT") ? strtol(getenv("PROBE_EXT"), NULL, 0) : 1;
 	ret = __base_sbi_ecall(SBI_EXT_BASE_PROBE_EXT, SBI_EXT_BASE);
--

2.44.0

I adjusted the order of the tests to match the function order in the spec while queuing.

Sounds good, thanks!
Carlos

#12 lore raw

v4 cover Add riscv tests to cover the base extension specs

In reply to [email protected]
Quoted 26 lines · cem at kernel.org

From: Carlos Maiolino <[email protected]>

Hi,

This is a new (V4) version of this series to create tests to cover functions of the riscv's SBI base implementation spec. The series also includes a a few helpers to reduce code duplication.

This new version includes updates related to Drew reviews, and rebasing of the patches according to the changes.
This new series has also been rebased on TOT, didn't affect the patches, but worth the heads up.

Patches tagged with V4 needed modifications from the previous version.

Detailed updates are specified on a patch-basis

Carlos Maiolino (6):
riscv: Add a wrapper to call sbi_ecall for base extension
riscv: Add test to probe SBI Extension
riscv: Factor out environment variable check and report generation
riscv: Implement test for architecture ID register
riscv: Enable gen_report() to print the wrong value in case of failure
riscv: Test for specific SBI implementation ID

Quoted 6 lines
 riscv/sbi.c | 81 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 69 insertions(+), 12 deletions(-)
Signature · 1 line
2.44.0

Merged to https://gitlab.com/kvm-unit-tests/kvm-unit-tests

Thanks,
drew

#13 lore raw

v4 cover Add riscv tests to cover the base extension specs

Quoted 27 lines · Andrew Jones
Quoted 26 lines · cem at kernel.org

From: Carlos Maiolino <[email protected]>

Hi,

This is a new (V4) version of this series to create tests to cover functions of the riscv's SBI base implementation spec. The series also includes a a few helpers to reduce code duplication.

This new version includes updates related to Drew reviews, and rebasing of the patches according to the changes.
This new series has also been rebased on TOT, didn't affect the patches, but worth the heads up.

Patches tagged with V4 needed modifications from the previous version.

Detailed updates are specified on a patch-basis

Carlos Maiolino (6):
riscv: Add a wrapper to call sbi_ecall for base extension
riscv: Add test to probe SBI Extension
riscv: Factor out environment variable check and report generation
riscv: Implement test for architecture ID register
riscv: Enable gen_report() to print the wrong value in case of failure
riscv: Test for specific SBI implementation ID

Quoted 8 lines
Quoted 6 lines
 riscv/sbi.c | 81 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 69 insertions(+), 12 deletions(-)
Signature · 1 line
2.44.0

Merged to https://gitlab.com/kvm-unit-tests/kvm-unit-tests

Hi Carlos,

I just realized you've forgotten to CC tech-prs on v3 and v4.

drew

#14 lore raw

v4 cover Add riscv tests to cover the base extension specs

Quoted 35 lines · Andrew Jones
Quoted 34 lines · Andrew Jones
Quoted 32 lines · cem at kernel.org

From: Carlos Maiolino <[email protected]>

Hi,

This is a new (V4) version of this series to create tests to cover functions of the riscv's SBI base implementation spec. The series also includes a a few helpers to reduce code duplication.

This new version includes updates related to Drew reviews, and rebasing of the patches according to the changes.
This new series has also been rebased on TOT, didn't affect the patches, but worth the heads up.

Patches tagged with V4 needed modifications from the previous version.

Detailed updates are specified on a patch-basis

Carlos Maiolino (6):
riscv: Add a wrapper to call sbi_ecall for base extension
riscv: Add test to probe SBI Extension
riscv: Factor out environment variable check and report generation
riscv: Implement test for architecture ID register
riscv: Enable gen_report() to print the wrong value in case of failure
riscv: Test for specific SBI implementation ID

 riscv/sbi.c | 81 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 69 insertions(+), 12 deletions(-)

--
2.44.0

Quoted 5 lines
Quoted 1 line

Merged to https://gitlab.com/kvm-unit-tests/kvm-unit-tests

Hi Carlos,

I just realized you've forgotten to CC tech-prs on v3 and v4.

I actually didn't CC them on purpose. The list seems to only accept incoming emails from registered users, so all previous attempts I got a bunch of delivery failure messages, so I thought it was pointless to CC them. I should get myself registered there, but I didn't have time so far to figure it out.

Carlos.

Quoted 2 lines

drew

#15 lore raw

v4 cover Add riscv tests to cover the base extension specs

Quoted 39 lines · On Mon, Mar 18, 2024 at 11:39?AM Carlos Maiolino <[email protected]> wrote:
Quoted 37 lines · Andrew Jones
Quoted 35 lines · Andrew Jones
Quoted 26 lines · cem at kernel.org

From: Carlos Maiolino <[email protected]>

Hi,

This is a new (V4) version of this series to create tests to cover functions of the riscv's SBI base implementation spec. The series also includes a a few helpers to reduce code duplication.

This new version includes updates related to Drew reviews, and rebasing of the patches according to the changes.
This new series has also been rebased on TOT, didn't affect the patches, but worth the heads up.

Patches tagged with V4 needed modifications from the previous version.

Detailed updates are specified on a patch-basis

Carlos Maiolino (6):
riscv: Add a wrapper to call sbi_ecall for base extension
riscv: Add test to probe SBI Extension
riscv: Factor out environment variable check and report generation
riscv: Implement test for architecture ID register
riscv: Enable gen_report() to print the wrong value in case of failure
riscv: Test for specific SBI implementation ID

Quoted 6 lines
 riscv/sbi.c | 81 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 69 insertions(+), 12 deletions(-)

--
2.44.0

Merged to https://gitlab.com/kvm-unit-tests/kvm-unit-tests

Quoted 9 lines
Quoted 3 lines

Hi Carlos,

I just realized you've forgotten to CC tech-prs on v3 and v4.

I actually didn't CC them on purpose. The list seems to only accept incoming emails from registered users, so all previous attempts I got a bunch of delivery failure messages, so I thought it was pointless to CC them. I should get myself registered there, but I didn't have time so far to figure it out.

Here are the details.
https://lists.riscv.org/g/tech-prs

IIRC, you also need to be an individual member or employee of a RVI member company to subscribe to PRS.

@Andrew Jones : I don't think it is possible for every contributor for kvm-unit-tests to be a member of RVI
and subscribe to PRS.

Maybe we should just send periodic updates ? I am not sure if there is a better way to do cross-posting.

Quoted 9 lines

Carlos.

Quoted 2 lines

drew

--
kvm-riscv mailing list
kvm-riscv at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kvm-riscv

Signature · 2 lines
Regards,
Atish
#16 lore raw

v4 cover Add riscv tests to cover the base extension specs

Quoted 52 lines · Atish Patra
Quoted 39 lines · On Mon, Mar 18, 2024 at 11:39?AM Carlos Maiolino <[email protected]> wrote:
Quoted 37 lines · Andrew Jones
Quoted 35 lines · Andrew Jones
Quoted 26 lines · cem at kernel.org

From: Carlos Maiolino <[email protected]>

Hi,

This is a new (V4) version of this series to create tests to cover functions of the riscv's SBI base implementation spec. The series also includes a a few helpers to reduce code duplication.

This new version includes updates related to Drew reviews, and rebasing of the patches according to the changes.
This new series has also been rebased on TOT, didn't affect the patches, but worth the heads up.

Patches tagged with V4 needed modifications from the previous version.

Detailed updates are specified on a patch-basis

Carlos Maiolino (6):
riscv: Add a wrapper to call sbi_ecall for base extension
riscv: Add test to probe SBI Extension
riscv: Factor out environment variable check and report generation
riscv: Implement test for architecture ID register
riscv: Enable gen_report() to print the wrong value in case of failure
riscv: Test for specific SBI implementation ID

Quoted 6 lines
 riscv/sbi.c | 81 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 69 insertions(+), 12 deletions(-)

--
2.44.0

Merged to https://gitlab.com/kvm-unit-tests/kvm-unit-tests

Quoted 9 lines
Quoted 3 lines

Hi Carlos,

I just realized you've forgotten to CC tech-prs on v3 and v4.

I actually didn't CC them on purpose. The list seems to only accept incoming emails from registered users, so all previous attempts I got a bunch of delivery failure messages, so I thought it was pointless to CC them. I should get myself registered there, but I didn't have time so far to figure it out.

Here are the details.
https://lists.riscv.org/g/tech-prs

Quoted 8 lines

IIRC, you also need to be an individual member or employee of a RVI member company to subscribe to PRS.

@Andrew Jones : I don't think it is possible for every contributor for kvm-unit-tests to be a member of RVI
and subscribe to PRS.

Maybe we should just send periodic updates ?

Periodic updates sounds good to me.

Thanks,
drew

Quoted 18 lines

I am not sure if there is
a better way to do cross-posting.

Quoted 9 lines

Carlos.

Quoted 2 lines

drew

--
kvm-riscv mailing list
kvm-riscv at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kvm-riscv

Signature · 2 lines
Regards,
Atish
#17 lore raw

v4 cover Add riscv tests to cover the base extension specs

In reply to Atish Patra
Quoted 44 lines · Atish Patra
Quoted 43 lines · On Mon, Mar 18, 2024 at 11:39?AM Carlos Maiolino <[email protected]> wrote:
Quoted 40 lines · Andrew Jones
Quoted 27 lines · Andrew Jones
Quoted 26 lines · cem at kernel.org

From: Carlos Maiolino <[email protected]>

Hi,

This is a new (V4) version of this series to create tests to cover functions of the riscv's SBI base implementation spec. The series also includes a a few helpers to reduce code duplication.

This new version includes updates related to Drew reviews, and rebasing of the patches according to the changes.
This new series has also been rebased on TOT, didn't affect the patches, but worth the heads up.

Patches tagged with V4 needed modifications from the previous version.

Detailed updates are specified on a patch-basis

Carlos Maiolino (6):
riscv: Add a wrapper to call sbi_ecall for base extension
riscv: Add test to probe SBI Extension
riscv: Factor out environment variable check and report generation
riscv: Implement test for architecture ID register
riscv: Enable gen_report() to print the wrong value in case of failure
riscv: Test for specific SBI implementation ID

Quoted 8 lines
Quoted 6 lines
 riscv/sbi.c | 81 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 69 insertions(+), 12 deletions(-)

--
2.44.0

Merged to https://gitlab.com/kvm-unit-tests/kvm-unit-tests

Hi Carlos,

I just realized you've forgotten to CC tech-prs on v3 and v4.

Quoted 7 lines
Quoted 5 lines

I actually didn't CC them on purpose. The list seems to only accept incoming emails from registered users, so all previous attempts I got a bunch of delivery failure messages, so I thought it was pointless to CC them. I should get myself registered there, but I didn't have time so far to figure it out.

Here are the details.
https://lists.riscv.org/g/tech-prs

Thanks for the link, I'll look into that.

Quoted 26 lines

IIRC, you also need to be an individual member or employee of a RVI member company to subscribe to PRS.

@Andrew Jones : I don't think it is possible for every contributor for kvm-unit-tests to be a member of RVI
and subscribe to PRS.

Maybe we should just send periodic updates ? I am not sure if there is a better way to do cross-posting.

Quoted 9 lines

Carlos.

Quoted 2 lines

drew

--
kvm-riscv mailing list
kvm-riscv at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kvm-riscv

--
Regards,
Atish