[U-Boot] [PATCH 21/27] virtio: Add virtio over pci transport driver

Simon Glass sjg at chromium.org
Thu Sep 27 13:42:49 UTC 2018


Hi Bin,

On 23 September 2018 at 06:42, Bin Meng <bmeng.cn at gmail.com> wrote:
> This adds a transport driver that implements UCLASS_VIRTIO for
> virtio over pci, which is commonly used on x86.
>
> It only supports the legacy interface of the pci transport, which
> is the default device that QEMU emulates.
>
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> ---
>
>  drivers/virtio/Kconfig      |   8 +
>  drivers/virtio/Makefile     |   1 +
>  drivers/virtio/virtio_pci.c | 420 ++++++++++++++++++++++++++++++++++++++++++++
>  drivers/virtio/virtio_pci.h | 173 ++++++++++++++++++
>  4 files changed, 602 insertions(+)
>  create mode 100644 drivers/virtio/virtio_pci.c
>  create mode 100644 drivers/virtio/virtio_pci.h

Reviewed-by: Simon Glass <sjg at chromium.org>

vring_create_virtqueue() should return an error I think - you assume -ENOMEM

That is a huge table of PCI devices. Can you use a class instead?

Regards,
Simon


More information about the U-Boot mailing list