aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/virtio-ccw.h
diff options
context:
space:
mode:
authorFarhan Ali <alifm@linux.vnet.ibm.com>2017-10-09 10:01:50 -0400
committerCornelia Huck <cohuck@redhat.com>2017-10-20 13:32:10 +0200
commit3382cf1fabbf722dce931846853dae711838e720 (patch)
tree8f4b7f7b50029deaf3129b7824a0c0d2588c5c44 /hw/s390x/virtio-ccw.h
parent741a4ec186160b632b6e19d2ad9623bc0121ea5d (diff)
virtio-ccw: Add the virtio-input devices for CCW bus
Wire up the virtio-input HID devices (keyboard, mouse, tablet) for the CCW bus. The virtio-input is a virtio-1 device, so disable legacy revision 0. Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com> Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <6a8ea4c503ee32c2ca7fa608b5f2f547009be8ee.1507557166.git.alifm@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/s390x/virtio-ccw.h')
-rw-r--r--hw/s390x/virtio-ccw.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h
index 541fdd2994..3905f3a3d6 100644
--- a/hw/s390x/virtio-ccw.h
+++ b/hw/s390x/virtio-ccw.h
@@ -28,6 +28,7 @@
#include "hw/virtio/vhost-vsock.h"
#endif /* CONFIG_VHOST_VSOCK */
#include "hw/virtio/virtio-gpu.h"
+#include "hw/virtio/virtio-input.h"
#include "hw/s390x/s390_flic.h"
#include "hw/s390x/css.h"
@@ -233,4 +234,25 @@ typedef struct VirtIOGPUCcw {
VirtIOGPU vdev;
} VirtIOGPUCcw;
+#define TYPE_VIRTIO_INPUT_CCW "virtio-input-ccw"
+#define VIRTIO_INPUT_CCW(obj) \
+ OBJECT_CHECK(VirtIOInputCcw, (obj), TYPE_VIRTIO_INPUT_CCW)
+
+typedef struct VirtIOInputCcw {
+ VirtioCcwDevice parent_obj;
+ VirtIOInput vdev;
+} VirtIOInputCcw;
+
+#define TYPE_VIRTIO_INPUT_HID_CCW "virtio-input-hid-ccw"
+#define TYPE_VIRTIO_KEYBOARD_CCW "virtio-keyboard-ccw"
+#define TYPE_VIRTIO_MOUSE_CCW "virtio-mouse-ccw"
+#define TYPE_VIRTIO_TABLET_CCW "virtio-tablet-ccw"
+#define VIRTIO_INPUT_HID_CCW(obj) \
+ OBJECT_CHECK(VirtIOInputHIDCcw, (obj), TYPE_VIRTIO_INPUT_HID_CCW)
+
+typedef struct VirtIOInputHIDCcw {
+ VirtioCcwDevice parent_obj;
+ VirtIOInputHID vdev;
+} VirtIOInputHIDCcw;
+
#endif