1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-13 15:42:08 +00:00
serenity/Kernel/Bus/VirtIO
Liav A 3fb289e27d Kernel/PCI: Don't hold spinlocks when doing fast device enumeration
Instead, hold the lock while we copy the contents to a stack-based
Vector then iterate on it without any locking.

Because we rely on heap allocations, we need to propagate errors back
in case of OOM condition, therefore, both PCI::enumerate API function
and PCI::Access::add_host_controller_and_enumerate_attached_devices use
now a ErrorOr<void> return value to propagate errors. OOM Error can only
occur when enumerating the m_device_identifiers vector under a spinlock
and trying to expand the temporary Vector which will be used locklessly
to actually iterate over the PCI::DeviceIdentifiers objects.
2022-03-14 22:39:09 +01:00
..
Console.cpp Kernel: Init receive buffer for dynamically created VirtIO console port 2022-02-20 20:32:22 -08:00
Console.h Kernel: Use operator ""sv in all class_name() implementations 2021-10-03 13:36:10 +02:00
ConsolePort.cpp Kernel: Make VirtIO::ConsolePort construction OOM-fallible 2022-01-26 22:07:01 +00:00
ConsolePort.h Kernel: Make VirtIO::ConsolePort construction OOM-fallible 2022-01-26 22:07:01 +00:00
Device.cpp Kernel/PCI: Don't hold spinlocks when doing fast device enumeration 2022-03-14 22:39:09 +01:00
Device.h Kernel: Stop allocating VirtIO configuration structs on the heap 2022-02-03 23:33:20 +01:00
Queue.cpp Kernel: Make VirtIO::Queue construction fallible 2022-01-21 16:27:21 +01:00
Queue.h Kernel: Make VirtIO::Queue construction fallible 2022-01-21 16:27:21 +01:00
RNG.cpp Kernel/PCI: Propagate usage of DeviceIdentifier everywhere 2021-09-29 11:24:33 +02:00
RNG.h Kernel: Fix copy paste in VirtIO::RNG::class_name() 2021-10-03 13:36:10 +02:00