virtio-serial: enable virtio console emergency write feature
authorSascha Silbe <silbe@linux.vnet.ibm.com>
Tue, 27 Sep 2016 13:43:37 +0000 (15:43 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 9 Oct 2016 22:16:57 +0000 (01:16 +0300)
commita06b1dae4706fccb9394b35e88d1905dabec85e7
treed4d0cd841c404a81a202d2ae3b80950394de3e33
parent09da01c3f205b008ce0c7a960092bcc03b383b50
virtio-serial: enable virtio console emergency write feature

Add support for enabling the virtio 1.0 "emergency write"
(VIRTIO_CONSOLE_F_EMERG_WRITE) feature. The previous patch introduced
the plumbing required for this; now we expose the virtio feature to
the guest. The feature is disabled for compatibility machines to avoid
exposing a new feature to existing guests.

As required by the virtio 1.0 spec, the emergency write functionality
is available to the guest even if the guest doesn't negotatiate the
feature, as well as before feature negotation.

Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/char/virtio-serial-bus.c
include/hw/compat.h
include/hw/virtio/virtio-serial.h