aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/virtio.h
diff options
context:
space:
mode:
authorEugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>2015-10-26 15:47:24 +0100
committerCornelia Huck <cornelia.huck@de.ibm.com>2016-03-23 16:13:38 +0100
commit69429682c6887bfe7911b26766bedcf3bcabb281 (patch)
tree25f226e2f06ddfa94501ac04520ed909fb04b078 /pc-bios/s390-ccw/virtio.h
parent8512989143909bf7a32c96a52a8530e30df87ad7 (diff)
pc-bios/s390-ccw: add vdev object to store all device details
Add VDev "object" as a container for all device-related items. The default object is static. Leverage dependency on many different device-related globals. Make them syntactically visible. Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'pc-bios/s390-ccw/virtio.h')
-rw-r--r--pc-bios/s390-ccw/virtio.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/pc-bios/s390-ccw/virtio.h b/pc-bios/s390-ccw/virtio.h
index d17b1350d4..b0034aa07f 100644
--- a/pc-bios/s390-ccw/virtio.h
+++ b/pc-bios/s390-ccw/virtio.h
@@ -222,4 +222,22 @@ static inline ulong virtio_sector_adjust(ulong sector)
return sector * (virtio_get_block_size() / VIRTIO_SECTOR_SIZE);
}
+struct VDev {
+ int nr_vqs;
+ VRing *vrings;
+ int cmd_vr_idx;
+ void *ring_area;
+ long wait_reply_timeout;
+ bool guessed_disk_nature;
+ SubChannelId schid;
+ SenseId senseid;
+ union {
+ VirtioBlkConfig blk;
+ } config;
+};
+typedef struct VDev VDev;
+
+VDev *virtio_get_device(void);
+VirtioDevType virtio_get_device_type(void);
+
#endif /* VIRTIO_H */