#
6d42b430 |
|
03-Oct-2023 |
Jérôme Duval <jerome.duval@gmail.com> |
virtio: support modern devices fixes #17239 #17238 Change-Id: Ia5b6347110a60fab18852079b30dca6301010474 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6995 Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
|
#
d8e1fd6e |
|
18-Mar-2020 |
Jérôme Duval <jerome.duval@gmail.com> |
virtio: add clear_feature hook. Change-Id: I282ffc65a7bd692145626ab4272c5df4a792e9d4 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2383 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
#
9a2911ca |
|
01-Sep-2019 |
Michael Lotz <mmlr@mlotz.ch> |
virtio: Rework queue_dequeue to return a boolean. It previously returned the cookie directly, which made it impossible to distinguish between a NULL cookie and the function not having anything to dequeue. This lead to some code setting a cookie that was not actually used. Return the dequeue status as a boolean and provide the cookie with an optionally handed in pointer instead and adjust all users. Change-Id: Iaac1726ac4bc7ae42bb96b8f0915852b6def5822 Reviewed-on: https://review.haiku-os.org/c/haiku/+/1814 Reviewed-by: Jérôme Duval <jerome.duval@gmail.com> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
#
2f211cce |
|
16-Nov-2018 |
Michael Lotz <mmlr@mlotz.ch> |
virtio: Replace size return with usedLength in queue_dequeue. The size was in fact the count of physical entries that were used. That number must necessarily be the same as the number given when adding to the queue, so that number isn't really interesting. Consequently none of the users of that API made use of it. Return the used length instead, which is the way virtio signals how much valid data resides in the dequeued buffer. This is for example important to know the frame length of incoming packets in virtio_net.
|
#
61cd7e85 |
|
21-Apr-2018 |
Jérôme Duval <jerome.duval@gmail.com> |
virtio: add API to uninit a device. * free interrupts, free queues, return to init state. * this will be used by virtio_net on interface uninit. Change-Id: I7c1e6facc37cf6bfe19628576fdf2c0bac9e5c38
|
#
6e82e428 |
|
16-Apr-2018 |
Jérôme Duval <jerome.duval@gmail.com> |
virtio: refactor to have a handler per queue. * enable to iterate on available entries in one interrupt call. * negociate -> negotiate, (void *) -> (void* ), thanks axel and philippe! Change-Id: Ie2d290797abcbf4c0f3cb5bfff71d091bb800fa6
|
#
33f263cb |
|
16-Sep-2013 |
Jerome Duval <jerome.duval@gmail.com> |
virtio: add queue_is_full(), queue_is_empty(), queue_size() hooks.
|
#
b5ccadd7 |
|
23-Jul-2013 |
Jérôme Duval <jerome.duval@gmail.com> |
Virtio: implemented indirect descriptors feature. * indirect descriptors count hardcoded to 128. * already activated for virtio_block driver.
|
#
2f2f475b |
|
18-Jul-2013 |
Jérôme Duval <jerome.duval@gmail.com> |
virtio*: remove trailing spaces
|
#
ed4a8e4d |
|
17-Jul-2013 |
Jérôme Duval <jerome.duval@gmail.com> |
virtio: changed a bit the driver API by adding a driverCookie. * the processing of requests in drivers is eased a bit with this change, but this could be improved for instance by enabling a driver to dequeue items in a service thread instead of the interrupt handler. * made a few methods const.
|
#
6bbf9c9d |
|
26-May-2013 |
Jérôme Duval <jerome.duval@gmail.com> |
Virtio: added drivers for PCI busses, bus manager and block device. * the Virtio PCI bus driver exposes a Virtio controller to the Virtio bus manager, which in turn exposes a Virtio device consumed by Virtio drivers. Drivers follow the new driver model. * virtio_block handles Virtio block devices under disk/virtual/virtio_block/x/raw. * Here is the Qemu command line option for Virtio disk devices: -drive file=haiku.image,if=virtio * the PCI bus driver currently supports only legacy interrupts (no MSI(-X) yet). * There is room for improvements in the bus manager: - it notifies the host for each queued request, which isn't optimal. - transfer descriptors should probably be simply preallocated (they are nicely leaked at the moment). - indirect descriptors are not supported yet. and in the block driver: - get the id of the disk. - implements flushing the cache. - improves dma restrictions. - do_io() should use a page for header descriptors instead of malloc(), which could cross boundaries. * The device manager tries to guess the driver based on the PCI device type, this implies having to declare the "busses/virtio" path for each possible type provided by Virtio. Thus future driver additions might require patching the device manager. * virtio.h is still private, the API is subject to changes. * virtio_pci.h, virtio_blk.h, virtio_ring.h are copied unchanged from FreeBSD.
|
#
33f263cb01e82be571639584a3fe6a690b583467 |
|
16-Sep-2013 |
Jerome Duval <jerome.duval@gmail.com> |
virtio: add queue_is_full(), queue_is_empty(), queue_size() hooks.
|
#
b5ccadd7c26d425ce2d20050e3096d11c664f0e7 |
|
23-Jul-2013 |
Jérôme Duval <jerome.duval@gmail.com> |
Virtio: implemented indirect descriptors feature. * indirect descriptors count hardcoded to 128. * already activated for virtio_block driver.
|
#
2f2f475b1d35e32e2afdefe624686d8ab5936c35 |
|
18-Jul-2013 |
Jérôme Duval <jerome.duval@gmail.com> |
virtio*: remove trailing spaces
|
#
ed4a8e4d11d7972d6fb6f025c108915ad06c73af |
|
17-Jul-2013 |
Jérôme Duval <jerome.duval@gmail.com> |
virtio: changed a bit the driver API by adding a driverCookie. * the processing of requests in drivers is eased a bit with this change, but this could be improved for instance by enabling a driver to dequeue items in a service thread instead of the interrupt handler. * made a few methods const.
|
#
6bbf9c9da977b2ea9d1caf36a867d320de81a836 |
|
26-May-2013 |
Jérôme Duval <jerome.duval@gmail.com> |
Virtio: added drivers for PCI busses, bus manager and block device. * the Virtio PCI bus driver exposes a Virtio controller to the Virtio bus manager, which in turn exposes a Virtio device consumed by Virtio drivers. Drivers follow the new driver model. * virtio_block handles Virtio block devices under disk/virtual/virtio_block/x/raw. * Here is the Qemu command line option for Virtio disk devices: -drive file=haiku.image,if=virtio * the PCI bus driver currently supports only legacy interrupts (no MSI(-X) yet). * There is room for improvements in the bus manager: - it notifies the host for each queued request, which isn't optimal. - transfer descriptors should probably be simply preallocated (they are nicely leaked at the moment). - indirect descriptors are not supported yet. and in the block driver: - get the id of the disk. - implements flushing the cache. - improves dma restrictions. - do_io() should use a page for header descriptors instead of malloc(), which could cross boundaries. * The device manager tries to guess the driver based on the PCI device type, this implies having to declare the "busses/virtio" path for each possible type provided by Virtio. Thus future driver additions might require patching the device manager. * virtio.h is still private, the API is subject to changes. * virtio_pci.h, virtio_blk.h, virtio_ring.h are copied unchanged from FreeBSD.
|