[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251110232642.633672-8-yosry.ahmed@linux.dev>
Date: Mon, 10 Nov 2025 23:26:35 +0000
From: Yosry Ahmed <yosry.ahmed@...ux.dev>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Kevin Cheng <chengkev@...gle.com>,
kvm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Yosry Ahmed <yosry.ahmed@...ux.dev>
Subject: [PATCH v3 07/14] x86/svm: Move report_svm_guest() to the top of svm_tests.c
Move the macro ahead of other tests that will start using it.
Signed-off-by: Yosry Ahmed <yosry.ahmed@...ux.dev>
---
x86/svm_tests.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/x86/svm_tests.c b/x86/svm_tests.c
index feeb27d61435b..61ab63db462dc 100644
--- a/x86/svm_tests.c
+++ b/x86/svm_tests.c
@@ -37,6 +37,21 @@ u64 latclgi_max;
u64 latclgi_min;
u64 runs;
+/*
+ * Report failures from SVM guest code, and on failure, set the stage to -1 and
+ * do VMMCALL to terminate the test (host side must treat -1 as "finished").
+ * TODO: fix the tests that don't play nice with a straight report, e.g. the
+ * V_TPR test fails if report() is invoked.
+ */
+#define report_svm_guest(cond, test, fmt, args...) \
+do { \
+ if (!(cond)) { \
+ report_fail(fmt, ##args); \
+ set_test_stage(test, -1); \
+ vmmcall(); \
+ } \
+} while (0)
+
static void null_test(struct svm_test *test)
{
}
@@ -1074,21 +1089,6 @@ static bool lat_svm_insn_check(struct svm_test *test)
return true;
}
-/*
- * Report failures from SVM guest code, and on failure, set the stage to -1 and
- * do VMMCALL to terminate the test (host side must treat -1 as "finished").
- * TODO: fix the tests that don't play nice with a straight report, e.g. the
- * V_TPR test fails if report() is invoked.
- */
-#define report_svm_guest(cond, test, fmt, args...) \
-do { \
- if (!(cond)) { \
- report_fail(fmt, ##args); \
- set_test_stage(test, -1); \
- vmmcall(); \
- } \
-} while (0)
-
bool pending_event_ipi_fired;
bool pending_event_guest_run;
--
2.51.2.1041.gc1ab5b90ca-goog
Powered by blists - more mailing lists