diff options
author | Sascha Silbe <silbe@linux.vnet.ibm.com> | 2016-09-27 15:43:37 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-10-10 01:16:57 +0300 |
commit | a06b1dae4706fccb9394b35e88d1905dabec85e7 (patch) | |
tree | d4d0cd841c404a81a202d2ae3b80950394de3e33 /include | |
parent | 09da01c3f205b008ce0c7a960092bcc03b383b50 (diff) | |
download | qemu-a06b1dae4706fccb9394b35e88d1905dabec85e7.tar.gz qemu-a06b1dae4706fccb9394b35e88d1905dabec85e7.tar.bz2 qemu-a06b1dae4706fccb9394b35e88d1905dabec85e7.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/compat.h | 4 | ||||
-rw-r--r-- | include/hw/virtio/virtio-serial.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/hw/compat.h b/include/hw/compat.h index 46412b229a..ef3fae3e1b 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -7,6 +7,10 @@ .property = "page-per-vq",\ .value = "on",\ },{\ + .driver = "virtio-serial-device",\ + .property = "emergency-write",\ + .value = "off",\ + },{\ .driver = "ioapic",\ .property = "version",\ .value = "0x11",\ diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h index 730c88d2a7..b19c44727f 100644 --- a/include/hw/virtio/virtio-serial.h +++ b/include/hw/virtio/virtio-serial.h @@ -184,6 +184,8 @@ struct VirtIOSerial { struct VirtIOSerialPostLoad *post_load; virtio_serial_conf serial; + + uint64_t host_features; }; /* Interface to the virtio-serial bus */ |