Add new argument to hf_mailbox_send.
We don't do anything with it yet, but adding it in a separate patch
reduces the mix of functionality and refactor in the next patch.
Change-Id: I24cbd4d35c4cf9e4985a72d336a68c496c9cc2be
diff --git a/test/hftest/inc/hftest_impl.h b/test/hftest/inc/hftest_impl.h
index 3d4a44a..fa9e4c7 100644
--- a/test/hftest/inc/hftest_impl.h
+++ b/test/hftest/inc/hftest_impl.h
@@ -255,7 +255,7 @@
\
/* Send the selected service to run and let it be handled. */ \
memcpy(send_buffer, service, strlen(service)); \
- ASSERT_EQ(hf_mailbox_send(vm_id, strlen(service)), 0); \
+ ASSERT_EQ(hf_mailbox_send(vm_id, strlen(service), false), 0); \
run_res = hf_vcpu_run(vm_id, 0); \
ASSERT_EQ(run_res.code, HF_VCPU_RUN_YIELD); \
} while (0)
diff --git a/test/vmapi/primary_with_secondaries/services/check_state.c b/test/vmapi/primary_with_secondaries/services/check_state.c
index 402e584..10063c5 100644
--- a/test/vmapi/primary_with_secondaries/services/check_state.c
+++ b/test/vmapi/primary_with_secondaries/services/check_state.c
@@ -27,7 +27,7 @@
int64_t res;
do {
- res = hf_mailbox_send(vm_id, size);
+ res = hf_mailbox_send(vm_id, size, false);
} while (res == -1);
}
diff --git a/test/vmapi/primary_with_secondaries/services/echo.c b/test/vmapi/primary_with_secondaries/services/echo.c
index 8ec08f6..3c38f3f 100644
--- a/test/vmapi/primary_with_secondaries/services/echo.c
+++ b/test/vmapi/primary_with_secondaries/services/echo.c
@@ -27,6 +27,6 @@
struct hf_mailbox_receive_return res = hf_mailbox_receive(true);
memcpy(SERVICE_SEND_BUFFER(), SERVICE_RECV_BUFFER(), res.size);
hf_mailbox_clear();
- hf_mailbox_send(res.vm_id, res.size);
+ hf_mailbox_send(res.vm_id, res.size, false);
}
}
diff --git a/test/vmapi/primary_with_secondaries/services/interruptible.c b/test/vmapi/primary_with_secondaries/services/interruptible.c
index 879567b..b43a583 100644
--- a/test/vmapi/primary_with_secondaries/services/interruptible.c
+++ b/test/vmapi/primary_with_secondaries/services/interruptible.c
@@ -39,7 +39,7 @@
buffer[8] = '0' + interrupt_id / 10;
buffer[9] = '0' + interrupt_id % 10;
memcpy(SERVICE_SEND_BUFFER(), buffer, size);
- hf_mailbox_send(HF_PRIMARY_VM_ID, size);
+ hf_mailbox_send(HF_PRIMARY_VM_ID, size, false);
}
/**
diff --git a/test/vmapi/primary_with_secondaries/services/relay.c b/test/vmapi/primary_with_secondaries/services/relay.c
index 41cd77d..d90e029 100644
--- a/test/vmapi/primary_with_secondaries/services/relay.c
+++ b/test/vmapi/primary_with_secondaries/services/relay.c
@@ -48,6 +48,6 @@
/* Send the message to the next stage. */
memcpy(SERVICE_SEND_BUFFER(), next_message, next_message_size);
hf_mailbox_clear();
- hf_mailbox_send(next_vm_id, next_message_size);
+ hf_mailbox_send(next_vm_id, next_message_size, false);
}
}
diff --git a/test/vmapi/primary_with_secondaries/with_services.c b/test/vmapi/primary_with_secondaries/with_services.c
index 2ffa40c..a282ee4 100644
--- a/test/vmapi/primary_with_secondaries/with_services.c
+++ b/test/vmapi/primary_with_secondaries/with_services.c
@@ -77,7 +77,7 @@
/* Set the message, echo it and check it didn't change. */
memcpy(mb.send, message, sizeof(message));
- EXPECT_EQ(hf_mailbox_send(SERVICE_VM0, sizeof(message)), 0);
+ EXPECT_EQ(hf_mailbox_send(SERVICE_VM0, sizeof(message), false), 0);
run_res = hf_vcpu_run(SERVICE_VM0, 0);
EXPECT_EQ(run_res.code, HF_VCPU_RUN_MESSAGE);
EXPECT_EQ(run_res.message.size, sizeof(message));
@@ -105,7 +105,8 @@
/* Set the message, echo it and check it didn't change. */
next_permutation(message, sizeof(message) - 1);
memcpy(mb.send, message, sizeof(message));
- EXPECT_EQ(hf_mailbox_send(SERVICE_VM0, sizeof(message)), 0);
+ EXPECT_EQ(hf_mailbox_send(SERVICE_VM0, sizeof(message), false),
+ 0);
run_res = hf_vcpu_run(SERVICE_VM0, 0);
EXPECT_EQ(run_res.code, HF_VCPU_RUN_MESSAGE);
EXPECT_EQ(run_res.message.size, sizeof(message));
@@ -143,7 +144,8 @@
memcpy(chain, message, sizeof(message));
EXPECT_EQ(hf_mailbox_send(
SERVICE_VM0,
- sizeof(message) + (2 * sizeof(uint32_t))),
+ sizeof(message) + (2 * sizeof(uint32_t)),
+ false),
0);
}
@@ -181,7 +183,7 @@
/* Set the message, echo it and wait for a response. */
memcpy(mb.send, message, sizeof(message));
- EXPECT_EQ(hf_mailbox_send(SERVICE_VM0, sizeof(message)), 0);
+ EXPECT_EQ(hf_mailbox_send(SERVICE_VM0, sizeof(message), false), 0);
run_res = hf_vcpu_run(SERVICE_VM0, 0);
EXPECT_EQ(run_res.code, HF_VCPU_RUN_MESSAGE);
EXPECT_EQ(run_res.message.size, sizeof(expected_response));
@@ -293,7 +295,7 @@
/* Now send a message to the secondary. */
memcpy(mb.send, message, sizeof(message));
- EXPECT_EQ(hf_mailbox_send(SERVICE_VM0, sizeof(message)), 0);
+ EXPECT_EQ(hf_mailbox_send(SERVICE_VM0, sizeof(message), false), 0);
run_res = hf_vcpu_run(SERVICE_VM0, 0);
EXPECT_EQ(run_res.code, HF_VCPU_RUN_MESSAGE);
EXPECT_EQ(run_res.message.size, sizeof(expected_response_2));
@@ -328,7 +330,7 @@
* expect the response from the interrupt we sent before.
*/
memcpy(mb.send, message, sizeof(message));
- EXPECT_EQ(hf_mailbox_send(SERVICE_VM0, sizeof(message)), 0);
+ EXPECT_EQ(hf_mailbox_send(SERVICE_VM0, sizeof(message), false), 0);
run_res = hf_vcpu_run(SERVICE_VM0, 0);
EXPECT_EQ(run_res.code, HF_VCPU_RUN_MESSAGE);
EXPECT_EQ(run_res.message.size, sizeof(expected_response));