Revert "Call spci_run directly in tests rather than hf_vcpu_run."
This reverts commit d1e52b4e430dadd6e1cca2feac6d855e04c35599.
Reason for revert: Flaky timer_secondary tests
Change-Id: Ie69772c7fd196ea198c28b85b0fe8079b5cd8971
diff --git a/test/hftest/inc/hftest_impl.h b/test/hftest/inc/hftest_impl.h
index ed2fa91..f3c9ffa 100644
--- a/test/hftest/inc/hftest_impl.h
+++ b/test/hftest/inc/hftest_impl.h
@@ -280,7 +280,7 @@
*/
#define HFTEST_SERVICE_SELECT(vm_id, service, send_buffer) \
do { \
- struct spci_value run_res; \
+ struct hf_vcpu_run_return run_res; \
uint32_t msg_length = \
strnlen_s(service, SERVICE_NAME_MAX_LENGTH); \
\
@@ -288,9 +288,9 @@
* Let the service configure its mailbox and wait for a \
* message. \
*/ \
- run_res = spci_run(vm_id, 0); \
- ASSERT_EQ(run_res.func, SPCI_MSG_WAIT_32); \
- ASSERT_EQ(run_res.arg2, SPCI_SLEEP_INDEFINITE); \
+ run_res = hf_vcpu_run(vm_id, 0); \
+ ASSERT_EQ(run_res.code, HF_VCPU_RUN_WAIT_FOR_MESSAGE); \
+ ASSERT_EQ(run_res.sleep.ns, HF_SLEEP_INDEFINITE); \
\
/* Send the selected service to run and let it be handled. */ \
memcpy_s(send_buffer, SPCI_MSG_PAYLOAD_MAX, service, \
@@ -299,8 +299,8 @@
ASSERT_EQ(spci_msg_send(hf_vm_get_id(), vm_id, msg_length, 0) \
.func, \
SPCI_SUCCESS_32); \
- run_res = spci_run(vm_id, 0); \
- ASSERT_EQ(run_res.func, SPCI_YIELD_32); \
+ run_res = hf_vcpu_run(vm_id, 0); \
+ ASSERT_EQ(run_res.code, HF_VCPU_RUN_YIELD); \
} while (0)
#define HFTEST_SERVICE_SEND_BUFFER() hftest_get_context()->send