diff options
author | KONRAD Frederic <fred.konrad@greensocs.com> | 2013-04-09 14:53:30 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-04-15 10:22:04 -0500 |
commit | 2cd2b016a145c57204ab629d2876b7e0a931ab12 (patch) | |
tree | 7c8a8dc27d4ef15abb6166f086883612fed1697b /include/hw | |
parent | f574fa8b0700bd5a3a400dbdc3bd514eaf53e005 (diff) |
virtio-serial: add the virtio-serial device.
Create virtio-serial which extends virtio-device, so it can be connected
on virtio-bus.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Message-id: 1365512016-21944-2-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/virtio/virtio-serial.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h index 098deeac4a..fbaf65f9f1 100644 --- a/include/hw/virtio/virtio-serial.h +++ b/include/hw/virtio/virtio-serial.h @@ -210,6 +210,8 @@ struct VirtIOSerial { struct virtio_console_config config; struct VirtIOSerialPostLoad *post_load; + + virtio_serial_conf serial; }; /* Interface to the virtio-serial bus */ @@ -244,4 +246,11 @@ size_t virtio_serial_guest_ready(VirtIOSerialPort *port); */ void virtio_serial_throttle_port(VirtIOSerialPort *port, bool throttle); +#define TYPE_VIRTIO_SERIAL "virtio-serial-device" +#define VIRTIO_SERIAL(obj) \ + OBJECT_CHECK(VirtIOSerial, (obj), TYPE_VIRTIO_SERIAL) + +#define DEFINE_VIRTIO_SERIAL_PROPERTIES(_state, _field) \ + DEFINE_PROP_UINT32("max_ports", _state, _field.max_virtserial_ports, 31) + #endif |