summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio-serial.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h
index 098deea..fbaf65f 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
OpenPOWER on IntegriCloud