Home
last modified time | relevance | path

Searched full:msg (Results 1 – 25 of 227) sorted by relevance

12345678910

/qemu/hw/remote/
H A Dmpqemu-link.c34 bool mpqemu_msg_send(MPQemuMsg *msg, QIOChannel *ioc, Error **errp) in mpqemu_msg_send() argument
43 send[0].iov_base = msg; in mpqemu_msg_send()
46 send[1].iov_base = (void *)&msg->data; in mpqemu_msg_send()
47 send[1].iov_len = msg->size; in mpqemu_msg_send()
49 if (msg->num_fds) { in mpqemu_msg_send()
50 nfds = msg->num_fds; in mpqemu_msg_send()
51 fds = msg->fds; in mpqemu_msg_send()
74 trace_mpqemu_send_io_error(msg->cmd, msg->size, nfds); in mpqemu_msg_send()
122 bool mpqemu_msg_recv(MPQemuMsg *msg, QIOChannel *ioc, Error **errp) in mpqemu_msg_recv() argument
130 len = mpqemu_read(ioc, msg, MPQEMU_MSG_HDR_SIZE, &fds, &nfds, errp); in mpqemu_msg_recv()
[all …]
H A Dmessage.c24 MPQemuMsg *msg, Error **errp);
26 MPQemuMsg *msg, Error **errp);
27 static void process_bar_write(QIOChannel *ioc, MPQemuMsg *msg, Error **errp);
28 static void process_bar_read(QIOChannel *ioc, MPQemuMsg *msg, Error **errp);
42 MPQemuMsg msg = {0}; in mpqemu_remote_msg_loop_co() local
44 if (!mpqemu_msg_recv(&msg, com->ioc, &local_err)) { in mpqemu_remote_msg_loop_co()
48 if (!mpqemu_msg_valid(&msg)) { in mpqemu_remote_msg_loop_co()
55 switch (msg.cmd) { in mpqemu_remote_msg_loop_co()
57 process_config_write(com->ioc, pci_dev, &msg, &local_err); in mpqemu_remote_msg_loop_co()
60 process_config_read(com->ioc, pci_dev, &msg, &local_err); in mpqemu_remote_msg_loop_co()
[all …]
H A Dproxy.c53 MPQemuMsg msg; in setup_irqfd() local
59 memset(&msg, 0, sizeof(MPQemuMsg)); in setup_irqfd()
60 msg.cmd = MPQEMU_CMD_SET_IRQFD; in setup_irqfd()
61 msg.num_fds = 2; in setup_irqfd()
62 msg.fds[0] = event_notifier_get_fd(&dev->intr); in setup_irqfd()
63 msg.fds[1] = event_notifier_get_fd(&dev->resample); in setup_irqfd()
64 msg.size = 0; in setup_irqfd()
66 if (!mpqemu_msg_send(&msg, dev->ioc, &local_err)) { in setup_irqfd()
147 MPQemuMsg msg = { 0 }; in config_op_send() local
151 msg.cmd = op; in config_op_send()
[all …]
H A Dproxy-memory-listener.c169 MPQemuMsg msg; in proxy_memory_listener_commit() local
176 memset(&msg, 0, sizeof(MPQemuMsg)); in proxy_memory_listener_commit()
178 msg.cmd = MPQEMU_CMD_SYNC_SYSMEM; in proxy_memory_listener_commit()
179 msg.num_fds = proxy_listener->n_mr_sections; in proxy_memory_listener_commit()
180 msg.size = sizeof(SyncSysmemMsg); in proxy_memory_listener_commit()
181 if (msg.num_fds > REMOTE_MAX_FDS) { in proxy_memory_listener_commit()
188 msg.data.sync_sysmem.gpas[region] = in proxy_memory_listener_commit()
190 msg.data.sync_sysmem.sizes[region] = int128_get64(section->size); in proxy_memory_listener_commit()
193 msg.fds[region] = get_fd_from_hostaddr(host_addr, &offset); in proxy_memory_listener_commit()
194 msg.data.sync_sysmem.offsets[region] = offset; in proxy_memory_listener_commit()
[all …]
/qemu/hw/virtio/
H A Dvhost-user.c275 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()
[all …]
H A Dvhost-backend.c249 struct vhost_msg_v2 msg; in vhost_kernel_iotlb_read() local
251 while ((len = read((uintptr_t)dev->opaque, &msg, sizeof msg)) > 0) { in vhost_kernel_iotlb_read()
252 if (len < sizeof msg) { in vhost_kernel_iotlb_read()
256 if (msg.type != VHOST_IOTLB_MSG_V2) { in vhost_kernel_iotlb_read()
261 vhost_backend_handle_iotlb_msg(dev, &msg.iotlb); in vhost_kernel_iotlb_read()
264 struct vhost_msg msg; in vhost_kernel_iotlb_read() local
266 while ((len = read((uintptr_t)dev->opaque, &msg, sizeof msg)) > 0) { in vhost_kernel_iotlb_read()
267 if (len < sizeof msg) { in vhost_kernel_iotlb_read()
271 if (msg.type != VHOST_IOTLB_MSG) { in vhost_kernel_iotlb_read()
276 vhost_backend_handle_iotlb_msg(dev, &msg.iotlb); in vhost_kernel_iotlb_read()
[all …]
/qemu/python/qemu/qmp/
H A Dqmp_client.py111 :param msg: The QMP `Message` that caused the error.
113 def __init__(self, error_message: str, msg: Message):
116 self.msg: Message = msg
121 f" Message was: {str(self.msg)}\n",
133 :param msg: The QMP `Message` that caused the error.
149 :param msg: The malformed reply that was received.
152 def __init__(self, error_message: str, msg: Message, sent: Message):
153 super().__init__(error_message, msg)
270 msg = await self._recv()
271 return Greeting(msg)
[all …]
H A Dqmp_tui.py66 def format_json(msg: str) -> str:
96 :param msg:
102 msg = json.loads(msg)
103 return str(json.dumps(msg))
105 msg = msg.replace('\n', '')
106 words = msg.split(' ')
155 def add_to_history(self, msg: str, level: Optional[str] = None) -> None:
157 Appends the msg to the history list.
159 :param msg:
162 urwid.emit_signal(self, UPDATE_MSG, msg, level)
[all …]
/qemu/target/ppc/
H A Dtrace-events4 kvm_failed_spr_set(int spr, const char *msg) "Warning: Unable to set SPR %d to KVM: %s"
5 kvm_failed_spr_get(int spr, const char *msg) "Warning: Unable to retrieve SPR %d from KVM: %s"
6 kvm_failed_fpscr_set(const char *msg) "Unable to set FPSCR to KVM: %s"
7 kvm_failed_fp_set(const char *fpname, int fpnum, const char *msg) "Unable to set %s%d to KVM: %s"
8 kvm_failed_vscr_set(const char *msg) "Unable to set VSCR to KVM: %s"
9 kvm_failed_vr_set(int vr, const char *msg) "Unable to set VR%d to KVM: %s"
10 kvm_failed_fpscr_get(const char *msg) "Unable to get FPSCR from KVM: %s"
11 kvm_failed_fp_get(const char *fpname, int fpnum, const char *msg) "Unable to get %s%d from KVM: %s"
12 kvm_failed_vscr_get(const char *msg) "Unable to get VSCR from KVM: %s"
13 kvm_failed_vr_get(int vr, const char *msg) "Unable to get VR%d from KVM: %s"
[all …]
/qemu/hw/hyperv/
H A Dhyperv.c112 msgp_name = g_strdup_printf("synic-%u-msg-page", vp_index); in synic_realize()
191 struct hyperv_message msg; member
203 * BUSY), copies msg, and schedules cpu_post_msg on the assigned cpu
207 * cpu_post_msg (vcpu thread) tries to copy staged msg to msg slot,
287 memcpy(dst_msg, &staged_msg->msg, sizeof(*dst_msg)); in cpu_post_msg()
296 * Notify the msg originator of the progress made; if the slot was busy we in cpu_post_msg()
322 memcpy(&staged_msg->msg, src_msg, sizeof(*src_msg)); in hyperv_post_msg()
341 * -EAGAIN and let the msg originator retry in sint_ack_handler()
609 struct hyperv_post_message_input *msg; in hyperv_hcall_post_message() local
615 if (param & (__alignof__(*msg) - 1)) { in hyperv_hcall_post_message()
[all …]
H A Dvmbus.c949 void *msg, uint32_t msglen, in vmbus_channel_send() argument
983 ret = ringbuf_io(&ringbuf->common, msg, msglen); in vmbus_channel_send()
999 void *msg, uint32_t msglen) in vmbus_channel_send_completion() argument
1003 msg, msglen, false, req->transaction_id); in vmbus_channel_send_completion()
1095 uint32_t msgoff = QEMU_ALIGN_UP(size, __alignof__(*req->msg)); in vmbus_alloc_req()
1101 req->msg = (void *)req + msgoff; in vmbus_alloc_req()
1181 error_report("%s: unexpected msg type: %x", __func__, hdr.type); in vmbus_channel_recv_peek()
1186 if (ringbuf_io(&ringbuf->common, req->msg, msglen) < 0) { in vmbus_channel_recv_peek()
1518 const struct hyperv_post_message_input *msg) in enqueue_incoming_message() argument
1532 memcpy(&vmbus->rx_queue[idx], msg, sizeof(*msg)); in enqueue_incoming_message()
[all …]
H A Dhyperv_testdev.c33 struct hyperv_message msg; member
118 assert(!hyperv_post_msg(conn->sint_route, &conn->msg)); in msg_retry()
134 static uint16_t msg_handler(const struct hyperv_post_message_input *msg, in msg_handler() argument
141 conn->msg.header.message_type = msg->message_type; in msg_handler()
142 assert(msg->payload_size < sizeof(conn->msg.payload)); in msg_handler()
143 conn->msg.header.payload_size = msg->payload_size; in msg_handler()
144 memcpy(&conn->msg.payload, msg->payload, msg->payload_size); in msg_handler()
146 ret = hyperv_post_msg(conn->sint_route, &conn->msg); in msg_handler()
/qemu/ui/
H A Dinput-barrier.c203 static gboolean readcmd(InputBarrier *ib, struct barrierMsg *msg) in readcmd() argument
246 msg->cmd = cmd; in readcmd()
250 read_short(msg->version.major, p, len); in readcmd()
251 read_short(msg->version.minor, p, len); in readcmd()
254 read_int(msg->set.nb, p, len); in readcmd()
255 msg->set.nb /= 2; in readcmd()
256 if (msg->set.nb > BARRIER_MAX_OPTIONS) { in readcmd()
257 msg->set.nb = BARRIER_MAX_OPTIONS; in readcmd()
260 while (len && i < msg->set.nb) { in readcmd()
261 read_int(msg->set.option[i].id, p, len); in readcmd()
[all …]
H A Dvdagent.c156 static void vdagent_send_msg(VDAgentChardev *vd, VDAgentMessage *msg) in vdagent_send_msg() argument
158 uint8_t *msgbuf = (void *)msg; in vdagent_send_msg()
159 uint32_t msgsize = sizeof(VDAgentMessage) + msg->size; in vdagent_send_msg()
163 trace_vdagent_send(GET_NAME(msg_name, msg->type)); in vdagent_send_msg()
165 msg->protocol = VD_AGENT_PROTOCOL; in vdagent_send_msg()
187 g_autofree VDAgentMessage *msg = g_malloc0(sizeof(VDAgentMessage) + in vdagent_send_caps() local
190 VDAgentAnnounceCapabilities *caps = (void *)msg->data; in vdagent_send_caps()
192 msg->type = VD_AGENT_ANNOUNCE_CAPABILITIES; in vdagent_send_caps()
193 msg->size = sizeof(VDAgentAnnounceCapabilities) + sizeof(uint32_t); in vdagent_send_caps()
206 vdagent_send_msg(vd, msg); in vdagent_send_caps()
[all …]
/qemu/tests/qtest/
H A Dipmi-bt-test.c149 static void write_emu_msg(uint8_t *msg, unsigned int len) in write_emu_msg() argument
158 printf(" %2.2x", msg[i]); in write_emu_msg()
163 rv = write(emu_fd, msg, len); in write_emu_msg()
167 static void get_emu_msg(uint8_t *msg, unsigned int *len) in get_emu_msg() argument
178 msg[outpos++] = ch & ~0x10; in get_emu_msg()
183 msg[outpos++] = ch; in get_emu_msg()
197 printf("Msg:"); in get_emu_msg()
199 printf(" %2.2x", msg[i]); in get_emu_msg()
228 uint8_t msg[100]; in emu_msg_handler() local
229 unsigned int msg_len = sizeof(msg); in emu_msg_handler()
[all …]
H A Dvhost-user-test.c185 VhostUserMsg *msg);
187 CharBackend *chr, VhostUserMsg *msg);
337 VhostUserMsg msg; in chr_read() local
338 uint8_t *p = (uint8_t *) &msg; in chr_read()
355 if (msg.size) { in chr_read()
357 size = qemu_chr_fe_read_all(chr, p, msg.size); in chr_read()
358 if (size != msg.size) { in chr_read()
360 __func__, size, msg.size); in chr_read()
365 switch (msg.request) { in chr_read()
371 msg.flags |= VHOST_USER_REPLY_MASK; in chr_read()
[all …]
/qemu/rust/qemu-api/src/
H A Derror.rs52 msg: Option<Cow<'static, str>>, field
53 /// Appends the print string of the error to the msg if not None
66 self.msg in description()
76 if let Some(ref msg) = self.msg { in fmt()
77 write!(f, "{msg}")?; in fmt()
91 fn from(msg: String) -> Self { in from()
94 msg: Some(Cow::Owned(msg)), in from()
104 fn from(msg: &'static str) -> Self { in from()
107 msg: Some(Cow::Borrowed(msg)), in from()
120 msg: None, in from()
[all …]
/qemu/target/loongarch/
H A Dtrace-events4 kvm_failed_get_regs_core(const char *msg) "Failed to get core regs from KVM: %s"
5 kvm_failed_put_regs_core(const char *msg) "Failed to put core regs into KVM: %s"
6 kvm_failed_get_fpu(const char *msg) "Failed to get fpu from KVM: %s"
7 kvm_failed_put_fpu(const char *msg) "Failed to put fpu into KVM: %s"
8 kvm_failed_get_mpstate(const char *msg) "Failed to get mp_state from KVM: %s"
9 kvm_failed_put_mpstate(const char *msg) "Failed to put mp_state into KVM: %s"
10 kvm_failed_get_counter(const char *msg) "Failed to get counter from KVM: %s"
11 kvm_failed_put_counter(const char *msg) "Failed to put counter into KVM: %s"
12 kvm_failed_get_cpucfg(const char *msg) "Failed to get cpucfg from KVM: %s"
13 kvm_failed_put_cpucfg(const char *msg) "Failed to put cpucfg into KVM: %s"
/qemu/crypto/
H A Dcipher-afalg.c93 /* prepare msg header */ in qcrypto_afalg_cipher_ctx_new()
94 afalg->msg = g_new0(struct msghdr, 1); in qcrypto_afalg_cipher_ctx_new()
95 afalg->msg->msg_controllen += CMSG_SPACE(ALG_OPTYPE_LEN); in qcrypto_afalg_cipher_ctx_new()
98 afalg->msg->msg_controllen += CMSG_SPACE(ALG_MSGIV_LEN(expect_niv)); in qcrypto_afalg_cipher_ctx_new()
100 afalg->msg->msg_control = g_new0(uint8_t, afalg->msg->msg_controllen); in qcrypto_afalg_cipher_ctx_new()
103 afalg->cmsg = CMSG_FIRSTHDR(afalg->msg); in qcrypto_afalg_cipher_ctx_new()
107 afalg->cmsg = CMSG_NXTHDR(afalg->msg, afalg->cmsg); in qcrypto_afalg_cipher_ctx_new()
111 afalg->cmsg = CMSG_FIRSTHDR(afalg->msg); in qcrypto_afalg_cipher_ctx_new()
134 afalg->cmsg = CMSG_NXTHDR(afalg->msg, afalg->cmsg); in qcrypto_afalg_cipher_setiv()
136 /* build setiv msg */ in qcrypto_afalg_cipher_setiv()
[all …]
/qemu/hw/display/
H A Dvhost-user-gpu.c123 vhost_user_gpu_handle_cursor(VhostUserGPU *g, VhostUserGpuMsg *msg) in vhost_user_gpu_handle_cursor() argument
125 VhostUserGpuCursorPos *pos = &msg->payload.cursor_pos; in vhost_user_gpu_handle_cursor()
133 if (msg->request == VHOST_USER_GPU_CURSOR_UPDATE) { in vhost_user_gpu_handle_cursor()
134 VhostUserGpuCursorUpdate *up = &msg->payload.cursor_update; in vhost_user_gpu_handle_cursor()
149 msg->request != VHOST_USER_GPU_CURSOR_POS_HIDE); in vhost_user_gpu_handle_cursor()
153 vhost_user_gpu_send_msg(VhostUserGPU *g, const VhostUserGpuMsg *msg) in vhost_user_gpu_send_msg() argument
155 qemu_chr_fe_write(&g->vhost_chr, (uint8_t *)msg, in vhost_user_gpu_send_msg()
156 VHOST_USER_GPU_HDR_SIZE + msg->size); in vhost_user_gpu_send_msg()
162 VhostUserGpuMsg msg = { in vhost_user_gpu_unblock() local
167 vhost_user_gpu_send_msg(g, &msg); in vhost_user_gpu_unblock()
[all …]
/qemu/hw/i386/
H A Dx86-iommu.c59 X86IOMMU_MSIMessage msg = {}; in x86_iommu_irq_to_msi_message() local
62 msg.dest_mode = irq->dest_mode; in x86_iommu_irq_to_msi_message()
63 msg.redir_hint = irq->redir_hint; in x86_iommu_irq_to_msi_message()
64 msg.dest = irq->dest; in x86_iommu_irq_to_msi_message()
65 msg.__addr_hi = irq->dest & 0xffffff00; in x86_iommu_irq_to_msi_message()
66 msg.__addr_head = 0xfee; in x86_iommu_irq_to_msi_message()
68 msg.__not_used = irq->msi_addr_last_bits; in x86_iommu_irq_to_msi_message()
71 msg.vector = irq->vector; in x86_iommu_irq_to_msi_message()
72 msg.delivery_mode = irq->delivery_mode; in x86_iommu_irq_to_msi_message()
73 msg.level = 1; in x86_iommu_irq_to_msi_message()
[all …]
/qemu/tests/qtest/libqos/
H A Dsdhci-cmd.c21 static ssize_t read_fifo(QTestState *qts, uint64_t reg, char *msg, size_t count) in read_fifo() argument
34 msg[index] = msg_frag & mask; in read_fifo()
35 if (msg[index++] == 0) { in read_fifo()
45 static void write_fifo(QTestState *qts, uint64_t reg, const char *msg, in write_fifo() argument
60 msg_frag |= ((uint32_t)msg[index++]) << (frag_i * 8); in write_fifo()
85 ssize_t sdhci_read_cmd(QTestState *qts, uint64_t base_addr, char *msg, in sdhci_read_cmd() argument
93 ssize_t bytes_read = read_fifo(qts, base_addr + SDHC_BDATA, msg, count); in sdhci_read_cmd()
102 void sdhci_write_cmd(QTestState *qts, uint64_t base_addr, const char *msg, in sdhci_write_cmd() argument
110 write_fifo(qts, base_addr + SDHC_BDATA, msg, count); in sdhci_write_cmd()
/qemu/hw/tpm/
H A Dtpm_spapr.c40 uint8_t msg; /* see below */ member
50 /* msg types for valid = SPAPR_VTPM_VALID_INIT_CRQ */
54 /* msg types for valid = SPAPR_VTPM_VALID_CMD */
138 uint8_t msg = crq_data[1]; in tpm_spapr_do_crq() local
140 trace_tpm_spapr_do_crq(valid, msg); in tpm_spapr_do_crq()
146 switch (msg) { in tpm_spapr_do_crq()
151 local_crq.msg = SPAPR_VTPM_INIT_CRQ_RESULT; in tpm_spapr_do_crq()
159 local_crq.msg = SPAPR_VTPM_INIT_CRQ_COMPLETE_RESULT; in tpm_spapr_do_crq()
166 switch (msg) { in tpm_spapr_do_crq()
180 local_crq.msg = SPAPR_VTPM_VTPM_ERROR; in tpm_spapr_do_crq()
[all …]
/qemu/contrib/vhost-user-gpu/
H A Dvhost-user-gpu.c151 struct msghdr msg = { in vg_sock_fd_write() local
162 msg.msg_control = cmsgu.control; in vg_sock_fd_write()
163 msg.msg_controllen = sizeof(cmsgu.control); in vg_sock_fd_write()
165 cmsg = CMSG_FIRSTHDR(&msg); in vg_sock_fd_write()
174 ret = sendmsg(sock, &msg, 0); in vg_sock_fd_write()
182 vg_send_msg(VuGpu *vg, const VhostUserGpuMsg *msg, int fd) in vg_send_msg() argument
184 if (vg_sock_fd_write(vg->sock_fd, msg, in vg_send_msg()
185 VHOST_USER_GPU_HDR_SIZE + msg->size, fd) < 0) { in vg_send_msg()
293 VhostUserGpuMsg msg = { in vg_get_display_info() local
300 vg_send_msg(vg, &msg, -1); in vg_get_display_info()
[all …]
/qemu/hw/misc/
H A Divshmem-flat.c27 int64_t msg; in ivshmem_flat_recv_msg() local
32 ret = qemu_chr_fe_read_all(&s->server_chr, (uint8_t *)&msg + n, in ivshmem_flat_recv_msg()
33 sizeof(msg) - n); in ivshmem_flat_recv_msg()
41 } while (n < sizeof(msg)); in ivshmem_flat_recv_msg()
46 return le64_to_cpu(msg); in ivshmem_flat_recv_msg()
173 static void ivshmem_flat_process_msg(IvshmemFTState *s, uint64_t msg, int fd) in ivshmem_flat_process_msg() argument
178 peer_id = msg & 0xFFFF; in ivshmem_flat_process_msg()
204 int64_t msg; in ivshmem_flat_read_msg() local
212 msg = le64_to_cpu(s->msg_buf); in ivshmem_flat_read_msg()
217 ivshmem_flat_process_msg(s, msg, fd); in ivshmem_flat_read_msg()
[all …]

12345678910