[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH 12/12] plat/drivers: Add rest of the interface for virtio block



I mistyped the author of this patch. I will correct it in the v2 of the series.


Roxana


On Mon, Jun 3, 2019 at 10:46 AM Roxana Nicolescu <nicolescu.roxana1996@xxxxxxxxx> wrote:
This patch adds the rest of the interface for virtio block device
which is found in the specs.
Note: For now, it is not used in the implementation of the virtio driver.

Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>
---
 plat/drivers/include/virtio/virtio_blk.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/plat/drivers/include/virtio/virtio_blk.h b/plat/drivers/include/virtio/virtio_blk.h
index 1b8dffd3..191cc91f 100644
--- a/plat/drivers/include/virtio/virtio_blk.h
+++ b/plat/drivers/include/virtio/virtio_blk.h
@@ -28,16 +28,24 @@
 #define VIRTIO_BLK_F_SIZE_MAX  1
 /* Maximum number of segments in a request is in seg_max. */
 #define VIRTIO_BLK_F_SEG_MAX   2
+/* Disk-style geometry specified in geometry */
+#define VIRTIO_BLK_F_GEOMETRY  4
 /* Device is read-only. */
 #define VIRTIO_BLK_F_RO                5
 /* Block size of disk is in blk_size. */
 #define VIRTIO_BLK_F_BLK_SIZE  6
 /* Cache flush command support. */
 #define VIRTIO_BLK_F_FLUSH     9
+/* Device exports information on optimal I/O alignment. */
+#define VIRTIO_BLK_F_TOPOLOGY  10
 /* Device can toggle its cache between writeback and writethrough modes. */
 #define VIRTIO_BLK_F_CONFIG_WCE 11
 /* Device supports multi-queues */
 #define VIRTIO_BLK_F_MQ                12
+/* Device supports request barriers. */
+#define VIRTIO_BLK_F_BARRIER   0
+/* Device supports scsi packet commands. */
+#define VIRTIO_BLK_F_SCSI      7

 /* Response status */
 #define VIRTIO_BLK_S_OK                0
@@ -51,8 +59,25 @@ struct virtio_blk_config {
        __u32 size_max;
        /* Maximum size of a segment */
        __u32 seg_max;
+       /* Geometry */
+       struct virtio_blk_geometry {
+               __u16 cylinders;
+               __u8 heads;
+               __u8 sectors;
+       } geometry;
        /* Block size */
        __u32 blk_size;
+       /* Topology */
+       struct virtio_blk_topology {
+               /* of logical blocks per physical block (log2) */
+               __u8 physical_block_exp;
+               /* offset of first aligned logical block */
+               __u8 alignment_offset;
+               /* suggested minimum I/O size in blocks */
+               __u16 min_io_size;
+               /* optimal (suggested maximum) I/O size in blocks */
+               __u32 opt_io_size;
+       } topology;
        /* It is set if backend has writeback cache,
         * otherwise it has writethrough cache.
         **/
--
2.11.0

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.