Lines Matching full:msg
275 static int vhost_user_read_header(struct vhost_dev *dev, VhostUserMsg *msg) in vhost_user_read_header() argument
279 uint8_t *p = (uint8_t *) msg; in vhost_user_read_header()
285 error_report("Failed to read msg header. Read %d instead of %d." in vhost_user_read_header()
286 " Original request %d.", r, size, msg->hdr.request); in vhost_user_read_header()
291 if (msg->hdr.flags != (VHOST_USER_REPLY_MASK | VHOST_USER_VERSION)) { in vhost_user_read_header()
292 error_report("Failed to read msg header." in vhost_user_read_header()
293 " Flags 0x%x instead of 0x%x.", msg->hdr.flags, in vhost_user_read_header()
298 trace_vhost_user_read(msg->hdr.request, msg->hdr.flags); in vhost_user_read_header()
303 static int vhost_user_read(struct vhost_dev *dev, VhostUserMsg *msg) in vhost_user_read() argument
307 uint8_t *p = (uint8_t *) msg; in vhost_user_read()
310 r = vhost_user_read_header(dev, msg); in vhost_user_read()
316 if (msg->hdr.size > VHOST_USER_PAYLOAD_SIZE) { in vhost_user_read()
317 error_report("Failed to read msg header." in vhost_user_read()
318 " Size %d exceeds the maximum %zu.", msg->hdr.size, in vhost_user_read()
323 if (msg->hdr.size) { in vhost_user_read()
325 size = msg->hdr.size; in vhost_user_read()
329 error_report("Failed to read msg payload." in vhost_user_read()
330 " Read %d instead of %d.", r, msg->hdr.size); in vhost_user_read()
339 const VhostUserMsg *msg) in process_message_reply() argument
344 if ((msg->hdr.flags & VHOST_USER_NEED_REPLY_MASK) == 0) { in process_message_reply()
353 if (msg_reply.hdr.request != msg->hdr.request) { in process_message_reply()
354 error_report("Received unexpected msg type. " in process_message_reply()
356 msg->hdr.request, msg_reply.hdr.request); in process_message_reply()
382 static int vhost_user_write(struct vhost_dev *dev, VhostUserMsg *msg, in vhost_user_write() argument
387 int ret, size = VHOST_USER_HDR_SIZE + msg->hdr.size; in vhost_user_write()
399 if (vhost_user_per_device_request(msg->hdr.request) in vhost_user_write()
401 msg->hdr.flags &= ~VHOST_USER_NEED_REPLY_MASK; in vhost_user_write()
406 error_report("Failed to set msg fds."); in vhost_user_write()
410 ret = qemu_chr_fe_write_all(chr, (const uint8_t *) msg, size); in vhost_user_write()
413 error_report("Failed to write msg." in vhost_user_write()
418 trace_vhost_user_write(msg->hdr.request, msg->hdr.flags); in vhost_user_write()
425 VhostUserMsg msg = { in vhost_user_gpu_set_socket() local
430 return vhost_user_write(dev, &msg, &fd, 1); in vhost_user_gpu_set_socket()
441 VhostUserMsg msg = { in vhost_user_set_log_base() local
446 .hdr.size = sizeof(msg.payload.log), in vhost_user_set_log_base()
458 ret = vhost_user_write(dev, &msg, fds, fd_num); in vhost_user_set_log_base()
464 msg.hdr.size = 0; in vhost_user_set_log_base()
465 ret = vhost_user_read(dev, &msg); in vhost_user_set_log_base()
470 if (msg.hdr.request != VHOST_USER_SET_LOG_BASE) { in vhost_user_set_log_base()
471 error_report("Received unexpected msg type. " in vhost_user_set_log_base()
473 VHOST_USER_SET_LOG_BASE, msg.hdr.request); in vhost_user_set_log_base()
507 VhostUserMsg *msg, in vhost_user_fill_set_mem_table_msg() argument
517 msg->hdr.request = VHOST_USER_SET_MEM_TABLE; in vhost_user_fill_set_mem_table_msg()
534 error_report("Failed preparing vhost-user memory table msg"); in vhost_user_fill_set_mem_table_msg()
538 msg->payload.memory.regions[*fd_num] = region_buffer; in vhost_user_fill_set_mem_table_msg()
546 msg->payload.memory.nregions = *fd_num; in vhost_user_fill_set_mem_table_msg()
554 msg->hdr.size = sizeof(msg->payload.memory.nregions); in vhost_user_fill_set_mem_table_msg()
555 msg->hdr.size += sizeof(msg->payload.memory.padding); in vhost_user_fill_set_mem_table_msg()
556 msg->hdr.size += *fd_num * sizeof(VhostUserMemoryRegion); in vhost_user_fill_set_mem_table_msg()
661 int nr_rem_reg, VhostUserMsg *msg, in send_remove_regions() argument
682 msg->hdr.request = VHOST_USER_REM_MEM_REG; in send_remove_regions()
684 msg->payload.mem_reg.region = region_buffer; in send_remove_regions()
686 ret = vhost_user_write(dev, msg, NULL, 0); in send_remove_regions()
692 ret = process_message_reply(dev, msg); in send_remove_regions()
715 VhostUserMsg *msg, uint64_t *shadow_pcb, in send_add_regions() argument
743 msg->hdr.request = VHOST_USER_ADD_MEM_REG; in send_add_regions()
745 msg->payload.mem_reg.region = region_buffer; in send_add_regions()
747 ret = vhost_user_write(dev, msg, &fd, 1); in send_add_regions()
763 error_report("%s: Received unexpected msg type." in send_add_regions()
774 if (msg_reply.hdr.size != msg->hdr.size) { in send_add_regions()
777 msg->hdr.size); in send_add_regions()
787 msg->payload.mem_reg.region.userspace_addr, in send_add_regions()
797 ret = process_message_reply(dev, msg); in send_add_regions()
826 VhostUserMsg *msg, in vhost_user_add_remove_regions() argument
837 msg->hdr.size = sizeof(msg->payload.mem_reg); in vhost_user_add_remove_regions()
844 ret = send_remove_regions(dev, rem_reg, nr_rem_reg, msg, in vhost_user_add_remove_regions()
852 ret = send_add_regions(dev, add_reg, nr_add_reg, msg, shadow_pcb, in vhost_user_add_remove_regions()
868 msg->hdr.size = sizeof(msg->payload.u64); in vhost_user_add_remove_regions()
869 msg->payload.u64 = 0; /* OK */ in vhost_user_add_remove_regions()
871 ret = vhost_user_write(dev, msg, NULL, 0); in vhost_user_add_remove_regions()
900 VhostUserMsg msg = { in vhost_user_set_mem_table_postcopy() local
916 ret = vhost_user_add_remove_regions(dev, &msg, reply_supported, true); in vhost_user_set_mem_table_postcopy()
921 ret = vhost_user_fill_set_mem_table_msg(u, dev, &msg, fds, &fd_num, in vhost_user_set_mem_table_postcopy()
927 ret = vhost_user_write(dev, &msg, fds, fd_num); in vhost_user_set_mem_table_postcopy()
938 error_report("%s: Received unexpected msg type." in vhost_user_set_mem_table_postcopy()
948 if (msg_reply.hdr.size != msg.hdr.size) { in vhost_user_set_mem_table_postcopy()
951 msg.hdr.size); in vhost_user_set_mem_table_postcopy()
973 msg.payload.memory.regions[msg_i].userspace_addr, in vhost_user_set_mem_table_postcopy()
991 msg.hdr.size = sizeof(msg.payload.u64); in vhost_user_set_mem_table_postcopy()
992 msg.payload.u64 = 0; /* OK */ in vhost_user_set_mem_table_postcopy()
993 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_set_mem_table_postcopy()
1025 VhostUserMsg msg = { in vhost_user_set_mem_table() local
1030 msg.hdr.flags |= VHOST_USER_NEED_REPLY_MASK; in vhost_user_set_mem_table()
1034 ret = vhost_user_add_remove_regions(dev, &msg, reply_supported, false); in vhost_user_set_mem_table()
1039 ret = vhost_user_fill_set_mem_table_msg(u, dev, &msg, fds, &fd_num, in vhost_user_set_mem_table()
1045 ret = vhost_user_write(dev, &msg, fds, fd_num); in vhost_user_set_mem_table()
1051 return process_message_reply(dev, &msg); in vhost_user_set_mem_table()
1063 VhostUserMsg msg = { in vhost_user_set_vring_endian() local
1067 .hdr.size = sizeof(msg.payload.state), in vhost_user_set_vring_endian()
1075 return vhost_user_write(dev, &msg, NULL, 0); in vhost_user_set_vring_endian()
1081 VhostUserMsg msg = { in vhost_user_get_u64() local
1090 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_get_u64()
1095 ret = vhost_user_read(dev, &msg); in vhost_user_get_u64()
1100 if (msg.hdr.request != request) { in vhost_user_get_u64()
1101 error_report("Received unexpected msg type. Expected %d received %d", in vhost_user_get_u64()
1102 request, msg.hdr.request); in vhost_user_get_u64()
1106 if (msg.hdr.size != sizeof(msg.payload.u64)) { in vhost_user_get_u64()
1107 error_report("Received bad msg size."); in vhost_user_get_u64()
1111 *u64 = msg.payload.u64; in vhost_user_get_u64()
1125 /* Note: "msg->hdr.flags" may be modified. */
1126 static int vhost_user_write_sync(struct vhost_dev *dev, VhostUserMsg *msg, in vhost_user_write_sync() argument
1135 msg->hdr.flags |= VHOST_USER_NEED_REPLY_MASK; in vhost_user_write_sync()
1139 ret = vhost_user_write(dev, msg, NULL, 0); in vhost_user_write_sync()
1147 if (msg->hdr.flags & VHOST_USER_NEED_REPLY_MASK) { in vhost_user_write_sync()
1148 return process_message_reply(dev, msg); in vhost_user_write_sync()
1168 VhostUserMsg msg = { in vhost_set_vring() local
1172 .hdr.size = sizeof(msg.payload.state), in vhost_set_vring()
1175 return vhost_user_write_sync(dev, &msg, wait_for_reply); in vhost_set_vring()
1289 VhostUserMsg msg = { in vhost_user_get_vring_base() local
1293 .hdr.size = sizeof(msg.payload.state), in vhost_user_get_vring_base()
1300 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_get_vring_base()
1305 ret = vhost_user_read(dev, &msg); in vhost_user_get_vring_base()
1310 if (msg.hdr.request != VHOST_USER_GET_VRING_BASE) { in vhost_user_get_vring_base()
1311 error_report("Received unexpected msg type. Expected %d received %d", in vhost_user_get_vring_base()
1312 VHOST_USER_GET_VRING_BASE, msg.hdr.request); in vhost_user_get_vring_base()
1316 if (msg.hdr.size != sizeof(msg.payload.state)) { in vhost_user_get_vring_base()
1317 error_report("Received bad msg size."); in vhost_user_get_vring_base()
1321 *ring = msg.payload.state; in vhost_user_get_vring_base()
1332 VhostUserMsg msg = { in vhost_set_vring_file() local
1336 .hdr.size = sizeof(msg.payload.u64), in vhost_set_vring_file()
1342 msg.payload.u64 |= VHOST_USER_VRING_NOFD_MASK; in vhost_set_vring_file()
1345 return vhost_user_write(dev, &msg, fds, fd_num); in vhost_set_vring_file()
1369 VhostUserMsg msg = { in vhost_user_set_vring_addr() local
1373 .hdr.size = sizeof(msg.payload.addr), in vhost_user_set_vring_addr()
1382 return vhost_user_write_sync(dev, &msg, wait_for_reply); in vhost_user_set_vring_addr()
1388 VhostUserMsg msg = { in vhost_user_set_u64() local
1392 .hdr.size = sizeof(msg.payload.u64), in vhost_user_set_u64()
1395 return vhost_user_write_sync(dev, &msg, wait_for_reply); in vhost_user_set_u64()
1474 VhostUserMsg msg = { in vhost_user_set_owner() local
1479 return vhost_user_write(dev, &msg, NULL, 0); in vhost_user_set_owner()
1501 VhostUserMsg msg = { in vhost_user_reset_device() local
1515 return vhost_user_write(dev, &msg, NULL, 0); in vhost_user_reset_device()
1685 VhostUserMsg msg = { in vhost_user_get_shared_object() local
1689 memcpy(msg.payload.object.uuid, uuid, sizeof(msg.payload.object.uuid)); in vhost_user_get_shared_object()
1691 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_get_shared_object()
1696 ret = vhost_user_read(dev, &msg); in vhost_user_get_shared_object()
1701 if (msg.hdr.request != VHOST_USER_GET_SHARED_OBJECT) { in vhost_user_get_shared_object()
1702 error_report("Received unexpected msg type. " in vhost_user_get_shared_object()
1704 VHOST_USER_GET_SHARED_OBJECT, msg.hdr.request); in vhost_user_get_shared_object()
1759 error_report("Failed to set msg fds."); in vhost_user_backend_handle_shared_object_lookup()
1805 error_report("Failed to read msg header." in backend_read()
1840 error_report("Received unexpected msg type: %d.", hdr.request); in backend_read()
1875 VhostUserMsg msg = { in vhost_setup_backend_channel() local
1908 msg.hdr.flags |= VHOST_USER_NEED_REPLY_MASK; in vhost_setup_backend_channel()
1911 ret = vhost_user_write(dev, &msg, &sv[1], 1); in vhost_setup_backend_channel()
1917 ret = process_message_reply(dev, &msg); in vhost_setup_backend_channel()
1940 struct uffd_msg *msg = ufd; in vhost_user_postcopy_fault_handler() local
1941 uint64_t faultaddr = msg->arg.pagefault.address; in vhost_user_postcopy_fault_handler()
2010 VhostUserMsg msg = { in vhost_user_postcopy_advise() local
2015 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_postcopy_advise()
2021 ret = vhost_user_read(dev, &msg); in vhost_user_postcopy_advise()
2027 if (msg.hdr.request != VHOST_USER_POSTCOPY_ADVISE) { in vhost_user_postcopy_advise()
2028 error_setg(errp, "Unexpected msg type. Expected %d received %d", in vhost_user_postcopy_advise()
2029 VHOST_USER_POSTCOPY_ADVISE, msg.hdr.request); in vhost_user_postcopy_advise()
2033 if (msg.hdr.size) { in vhost_user_postcopy_advise()
2034 error_setg(errp, "Received bad msg size."); in vhost_user_postcopy_advise()
2065 VhostUserMsg msg = { in vhost_user_postcopy_listen() local
2073 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_postcopy_listen()
2079 ret = process_message_reply(dev, &msg); in vhost_user_postcopy_listen()
2093 VhostUserMsg msg = { in vhost_user_postcopy_end() local
2102 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_postcopy_end()
2108 ret = process_message_reply(dev, &msg); in vhost_user_postcopy_end()
2353 VhostUserMsg msg = { }; in vhost_user_migration_done() local
2365 msg.hdr.request = VHOST_USER_SEND_RARP; in vhost_user_migration_done()
2366 msg.hdr.flags = VHOST_USER_VERSION; in vhost_user_migration_done()
2367 memcpy((char *)&msg.payload.u64, mac_addr, 6); in vhost_user_migration_done()
2368 msg.hdr.size = sizeof(msg.payload.u64); in vhost_user_migration_done()
2370 return vhost_user_write(dev, &msg, NULL, 0); in vhost_user_migration_done()
2377 VhostUserMsg msg; in vhost_user_net_set_mtu() local
2386 msg.hdr.request = VHOST_USER_NET_SET_MTU; in vhost_user_net_set_mtu()
2387 msg.payload.u64 = mtu; in vhost_user_net_set_mtu()
2388 msg.hdr.size = sizeof(msg.payload.u64); in vhost_user_net_set_mtu()
2389 msg.hdr.flags = VHOST_USER_VERSION; in vhost_user_net_set_mtu()
2391 msg.hdr.flags |= VHOST_USER_NEED_REPLY_MASK; in vhost_user_net_set_mtu()
2394 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_net_set_mtu()
2401 return process_message_reply(dev, &msg); in vhost_user_net_set_mtu()
2411 VhostUserMsg msg = { in vhost_user_send_device_iotlb_msg() local
2413 .hdr.size = sizeof(msg.payload.iotlb), in vhost_user_send_device_iotlb_msg()
2418 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_send_device_iotlb_msg()
2423 return process_message_reply(dev, &msg); in vhost_user_send_device_iotlb_msg()
2436 VhostUserMsg msg = { in vhost_user_get_config() local
2450 msg.payload.config.offset = 0; in vhost_user_get_config()
2451 msg.payload.config.size = config_len; in vhost_user_get_config()
2452 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_get_config()
2458 ret = vhost_user_read(dev, &msg); in vhost_user_get_config()
2464 if (msg.hdr.request != VHOST_USER_GET_CONFIG) { in vhost_user_get_config()
2466 "Received unexpected msg type. Expected %d received %d", in vhost_user_get_config()
2467 VHOST_USER_GET_CONFIG, msg.hdr.request); in vhost_user_get_config()
2471 if (msg.hdr.size != VHOST_USER_CONFIG_HDR_SIZE + config_len) { in vhost_user_get_config()
2472 error_setg(errp, "Received bad msg size."); in vhost_user_get_config()
2476 memcpy(config, msg.payload.config.region, config_len); in vhost_user_get_config()
2489 VhostUserMsg msg = { in vhost_user_set_config() local
2501 msg.hdr.flags |= VHOST_USER_NEED_REPLY_MASK; in vhost_user_set_config()
2508 msg.payload.config.offset = offset, in vhost_user_set_config()
2509 msg.payload.config.size = size, in vhost_user_set_config()
2510 msg.payload.config.flags = flags, in vhost_user_set_config()
2511 p = msg.payload.config.region; in vhost_user_set_config()
2514 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_set_config()
2520 return process_message_reply(dev, &msg); in vhost_user_set_config()
2534 VhostUserMsg msg = { in vhost_user_crypto_create_session() local
2537 .hdr.size = sizeof(msg.payload.session), in vhost_user_crypto_create_session()
2551 memcpy(&msg.payload.session.u.asym.session_setup_data, sess, in vhost_user_crypto_create_session()
2554 keylen = sizeof(msg.payload.session.u.asym.key); in vhost_user_crypto_create_session()
2560 memcpy(&msg.payload.session.u.asym.key, sess->key, in vhost_user_crypto_create_session()
2567 memcpy(&msg.payload.session.u.sym.session_setup_data, sess, in vhost_user_crypto_create_session()
2570 keylen = sizeof(msg.payload.session.u.sym.key); in vhost_user_crypto_create_session()
2576 memcpy(&msg.payload.session.u.sym.key, sess->cipher_key, in vhost_user_crypto_create_session()
2581 keylen = sizeof(msg.payload.session.u.sym.auth_key); in vhost_user_crypto_create_session()
2587 memcpy(&msg.payload.session.u.sym.auth_key, sess->auth_key, in vhost_user_crypto_create_session()
2592 msg.payload.session.op_code = backend_info->op_code; in vhost_user_crypto_create_session()
2593 msg.payload.session.session_id = backend_info->session_id; in vhost_user_crypto_create_session()
2594 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_crypto_create_session()
2601 ret = vhost_user_read(dev, &msg); in vhost_user_crypto_create_session()
2608 if (msg.hdr.request != VHOST_USER_CREATE_CRYPTO_SESSION) { in vhost_user_crypto_create_session()
2609 error_report("Received unexpected msg type. Expected %d received %d", in vhost_user_crypto_create_session()
2610 VHOST_USER_CREATE_CRYPTO_SESSION, msg.hdr.request); in vhost_user_crypto_create_session()
2614 if (msg.hdr.size != sizeof(msg.payload.session)) { in vhost_user_crypto_create_session()
2615 error_report("Received bad msg size."); in vhost_user_crypto_create_session()
2619 if (msg.payload.session.session_id < 0) { in vhost_user_crypto_create_session()
2621 msg.payload.session.session_id); in vhost_user_crypto_create_session()
2624 *session_id = msg.payload.session.session_id; in vhost_user_crypto_create_session()
2635 VhostUserMsg msg = { in vhost_user_crypto_close_session() local
2638 .hdr.size = sizeof(msg.payload.u64), in vhost_user_crypto_close_session()
2640 msg.payload.u64 = session_id; in vhost_user_crypto_close_session()
2647 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_crypto_close_session()
2671 VhostUserMsg msg = { in vhost_user_get_inflight_fd() local
2676 .hdr.size = sizeof(msg.payload.inflight), in vhost_user_get_inflight_fd()
2684 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_get_inflight_fd()
2689 ret = vhost_user_read(dev, &msg); in vhost_user_get_inflight_fd()
2694 if (msg.hdr.request != VHOST_USER_GET_INFLIGHT_FD) { in vhost_user_get_inflight_fd()
2695 error_report("Received unexpected msg type. " in vhost_user_get_inflight_fd()
2697 VHOST_USER_GET_INFLIGHT_FD, msg.hdr.request); in vhost_user_get_inflight_fd()
2701 if (msg.hdr.size != sizeof(msg.payload.inflight)) { in vhost_user_get_inflight_fd()
2702 error_report("Received bad msg size."); in vhost_user_get_inflight_fd()
2706 if (!msg.payload.inflight.mmap_size) { in vhost_user_get_inflight_fd()
2716 addr = mmap(0, msg.payload.inflight.mmap_size, PROT_READ | PROT_WRITE, in vhost_user_get_inflight_fd()
2717 MAP_SHARED, fd, msg.payload.inflight.mmap_offset); in vhost_user_get_inflight_fd()
2727 inflight->size = msg.payload.inflight.mmap_size; in vhost_user_get_inflight_fd()
2728 inflight->offset = msg.payload.inflight.mmap_offset; in vhost_user_get_inflight_fd()
2737 VhostUserMsg msg = { in vhost_user_set_inflight_fd() local
2744 .hdr.size = sizeof(msg.payload.inflight), in vhost_user_set_inflight_fd()
2752 return vhost_user_write(dev, &msg, &inflight->fd, 1); in vhost_user_set_inflight_fd()
2894 VhostUserMsg msg = { in vhost_user_set_device_state_fd() local
2898 .size = sizeof(msg.payload.transfer_state), in vhost_user_set_device_state_fd()
2914 ret = vhost_user_write(dev, &msg, &fd, 1); in vhost_user_set_device_state_fd()
2922 ret = vhost_user_read(dev, &msg); in vhost_user_set_device_state_fd()
2929 if (msg.hdr.request != VHOST_USER_SET_DEVICE_STATE_FD) { in vhost_user_set_device_state_fd()
2932 VHOST_USER_SET_DEVICE_STATE_FD, msg.hdr.request); in vhost_user_set_device_state_fd()
2936 if (msg.hdr.size != sizeof(msg.payload.u64)) { in vhost_user_set_device_state_fd()
2939 sizeof(msg.payload.u64), msg.hdr.size); in vhost_user_set_device_state_fd()
2943 if ((msg.payload.u64 & 0xff) != 0) { in vhost_user_set_device_state_fd()
2948 if (!(msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK)) { in vhost_user_set_device_state_fd()
2964 VhostUserMsg msg = { in vhost_user_check_device_state() local
2977 ret = vhost_user_write(dev, &msg, NULL, 0); in vhost_user_check_device_state()
2984 ret = vhost_user_read(dev, &msg); in vhost_user_check_device_state()
2991 if (msg.hdr.request != VHOST_USER_CHECK_DEVICE_STATE) { in vhost_user_check_device_state()
2994 VHOST_USER_CHECK_DEVICE_STATE, msg.hdr.request); in vhost_user_check_device_state()
2998 if (msg.hdr.size != sizeof(msg.payload.u64)) { in vhost_user_check_device_state()
3001 sizeof(msg.payload.u64), msg.hdr.size); in vhost_user_check_device_state()
3005 if (msg.payload.u64 != 0) { in vhost_user_check_device_state()