30 May, 2011

1 commit

  • It's unclear to me if it's important, but it's obviously causing my
    technical colleages some headaches and I'd hate such imprecision to
    slow virtio adoption.

    I've emailed this to all non-trivial contributors for approval, too.

    Signed-off-by: Rusty Russell
    Acked-by: Grant Likely
    Acked-by: Ryan Harper
    Acked-by: Anthony Liguori
    Acked-by: Eric Van Hensbergen
    Acked-by: john cooper
    Acked-by: Aneesh Kumar K.V
    Acked-by: Christian Borntraeger
    Acked-by: Fernando Luis Vazquez Cao

    Rusty Russell
     

19 May, 2010

1 commit


24 Feb, 2010

1 commit

  • Allow reading various alignment values from the config page. This
    allows the guest to much better align I/O requests depending on the
    storage topology.

    Note that the formats for the config values appear a bit messed up,
    but we follow the formats used by ATA and SCSI so they are expected in
    the storage world.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Rusty Russell

    Christoph Hellwig
     

22 Oct, 2009

2 commits

  • This reverts "Add serial number support for virtio_blk, V4a".

    Turns out that virtio_pci, lguest and s/390 all have an 8 bit limit
    on virtio config space, so noone could ever use this.

    This is coming back later in a cleaner form.

    Signed-off-by: Rusty Russell
    Cc: john cooper
    Cc: Jens Axboe

    Rusty Russell
     
  • Rusty,

    commit 3ca4f5ca73057a617f9444a91022d7127041970a
    virtio: add virtio IDs file
    moved all device IDs into a single file. While the change itself is
    a very good one, it can break userspace applications. For example
    if a userspace tool wanted to get the ID of virtio_net it used to
    include virtio_net.h. This does no longer work, since virtio_net.h
    does not include virtio_ids.h.
    This patch moves all "#include " from the C
    files into the header files, making the header files compatible with
    the old ones.

    In addition, this patch exports virtio_ids.h to userspace.

    CC: Fernando Luis Vazquez Cao
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Rusty Russell

    Christian Borntraeger
     

23 Sep, 2009

2 commits

  • Recent qemu has added a VIRTIO_BLK_F_FLUSH flag to advertise that the
    virtual disk has a volatile write cache that needs to be flushed. In case
    we see this feature implement tell the Linux block layer about the fact
    and use the new VIRTIO_BLK_T_FLUSH to flush the cache when required. This
    allows for an correct and simple implementation of write barriers.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Rusty Russell

    Christoph Hellwig
     
  • Virtio IDs are spread all over the tree which makes assigning new IDs
    bothersome. Putting them together should make the process less error-prone.

    Signed-off-by: Fernando Luis Vazquez Cao
    Signed-off-by: Rusty Russell

    Fernando Luis Vazquez Cao
     

30 Jul, 2009

1 commit


09 Jun, 2009

1 commit

  • This patch extracts the opaque data from pci i/o
    region 0 via the added VIRTIO_BLK_F_IDENTIFY
    field. By convention this data takes the form of
    that returned by an ATA IDENTIFY DEVICE command,
    however the driver (except for structure size)
    makes no interpretation of the data. The structure
    data is copied wholesale to userspace via a
    HDIO_GET_IDENTITY ioctl command (eg: hdparm -i ).

    Signed-off-by: john cooper
    Signed-off-by: Rusty Russell
    Signed-off-by: Jens Axboe

    john cooper
     

18 May, 2009

1 commit

  • Add support for SG_IO passthru to virtio_blk. We add the scsi command
    block after the normal outhdr, and the scsi inhdr with full status
    information aswell as the sense buffer before the regular inhdr.

    [hch: forward ported, added the VIRTIO_BLK_F_SCSI flags, some comments
    and tested the whole beast]
    [axboe: updated to use ->resid and not dual-path the byte count]

    Signed-off-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Rusty Russell (+ checkpatch.pl tweak)
    Signed-off-by: Jens Axboe

    Hannes Reinecke
     

31 Jan, 2009

1 commit


25 Jul, 2008

2 commits

  • Currently virtio_blk assumes a 512 byte hard sector size. This can cause
    trouble / performance issues if the backing has a different block size
    (like a file on an ext3 file system formatted with 4k block size or a dasd).

    Lets add a feature flag that tells the guest to use a different hard sector
    size than 512 byte.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Rusty Russell

    Christian Borntraeger
     
  • We want others to implement and use virtio, so it makes sense to BSD
    license the non-__KERNEL__ parts of the headers to make this crystal
    clear.

    Signed-off-by: Rusty Russell
    Acked-by: Christian Borntraeger
    Acked-by: Mark McLoughlin
    Acked-by: Ryan Harper
    Acked-by: Eric Van Hensbergen
    Acked-by: Anthony Liguori

    Rusty Russell
     

30 May, 2008

2 commits

  • Since commit 72e61eb40b55dd57031ec5971e810649f82b0259 (virtio: change config
    to guest endian) config space is no longer fixed endian.

    Lets change the virtio_blk_config variables.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Rusty Russell

    Christian Borntraeger
     
  • Hello Rusty,

    sometimes it is useful to share a disk (e.g. usr). To avoid file system
    corruption, the disk should be mounted read-only in that case. This patch
    adds a new feature flag, that allows the host to specify, if the disk should
    be considered read-only.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Rusty Russell

    Christian Borntraeger
     

02 May, 2008

2 commits


04 Feb, 2008

2 commits

  • This field has been unused since an older version of virtio. Remove
    it now before we freeze the ABI.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au.

    Rusty Russell
     
  • Previously we used a type/len pair within the config space, but this
    seems overkill. We now simply define a structure which represents the
    layout in the config space: the config space can now only be extended
    at the end.

    The main driver-visible changes:
    1) We indicate what fields are present with an explicit feature bit.
    2) Virtqueues are explicitly numbered, and not in the config space.

    Signed-off-by: Rusty Russell

    Rusty Russell
     

23 Oct, 2007

1 commit

  • The block driver uses scatter-gather lists with sg[0] being the
    request information (struct virtio_blk_outhdr) with the type, sector
    and inbuf id. The next N sg entries are the bio itself, then the last
    sg is the status byte. Whether the N entries are in or out depends on
    whether it's a read or a write.

    We accept the normal (SCSI) ioctls: they get handed through to the other
    side which can then handle it or reply that it's unsupported. It's
    not clear that this actually works in general, since I don't know
    if blk_pc_request() requests have an accurate rq_data_dir().

    Although we try to reply -ENOTTY on unsupported commands, ioctl(fd,
    CDROMEJECT) returns success to userspace. This needs a separate
    patch.

    Signed-off-by: Rusty Russell
    Cc: Jens Axboe

    Rusty Russell