History log of /fuchsia/zircon/system/dev/bus/virtio/block.cpp
Revision Date Author Comments
# babe1cf5 25-Jul-2018 Adam Barth <abarth@chromium.org>

[sync] Apply C API rubric to libsync

Test: No behavior change
Change-Id: I30a413f7fb5d3f4e741e5204532b82e73595c086


# 2b848d75 03-Apr-2018 Todd Eisenberger <teisenbe@google.com>

[drivers][bti] Use zx_bti_pin instead of zx_bti_pin_new

This should be a no-op, since these are aliases.

ZX-1936 #comment Switch drivers to new syscall name

Change-Id: I09e5a5fd48b7d4539347564897f14fab90e19868


# ca1fecb0 03-Apr-2018 Todd Eisenberger <teisenbe@google.com>

[dev][virtio] Migrate to new BTI interface

Now with PMTs!

ZX-1936 #comment migrated virtio

Change-Id: I57df8a19eb5622ea82ff11a1a3d73bb25bd4327a


# d14bfadf 20-Mar-2018 Todd Eisenberger <teisenbe@google.com>

[ddk][io-buffer] Rename callsites of io_buffer_init*_with_bti

ZX-1804 #comment Move all zircon callsites to final name

Change-Id: Ie35de5654841e84653582126dc1f976664c0f49d


# 37331e67 12-Mar-2018 Todd Eisenberger <teisenbe@google.com>

[virtio] Convert use of OP_LOOKUP to bti_pin

Change-Id: I828fef091de454e3dd7d21d2964beb5c20ef879b


# df33da5d 12-Mar-2018 Todd Eisenberger <teisenbe@google.com>

[virtio] Make use of BTIs in io_buffer_init calls

Change-Id: Iae64c006045fcd465287d716dc1711d5923eaff2


# 09fabdf9 12-Mar-2018 Todd Eisenberger <teisenbe@google.com>

[virtio] Wire BTIs through to the device objects

Change-Id: I8a19733734b8694f734463dd3134b77a9ae50d14


# f0c2fafa 09-Mar-2018 Todd Eisenberger <teisenbe@google.com>

[virtio] Get rid of unused utilities file

Change-Id: If81c1f6e3441524479c191ae52037fb9c777781c


# 3aea7e1f 09-Mar-2018 Todd Eisenberger <teisenbe@google.com>

[virtio] Convert BlockDevice to use io_buffer

Change-Id: I0a22b9ec61e1e4083e89c4ce43b2549fff052cf4


# 5bf4ff92 08-Mar-2018 Brian Swetland <swetland@google.com>

[ddk][block] rename BLOCK_CORE protocol to BLOCK_IMPL

Change-Id: Iba98a01e526cffc01940fdbb1ea4c593f0f77184


# 611e3029 28-Feb-2018 Travis Geiselbrecht <travisg@google.com>

[dev][virtio-block] add an external mutex around the ring descriptor

TODO: probably move the mutex into the ring class, but need to test
other devices for this.

ZX-1784 #done

Change-Id: I57c4b6e0a3bc8416faabd73c93d99b1f7fe77d04


# 375157fc 26-Feb-2018 Brian Swetland <swetland@google.com>

[ddk][block] change device_rebind() semantics

Previously device_rebind() would call device_remove() on all of
the children of the device it was called on, *without* invoking
their unbind() hook, in violation of the device model.

Change this so that it instead causes all children to be unbound
and, then, when all those children are finally removed and eventually
released, *then* cause the rebind attempt.

This preserves the device model and further ensures that new children
do not get bound until the existing children are fully destructed.

Since all block protocol devices are accessed from userspace via the
shared block driver, instead of having the shared block driver forward
the BLOCK_RR_PART ioctl() to its parent, it fields this ioctl() itself,
causing its children to become unbound and the rebound.

One interesting change is that it no longer changes name -- if you RR_PART
against /dev/class/block/123, that device will persist (since it *is*
the same device, it's just that you asked for it to remove its children
and try again because its partition table may have changed, etc).

Currently we synthesize a REMOVE and ADD directory watch event for a
device being rebound. We should instead just generate a MODIFY event,
but that will require changes to various clients (block-watcher, tests, etc)
That depend on the old behavior.

Handling of BLOCK_RR_PART is removed from all block core drivers.

Change-Id: I9fd40ec11c216e3d2e0e88ef65ccd23e031eb245


# 2a7db0db 24-Jan-2018 Brian Swetland <swetland@google.com>

[virtio][block] cope with temporary resource exhaustion

Don't fail if all 32 requests are in flight or there are
not enough free descriptor slots available. Instead wait
and try again as in-flight requests complete.

This could probably be done more cleverly, but for now
I avoided getting tricky.

Also, access alloc/free_blk_req() and the txn_list under
a lock, to avoid the irq thread and queueing threads
messing with each other.

Change-Id: I1d7f6e6e772c665514cddccd867520f56a3002b4


# 3ffca695 23-Jan-2018 Brian Swetland <swetland@google.com>

