static struct spci_value spci_msg_recv_return(const struct vm *receiver)
{
return (struct spci_value){
.func = SPCI_MSG_SEND_32,
.arg1 = (receiver->mailbox.recv_sender << 16) | receiver->id,
.arg3 = receiver->mailbox.recv_size,
.arg4 = receiver->mailbox.recv_attributes};
}
Could you confirm if this is correct?
I am looking at the following version:2019/Nov/13 Beta 0 • Replaced some occurrences of ARM with ArmIn Section 9.8 SPCI_MSG_POLL in this version,
Poll if a message is available in the caller’s RX buffer. Execution is returned to the caller if no message is available
– Must not be invoked when the caller is processing a direct request
• Valid SPCI instances and conduits are listed in Table 81
• Syntax of this function is described in Table 78
• Returns SPCI_SUCCESS without any further parameters upon successful completion
• Encoding of error code in the SPCI_ERROR function is described in Table 79
• This is an optional interface
Ok - I was wrong about SPCI_MSG_WAIT. Yes, the function code in the return value should indicate how triggered the VM to be unblocked. So, when the VM gets unblocked because it received a message, the correct function code should be SPIC_MSG_SEND.For SPCI_MSG_POLL, it makes sense to return SPIC_SUCCESS. However, if we want it to be consistent with SPCI_MSG_WAIT, SPIC_MSG_SEND makes sense, too.
--
You received this message because you are subscribed to the Google Groups "Hafnium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hafnium-discu...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/hafnium-discuss/CA%2B_y_2F_souujn1FEcjR7Lv8EaoPUhcz74y%3D_yVbUJScTLt4nQ%40mail.gmail.com.
Ah - so each function code is associated with a certain message format?