Lines Matching refs:vcon
44 VirtConsole *vcon = opaque; in chr_write_unblocked() local
46 vcon->watch = 0; in chr_write_unblocked()
47 virtio_serial_throttle_port(VIRTIO_SERIAL_PORT(vcon), false); in chr_write_unblocked()
55 VirtConsole *vcon = VIRTIO_CONSOLE(port); in flush_buf() local
58 if (!qemu_chr_fe_backend_connected(&vcon->chr)) { in flush_buf()
63 ret = qemu_chr_fe_write(&vcon->chr, buf, len); in flush_buf()
100 if (!vcon->watch) { in flush_buf()
101 vcon->watch = qemu_chr_fe_add_watch(&vcon->chr, in flush_buf()
103 chr_write_unblocked, vcon); in flush_buf()
113 VirtConsole *vcon = VIRTIO_CONSOLE(port); in set_guest_connected() local
118 qemu_chr_fe_set_open(&vcon->chr, guest_connected); in set_guest_connected()
128 VirtConsole *vcon = VIRTIO_CONSOLE(port); in guest_writable() local
130 qemu_chr_fe_accept_input(&vcon->chr); in guest_writable()
136 VirtConsole *vcon = opaque; in chr_can_read() local
138 return virtio_serial_guest_ready(VIRTIO_SERIAL_PORT(vcon)); in chr_can_read()
144 VirtConsole *vcon = opaque; in chr_read() local
145 VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(vcon); in chr_read()
153 VirtConsole *vcon = opaque; in chr_event() local
154 VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(vcon); in chr_event()
162 if (vcon->watch) { in chr_event()
163 g_source_remove(vcon->watch); in chr_event()
164 vcon->watch = 0; in chr_event()
178 VirtConsole *vcon = opaque; in chr_be_change() local
179 VirtIOSerialPort *port = VIRTIO_SERIAL_PORT(vcon); in chr_be_change()
183 qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, in chr_be_change()
184 NULL, chr_be_change, vcon, NULL, true); in chr_be_change()
186 qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, in chr_be_change()
187 chr_event, chr_be_change, vcon, NULL, false); in chr_be_change()
190 if (vcon->watch) { in chr_be_change()
191 g_source_remove(vcon->watch); in chr_be_change()
192 vcon->watch = qemu_chr_fe_add_watch(&vcon->chr, in chr_be_change()
194 chr_write_unblocked, vcon); in chr_be_change()
202 VirtConsole *vcon = VIRTIO_CONSOLE(port); in virtconsole_enable_backend() local
204 if (!qemu_chr_fe_backend_connected(&vcon->chr)) { in virtconsole_enable_backend()
211 qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, in virtconsole_enable_backend()
213 chr_be_change, vcon, NULL, false); in virtconsole_enable_backend()
215 qemu_chr_fe_set_handlers(&vcon->chr, NULL, NULL, NULL, in virtconsole_enable_backend()
223 VirtConsole *vcon = VIRTIO_CONSOLE(dev); in virtconsole_realize() local
232 if (qemu_chr_fe_backend_connected(&vcon->chr)) { in virtconsole_realize()
243 qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, in virtconsole_realize()
245 vcon, NULL, true); in virtconsole_realize()
248 qemu_chr_fe_set_handlers(&vcon->chr, chr_can_read, chr_read, in virtconsole_realize()
250 vcon, NULL, false); in virtconsole_realize()
257 VirtConsole *vcon = VIRTIO_CONSOLE(dev); in virtconsole_unrealize() local
259 if (vcon->watch) { in virtconsole_unrealize()
260 g_source_remove(vcon->watch); in virtconsole_unrealize()