aboutsummaryrefslogtreecommitdiff
path: root/wmediumd
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2022-10-11 00:42:03 +0000
committerSteven Moreland <smoreland@google.com>2022-10-11 16:48:28 +0000
commit6eafa610ae47da6c7b3dfb409755130d35c821ca (patch)
tree437c82b78ae9eb5ce2c63c8962701ec3d0bada7e /wmediumd
parent395d2a8f36ccb9fdbea8f6d04e7844e937c87dbf (diff)
downloadwmediumd-6eafa610ae47da6c7b3dfb409755130d35c821ca.tar.gz
vhost - implement GET_SHARED_MEMORY_REGIONS
We don't have any, crosvm is calling into this after the latest update. Bug: 250998415 Test: boot up crosvm/cf Change-Id: Ic6307da46f9f65dc0cef3fef1617752149b52af3
Diffstat (limited to 'wmediumd')
-rw-r--r--wmediumd/inc/usfstl/vhostproto.h1
-rw-r--r--wmediumd/lib/vhost.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/wmediumd/inc/usfstl/vhostproto.h b/wmediumd/inc/usfstl/vhostproto.h
index 3c5c2db..4550179 100644
--- a/wmediumd/inc/usfstl/vhostproto.h
+++ b/wmediumd/inc/usfstl/vhostproto.h
@@ -81,6 +81,7 @@ struct vhost_user_msg {
#define VHOST_USER_SET_SLAVE_REQ_FD 21
#define VHOST_USER_GET_CONFIG 24
#define VHOST_USER_VRING_KICK 35
+#define VHOST_USER_GET_SHARED_MEMORY_REGIONS 41
#define VHOST_USER_SLAVE_CONFIG_CHANGE_MSG 2
#define VHOST_USER_SLAVE_VRING_CALL 4
diff --git a/wmediumd/lib/vhost.c b/wmediumd/lib/vhost.c
index d6ad1b1..b6a7a70 100644
--- a/wmediumd/lib/vhost.c
+++ b/wmediumd/lib/vhost.c
@@ -668,6 +668,11 @@ static void usfstl_vhost_user_handle_msg(struct usfstl_loop_entry *entry)
USFSTL_ASSERT(msg.payload.vring_state.num == 0);
usfstl_vhost_user_virtq_kick(dev, msg.payload.vring_state.idx);
break;
+ case VHOST_USER_GET_SHARED_MEMORY_REGIONS:
+ USFSTL_ASSERT_EQ(len, (ssize_t)0, "%zd");
+ reply_len = sizeof(uint64_t);
+ msg.payload.u64 = 0;
+ break;
default:
USFSTL_ASSERT(0, "Unsupported message: %d\n", msg.hdr.request);
}