diff --git a/drivers/virt/haven/hh_msgq.c b/drivers/virt/haven/hh_msgq.c index 34a899d80805..2cd7689529bc 100644 --- a/drivers/virt/haven/hh_msgq.c +++ b/drivers/virt/haven/hh_msgq.c @@ -89,6 +89,7 @@ static int __hh_msgq_recv(struct hh_msgq_cap_table *cap_table_entry, switch (hh_ret) { case HH_ERROR_OK: *recv_size = resp.recv_size; + cap_table_entry->rx_empty = !resp.not_empty; ret = 0; break; case HH_ERROR_MSGQUEUE_EMPTY: @@ -213,6 +214,10 @@ static int __hh_msgq_send(struct hh_msgq_cap_table *cap_table_entry, size, buff, tx_flags, &resp); switch (hh_ret) { + case HH_ERROR_OK: + cap_table_entry->tx_full = !resp.not_full; + ret = 0; + break; case HH_ERROR_MSGQUEUE_FULL: cap_table_entry->tx_full = true; ret = -EAGAIN; diff --git a/include/linux/haven/hh_errno.h b/include/linux/haven/hh_errno.h index 3ac33b991d13..988507458e98 100644 --- a/include/linux/haven/hh_errno.h +++ b/include/linux/haven/hh_errno.h @@ -35,9 +35,8 @@ #define HH_ERROR_CSPACE_INSUF_RIGHTS 53 #define HH_ERROR_CSPACE_FULL 54 -/* TODO: Get the correct values for the MSGQ error codes */ -#define HH_ERROR_MSGQUEUE_FULL 60 -#define HH_ERROR_MSGQUEUE_EMPTY 61 +#define HH_ERROR_MSGQUEUE_EMPTY 60 +#define HH_ERROR_MSGQUEUE_FULL 61 static inline int hh_remap_error(int hh_error) {