[virtio][block] convert to new block protocol

This works with the iochk exerciser, but does not pass the minfs
test. However the pre-conversion version fails the minfs test the
same way: if requests arrive fast enough there may not be enough
ring entries for a request and the driver does not have a mechanism
to wait until they become available.

Change-Id: I0d92774efbdf1ae1caa1d7359b6a3084047e7494


# 2dc3df0b 10-Jan-2018 Sean Klein <smklein@google.com>

[block] Larger-than-device requests should fail, not truncate

ZX-1545 #comment In Progress

Change-Id: I456c71c1b093791d1e21855849d566726a4c0544


# a3d8a149 12-Dec-2017 Tim Detwiler <tjdetwiler@google.com>

[virtio][block] Fix block request flags.

We need to ensure the write flag is cleared on the header of a recycled
block request. This fixes an assert in QEMU.

Change-Id: Id458870adbfba5314aa2686dfec852435862f4f9


# e75bde30 10-Dec-2017 Sean Klein <seanmarionklein@gmail.com>

[dev][block] Drastically simplify BLOCK_CORE protocol

Observations:
- Almost every block device driver implements the protocol
functions (set_callbacks, get_info, read, write) using
nearly identical code.
- The only differences which exist in those functions are
within the read/write functions, which may do additional
boundary checking. However, this boundary checking is
already accomplished by iotxn_queue, so it is redundant.

Exploiting these Observations:
- Relocate the iotxn allocating / enqueueing functionality
into the generic block driver, so it can be shared by
all block device drivers registered as BLOCK_CORE.
- In doing so, there is no longer a need for registered
callbacks. This simplifies block device drivers further.

Change-Id: I795418489cebd3ecebcb2d1153f1cfd7dcc77d5c


# 5203d83e 09-Dec-2017 Sean Klein <smklein@google.com>

[dev][block] Add write barriers for groups of block iotxns

ZX-1436 #comment In Progress

Change-Id: Iaea7b796e3d073780bfead6bdc2a7c30bb29e491


# 1d2ee742 12-Oct-2017 Christopher Anderson <cja@google.com>

[virtio] Refactor virtio backend support

- Implement device backends for transport rather than having
it be a part of the device class itself. These backends are
plugged into the device class to provide an abstraction between
device level interfaces and the specific nuances around the
virtio interface.
- Implement a legacy virtio bar0 PIO interface for use in systems
that only provide Virtio 0.9.5 devices.
- Move logging away from VIRTIO_ERROR and use newer ddk zxlogf.
- Run clang-fmt and clean up small nits here and there.
Change-Id: I2568e9554378163f19b89537986e0d5ea8b47510


# f3e2126c 12-Sep-2017 Roland McGrath <mcgrathr@google.com>

[zx] Magenta -> Zircon

The Great Renaming is here!

Change-Id: I3229bdeb2a3d0e40fb4db6fec8ca7d971fbffb94


# 59e644b1 07-Sep-2017 George Kulakowski <kulakowski@google.com>

[zircon][mxtl->fbl] Rename mxtl to fbl

Change-Id: Ie21b6498e1bfb0a7fa0315e40b9e5c3ee78646be


# 8f8401d2 21-Jul-2017 Aaron Green <aarongreen@google.com>

[virtio] Minor tracing enhancement

This CL just improves the debug print routine for virtqueue descriptors.

In particular, originally this code:
\#if LOCAL_TRACE > 0
virtio_dump_desc(desc);
\#endif

would yield:
[00015.387] 02151.02581> vring descriptor 0x6fbd384f71f0:
addr 0x4a18600 len 0x465 flags 0000 next 0000

Now, this code:
LTRACE_DO(virtio_dump_desc(desc));

yields:
[00015.387] 02151.02581> vring descriptor 0x6fbd384f71f0:
[addr=0x4a18600, len=1125, flags=0000, next=0000]

Change-Id: I33c1dbe76038b1c132baf65f4a45b67632ff3f52


# 3763de77 23-Jun-2017 Abdulla Kamar <abdulla@google.com>

[virtio] Move more block structures to ulib.

This allows us to reuse these constants and structures for the
hypervisor.

Change-Id: I4d5c4bb512c11f97e82cf739f9b42f87bbfeda16


# 419b8943 15-Jun-2017 George Kulakowski <kulakowski@google.com>

[dev][hifi][virtio][misc] Use MX_OK and MX_ERR_*

Change-Id: I24028af1027df43053be4d5b53150a19eab3ad6d


# a6ffebad 14-Jun-2017 Brian Swetland <swetland@google.com>

[ddk][block] new protocol support (3 of n)

Convert MX_PROTOCOL_BLOCK_CORE providers and consumers to the
new style protocol interface.

Change-Id: I3c2b190bade3cb18bfe6b32027715554a74dcf98


# d6c6f3bd 10-Jun-2017 Mike Voydanoff <voydanoff@google.com>

[udev][virtio] Move to system/dev/bus/

Change-Id: If774aaef5040c31b6ee76dad1aa8bac30165f045