Lines Matching refs:vcon

41     VirtConsole *vcon = opaque;  in chr_write_unblocked()  local
43 vcon->watch = 0; in chr_write_unblocked()
44 virtio_serial_throttle_port(VIRTIO_SERIAL_PORT(vcon), false); in chr_write_unblocked()
52 VirtConsole *vcon = VIRTIO_CONSOLE(port); in flush_buf() local
55 if (!qemu_chr_fe_backend_connected(&vcon->chr)) { in flush_buf()
60 ret = qemu_chr_fe_write(&vcon->chr, buf, len); in flush_buf()
97 if (!vcon->watch) { in flush_buf()
98 vcon->watch = qemu_chr_fe_add_watch(&vcon->chr, in flush_buf()
100 chr_write_unblocked, vcon); in flush_buf()
110 VirtConsole *vcon = VIRTIO_CONSOLE(port); in set_guest_connected() local
115 qemu_chr_fe_set_open(&vcon->chr, guest_connected); in set_guest_connected()
125 VirtConsole *vcon = VIRTIO_CONSOLE(port); in guest_writable() local
127 qemu_chr_fe_accept_input(&vcon->chr); in guest_writable()
133 VirtConsole *vcon = opaque; in chr_can_read() local
135 return virtio_serial_guest_ready(VIRTIO_SERIAL_PORT(vcon)); in chr_can_read()
141 VirtConsole *vcon = opaque; in chr_read() local
142 VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(vcon); in chr_read()
150 VirtConsole *vcon = opaque; in chr_event() local
151 VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(vcon); in chr_event()
159 if (vcon->watch) { in chr_event()
160 g_source_remove(vcon->watch); in chr_event()
161 vcon->watch = 0; in chr_event()
170 VirtConsole *vcon = opaque; in chr_be_change() local
171 VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(vcon); in chr_be_change()
175 qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, in chr_be_change()
176 NULL, chr_be_change, vcon, NULL, true); in chr_be_change()
178 qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, in chr_be_change()
179 chr_event, chr_be_change, vcon, NULL, false); in chr_be_change()
182 if (vcon->watch) { in chr_be_change()
183 g_source_remove(vcon->watch); in chr_be_change()
184 vcon->watch = qemu_chr_fe_add_watch(&vcon->chr, in chr_be_change()
186 chr_write_unblocked, vcon); in chr_be_change()
194 VirtConsole *vcon = VIRTIO_CONSOLE(port); in virtconsole_enable_backend() local
196 if (!qemu_chr_fe_backend_connected(&vcon->chr)) { in virtconsole_enable_backend()
203 qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, in virtconsole_enable_backend()
205 chr_be_change, vcon, NULL, false); in virtconsole_enable_backend()
207 qemu_chr_fe_set_handlers(&vcon->chr, NULL, NULL, NULL, in virtconsole_enable_backend()
215 VirtConsole *vcon = VIRTIO_CONSOLE(dev); in virtconsole_realize() local
224 if (qemu_chr_fe_backend_connected(&vcon->chr)) { in virtconsole_realize()
235 qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, in virtconsole_realize()
237 vcon, NULL, true); in virtconsole_realize()
240 qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, in virtconsole_realize()
242 vcon, NULL, false); in virtconsole_realize()
249 VirtConsole *vcon = VIRTIO_CONSOLE(dev); in virtconsole_unrealize() local
251 if (vcon->watch) { in virtconsole_unrealize()
252 g_source_remove(vcon->watch); in virtconsole_unrealize()