Lines Matching refs:msg
276 MSIMessage msg) in ivshmem_vector_unmask() argument
290 ret = kvm_irqchip_update_msi_route(kvm_state, v->virq, msg, dev); in ivshmem_vector_unmask()
550 static void process_msg(IVShmemState *s, int64_t msg, int fd, Error **errp) in process_msg() argument
552 IVSHMEM_DPRINTF("posn is %" PRId64 ", fd is %d\n", msg, fd); in process_msg()
554 if (msg < -1 || msg > IVSHMEM_MAX_PEERS) { in process_msg()
555 error_setg(errp, "server sent invalid message %" PRId64, msg); in process_msg()
560 if (msg == -1) { in process_msg()
565 if (msg >= s->nb_peers) { in process_msg()
566 resize_peers(s, msg + 1); in process_msg()
570 process_msg_connect(s, msg, fd, errp); in process_msg()
572 process_msg_disconnect(s, msg, errp); in process_msg()
589 int64_t msg; in ivshmem_read() local
597 msg = le64_to_cpu(s->msg_buf); in ivshmem_read()
602 process_msg(s, msg, fd, &err); in ivshmem_read()
610 int64_t msg; in ivshmem_recv_msg() local
615 ret = qemu_chr_fe_read_all(&s->server_chr, (uint8_t *)&msg + n, in ivshmem_recv_msg()
616 sizeof(msg) - n); in ivshmem_recv_msg()
625 } while (n < sizeof(msg)); in ivshmem_recv_msg()
628 return le64_to_cpu(msg); in ivshmem_recv_msg()
634 int64_t msg; in ivshmem_recv_setup() local
637 msg = ivshmem_recv_msg(s, &fd, &err); in ivshmem_recv_setup()
642 if (msg != IVSHMEM_PROTOCOL_VERSION) { in ivshmem_recv_setup()
644 msg, IVSHMEM_PROTOCOL_VERSION); in ivshmem_recv_setup()
665 msg = ivshmem_recv_msg(s, &fd, &err); in ivshmem_recv_setup()
670 if (fd != -1 || msg < 0 || msg > IVSHMEM_MAX_PEERS) { in ivshmem_recv_setup()
674 s->vm_id = msg; in ivshmem_recv_setup()
680 msg = ivshmem_recv_msg(s, &fd, &err); in ivshmem_recv_setup()
685 process_msg(s, msg, fd, &err); in ivshmem_recv_setup()
690 } while (msg != -1); in ivshmem_recv_setup()