« Previous | Next » 

Revision ed8e5a85

IDed8e5a85a1741147ce06932b478a509ce3407061

Added by Christian Borntraeger about 9 years ago

virtio-console: Fix failure on unconnected pty

when I tried qemu with -virtio-console pty the guest hangs and attaching
on /dev/pts/<x> does not return anything if the attachment is too late.

This results in pty_chr_write() returning 0, which causes the port to
get throttled. This results in the guest getting frozen as the
guest->host virtio_console writes don't return until the host releases
the vq element back to the guest.

For the virtio-serial use case we don't want to lose data but for the
console case we better drop data instead of "killing" the guest
console. If we get chardev->frontend notification and a better behaving
virtio-console we can revert this fix.

Signed-off-by: Christian Borntraeger <>
Signed-off-by: Amit Shah <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences