summaryrefslogtreecommitdiff
path: root/Kernel/WorkQueue.cpp
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-04-15 19:39:48 +1000
committerAndreas Kling <kling@serenityos.org>2021-04-17 10:21:23 +0200
commitd1f7a2f9a50f42db2be05507978046935d5eba1f (patch)
tree0197da94555c2dbda2d4ef1ccddf7f3c852f096f /Kernel/WorkQueue.cpp
parentacdd1424bc8c76e739d11555b2ef258872ddf32f (diff)
downloadserenity-d1f7a2f9a50f42db2be05507978046935d5eba1f.zip
Kernel: Finish base implementation of VirtQueues
This commit includes a lot of small changes and additions needed to finalize the base implementation of VirtIOQueues and VirtDevices: * The device specific driver implementation now has to handle setting up the queues it needs before letting the base device class know it finised initialization * Supplying buffers to VirtQueues is now done via ScatterGatherLists instead of arbitary buffer pointers - this ensures the pointers are physical and allows us to follow the specification in regards to the requirement that individual descriptors must point to physically contiguous buffers. This can be further improved in the future by implementating support for the Indirect-Descriptors feature (as defined by the specification) to reduce descriptor usage for very fragmented buffers. * When supplying buffers to a VirtQueue the driver must supply a (temporarily-)unique token (usually the supplied buffer's virtual address) to ensure the driver can discern which buffer has finished processing by the device in the case in which the device does not offer the F_IN_ORDER feature. * Device drivers now handle queue updates (supplied buffers being returned from the device) by implementing a single pure virtual method instead of setting a seperate callback for each queue * Two new VirtQueue methods were added to allow the device driver to either discard or get used/returned buffers from the device by cleanly removing them off the descriptor chain (This also allows the VirtQueue implementation to reuse those freed descriptors) This also includes the necessary changes to the VirtIOConsole implementation to match these interface changes. Co-authored-by: Sahan <sahan.h.fernando@gmail.com>
Diffstat (limited to 'Kernel/WorkQueue.cpp')
0 files changed, 0 insertions, 0 deletions