search for: virtio_blk_geometry

Displaying 16 results from an estimated 16 matches for "virtio_blk_geometry".

Did you mean: virtio_blk_f_geometry
2020 Aug 05
1
[PATCH v3 06/38] virtio_blk: correct tags for config space fields
...ity; + __virtio64 capacity; /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ - __u32 size_max; + __virtio32 size_max; /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ - __u32 seg_max; + __virtio32 seg_max; /* geometry of the device (if VIRTIO_BLK_F_GEOMETRY) */ struct virtio_blk_geometry { - __u16 cylinders; + __virtio16 cylinders; __u8 heads; __u8 sectors; } geometry; /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ - __u32 blk_size; + __virtio32 blk_size; /* the next 4 entries are guarded by VIRTIO_BLK_F_TOPOLOGY */ /* exponent for physical block per log...
2008 Apr 16
1
[PATCH] add virtio disk geometry feature
From: Ryan Harper <ryanh at us.ibm.com> Rather than faking up some geometry, allow the backend to push the disk geometry via virtio pci config option. Keep the old geo code around for compatibility. Signed-off-by: Ryan Harper <ryanh at us.ibm.com> Reviewed-by: Anthony Liguori <aliguori at us.ibm.com> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index
2008 Apr 16
1
[PATCH] add virtio disk geometry feature
From: Ryan Harper <ryanh at us.ibm.com> Rather than faking up some geometry, allow the backend to push the disk geometry via virtio pci config option. Keep the old geo code around for compatibility. Signed-off-by: Ryan Harper <ryanh at us.ibm.com> Reviewed-by: Anthony Liguori <aliguori at us.ibm.com> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index
2020 Aug 03
0
[PATCH v2 06/24] virtio_blk: correct tags for config space fields
...ity; + __virtio64 capacity; /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ - __u32 size_max; + __virtio32 size_max; /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ - __u32 seg_max; + __virtio32 seg_max; /* geometry of the device (if VIRTIO_BLK_F_GEOMETRY) */ struct virtio_blk_geometry { - __u16 cylinders; + __virtio16 cylinders; __u8 heads; __u8 sectors; } geometry; /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ - __u32 blk_size; + __virtio32 blk_size; /* the next 4 entries are guarded by VIRTIO_BLK_F_TOPOLOGY */ /* exponent for physical block per log...
2008 May 29
1
[PATCH] virtio_blk: fix endianess annotations
.../ - __le64 capacity; + __u64 capacity; /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ - __le32 size_max; + __u32 size_max; /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ - __le32 seg_max; + __u32 seg_max; /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ struct virtio_blk_geometry { - __le16 cylinders; + __u16 cylinders; __u8 heads; __u8 sectors; } geometry;
2015 Mar 01
3
[PATCH 0/2] virtio_blk header fixes
Now that QEmu reuses linux virtio headers, we noticed a typo in the exported virtio block header. Fix it up. I'd like these merged for 4.0 so that Qemu 2.3 can alredy get it right. Michael S. Tsirkin (2): virtio_blk: typo fix virtio_blk: fix comment for virtio 1.0 include/uapi/linux/virtio_blk.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- MST
2015 Mar 01
3
[PATCH 0/2] virtio_blk header fixes
Now that QEmu reuses linux virtio headers, we noticed a typo in the exported virtio block header. Fix it up. I'd like these merged for 4.0 so that Qemu 2.3 can alredy get it right. Michael S. Tsirkin (2): virtio_blk: typo fix virtio_blk: fix comment for virtio 1.0 include/uapi/linux/virtio_blk.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- MST
2009 Sep 29
1
[PATCH 1/4] virtio_blk: deprecate the 1024-byte ID field.
..._deprecated { + /* The capacity (in 512-byte sectors). */ + __u64 capacity; + /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ + __u32 size_max; + /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ + __u32 seg_max; + /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ + struct virtio_blk_geometry geometry; + /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ + __u32 blk_size; + __u8 identify[VIRTIO_BLK_ID_BYTES]; +} __attribute__((packed)); + static int virtblk_identify(struct gendisk *disk, void *argp) { struct virtio_blk *vblk = disk->private_data; @@ -196,7 +212,7 @@ static int...
2009 Sep 29
1
[PATCH 1/4] virtio_blk: deprecate the 1024-byte ID field.
..._deprecated { + /* The capacity (in 512-byte sectors). */ + __u64 capacity; + /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ + __u32 size_max; + /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ + __u32 seg_max; + /* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */ + struct virtio_blk_geometry geometry; + /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ + __u32 blk_size; + __u8 identify[VIRTIO_BLK_ID_BYTES]; +} __attribute__((packed)); + static int virtblk_identify(struct gendisk *disk, void *argp) { struct virtio_blk *vblk = disk->private_data; @@ -196,7 +212,7 @@ static int...
2015 Nov 18
2
[RFC] kvmtool: add support for modern virtio-pci
...nt sel) { struct blk_dev *bdev = dev; + + bdev->features |= (u64)features << (32 * sel); +} + +static void notify_status(struct kvm *kvm, void *dev, u8 status) +{ + static bool init_done; + struct blk_dev *bdev = dev; struct virtio_blk_config *conf = &bdev->blk_config; struct virtio_blk_geometry *geo = &conf->geometry; - bdev->features = features; + if (!(status & VIRTIO_CONFIG_S_DRIVER_OK) || init_done) + return; + + init_done = true; conf->capacity = virtio_host_to_guest_u64(&bdev->vdev, conf->capacity); conf->size_max = virtio_host_to_guest_u32(&am...
2015 Nov 18
2
[RFC] kvmtool: add support for modern virtio-pci
...nt sel) { struct blk_dev *bdev = dev; + + bdev->features |= (u64)features << (32 * sel); +} + +static void notify_status(struct kvm *kvm, void *dev, u8 status) +{ + static bool init_done; + struct blk_dev *bdev = dev; struct virtio_blk_config *conf = &bdev->blk_config; struct virtio_blk_geometry *geo = &conf->geometry; - bdev->features = features; + if (!(status & VIRTIO_CONFIG_S_DRIVER_OK) || init_done) + return; + + init_done = true; conf->capacity = virtio_host_to_guest_u64(&bdev->vdev, conf->capacity); conf->size_max = virtio_host_to_guest_u32(&am...
2020 Aug 03
51
[PATCH v2 00/24] virtio: config space endian-ness cleanup
Config space endian-ness is currently a mess: fields are not tagged with the correct endian-ness so it's easy to make mistakes like instanciating config space in native endian-ness. The following patches adding sparse tagging are currently in my tree. Lightly tested. As a follow-up, I plan to add new APIs that handle modern config space in a more efficient way (bypassing the version check).
2013 Apr 05
8
[PATCH 0/7] virtio cleanups
Aiming these for coming merge window. Nothing should change, but get ready for a non-guest-endian config transports, and > 32 features bits. Final one is just an overdue consolidation. Cheers, Rusty. Rusty Russell (7): virtio_config: introduce size-based accessors. virtio: use size-based config accessors. virtio_config: helpers for non-converting accessors. virtio_config: make
2013 Apr 05
8
[PATCH 0/7] virtio cleanups
Aiming these for coming merge window. Nothing should change, but get ready for a non-guest-endian config transports, and > 32 features bits. Final one is just an overdue consolidation. Cheers, Rusty. Rusty Russell (7): virtio_config: introduce size-based accessors. virtio: use size-based config accessors. virtio_config: helpers for non-converting accessors. virtio_config: make
2013 Mar 21
24
[PATCH 00/22] New virtio PCI layout
I've renewed this again, with some comments from HPA. I've tried to keep the new patches separate, so you can see the changes since we last discussed this (and so it's easy to back it out if we decide it's insane). I haven't even looked at the QEMU side so this is completely untested. Comments gratefully received! Rusty. Michael S Tsirkin (1): pci: add pci_iomap_range
2013 Mar 21
24
[PATCH 00/22] New virtio PCI layout
I've renewed this again, with some comments from HPA. I've tried to keep the new patches separate, so you can see the changes since we last discussed this (and so it's easy to back it out if we decide it's insane). I haven't even looked at the QEMU side so this is completely untested. Comments gratefully received! Rusty. Michael S Tsirkin (1): pci: add pci_iomap_range