@@ -37,6 +37,21 @@ u64 latclgi_max;
3737u64 latclgi_min ;
3838u64 runs ;
3939
40+ /*
41+ * Report failures from SVM guest code, and on failure, set the stage to -1 and
42+ * do VMMCALL to terminate the test (host side must treat -1 as "finished").
43+ * TODO: fix the tests that don't play nice with a straight report, e.g. the
44+ * V_TPR test fails if report() is invoked.
45+ */
46+ #define report_svm_guest (cond , test , fmt , args ...) \
47+ do { \
48+ if (!(cond)) { \
49+ report_fail(fmt, ##args); \
50+ set_test_stage(test, -1); \
51+ vmmcall(); \
52+ } \
53+ } while (0)
54+
4055static void null_test (struct svm_test * test )
4156{
4257}
@@ -1074,21 +1089,6 @@ static bool lat_svm_insn_check(struct svm_test *test)
10741089 return true;
10751090}
10761091
1077- /*
1078- * Report failures from SVM guest code, and on failure, set the stage to -1 and
1079- * do VMMCALL to terminate the test (host side must treat -1 as "finished").
1080- * TODO: fix the tests that don't play nice with a straight report, e.g. the
1081- * V_TPR test fails if report() is invoked.
1082- */
1083- #define report_svm_guest (cond , test , fmt , args ...) \
1084- do { \
1085- if (!(cond)) { \
1086- report_fail(fmt, ##args); \
1087- set_test_stage(test, -1); \
1088- vmmcall(); \
1089- } \
1090- } while (0)
1091-
10921092bool pending_event_ipi_fired ;
10931093bool pending_event_guest_run ;
10941094
0 commit comments