Piotr Tworek 643747b912 os: Refactor VirtIO::Queue implementation.
The key changes in this patch are:
* Buffer allocation is moved into a separate Buffer_pool helper. The
  implementation of the buffer allocation strategy does not change.
  The helper allocates a single RAM dataspace and splits it in multiple,
  equally sized chunks.
* Management of main descriptor ring is enacapsulated in Descriptor_ring
  helper class.
* Use separate RAM dataspaces for descriptor rings and buffers.
  Previously both of them were packed into a single dataspace. This
  might have been more RAM efficient, but IMO it made the code uglier and
  harder to understand.
* All of the VirtIO::Queue members are now initialized on the class member
  initializer list. This is possible due to previously listed changes.
* Since all VirtIO::Queue members are initalized on member initalizer
  list, some additional ones can be marked as const, ex _avail, _used ring
  pointers.
* Move descriptor writing code into a common method used by both
  write_data and write_data_read_reply members. This avoids some code
  duplication between those methods.
* Get rid of request_irq argument that most public VirtIO::Queue methods
  accept. None of the existing drivers use it and I doubt this will
  change any time soon.
* Use Genode namespace by default in Virtio.

This patch also fixes at least one bug that I discovered while working
on VirtIO block device driver. Namely, when chaining descriptors only the
first descriptor in the chain should be exposed in the available ring.

Issue #4347
2021-12-17 15:04:48 +01:00
..
2021-12-17 15:04:45 +01:00
2021-12-17 15:04:45 +01:00
2020-07-13 11:33:13 +02:00
2021-12-17 15:04:45 +01:00
2020-07-30 08:49:23 +02:00
2021-12-17 15:04:45 +01:00
2017-03-24 16:19:56 +01:00
2019-01-30 13:49:54 +01:00
2021-12-17 15:04:45 +01:00
2021-12-17 15:04:45 +01:00
2021-12-17 15:04:45 +01:00
2021-06-25 11:41:45 +02:00
2021-12-17 15:04:45 +01:00
2021-12-17 15:04:45 +01:00
2020-04-17 12:40:12 +02:00
2021-12-17 15:04:45 +01:00
2021-12-17 15:04:45 +01:00
2021-12-17 15:04:45 +01:00
2021-12-17 15:04:45 +01:00