| be79a2c6 | 21-Jan-2021 |
Jessica Clarke <[email protected]> |
virtio_mmio: Fix V1 device probing spec conformance (section 4.2.3.1.1)
We must check MagicValue not just Version before anything else, and then we must check DeviceID and immediately abort if zero
virtio_mmio: Fix V1 device probing spec conformance (section 4.2.3.1.1)
We must check MagicValue not just Version before anything else, and then we must check DeviceID and immediately abort if zero (and this must not be an error).
Do all this when probing rather than at the start of attaching as that's where this belongs, and provides a clear boundary between the device detection and device initialisation parts of the specified driver initialisation process. This also means we don't create empty device instances for placeholder devices, reducing clutter on systems that pre-allocate a large number, such as QEMU's AArch64 virt machine (which provides 32).
Reviewed by: bryanv Differential Revision: https://reviews.freebsd.org/D28070
show more ...
|