All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/27] virtio: Introduce VirtIO driver support
@ 2018-09-23 13:41 Bin Meng
  2018-09-23 13:41 ` [U-Boot] [PATCH 01/27] dm: core: Allow uclass to set up a device's child after it is probed Bin Meng
                   ` (27 more replies)
  0 siblings, 28 replies; 82+ messages in thread
From: Bin Meng @ 2018-09-23 13:41 UTC (permalink / raw)
  To: u-boot

This series brings in VirtIO driver support in U-Boot. The work is based
on Tuomas's virtio support on QEMU ARM targets.

VirtIO is a virtualization standard for network and disk device drivers
where just the guest's device driver "knows" it is running in a virtual
environment, and cooperates with the hypervisor. This enables guests to
get high performance network and disk operations, and gives most of the
performance benefits of paravirtualization. In the U-Boot case, the
guest is U-Boot itself, while the virtual environment are normally QEMU
targets like ARM, RISC-V and x86.

Both VirtIO MMIO and PCI transport options are supported. Only VirtIO
network and block device drivers are supported for now.

The following QEMU targets are supported.

  - qemu_arm_defconfig
  - qemu_arm64_defconfig
  - qemu-riscv32_defconfig
  - qemu-riscv64_defconfig
  - qemu-x86_defconfig
  - qemu-x86_64_defconfig

A new child_post_probe() uclass driver method is introduced to better
support virtio device driver. This also changes BLK uclass driver to
supply a post_probe() method which calls part_init(), so that we can
avoid duplicating such call in every BLK driver.

Not every checkpatch warning reported was fixed, but I tried to fix as
many as possible which makes sense.

This series needs to be applied after the risc-v QEMU series is applied.

This series is available at u-boot-x86/virtio-working for testing.
Note the branch already contains the risc-v QEMU series plus one network
stack fix to make virtio-net driver happy.


Bin Meng (22):
  dm: core: Allow uclass to set up a device's child after it is probed
  dm: Add a new uclass driver for VirtIO transport devices
  virtio: Add virtio over mmio transport driver
  test: dm: blk: Correct blk_base test case
  sandbox: blk: Switch to use platdata_auto_alloc_size for the driver
    data
  efi_driver: blk: Switch to use platdata_auto_alloc_size for the driver
    data
  blk: Call part_init() in the post_probe() method
  blk: Drop blk_prepare_device()
  blk: Make blk_next_free_devnum() public
  arm: qemu: Add a Kconfig in the board directory
  arm: qemu: Enumerate virtio bus during early boot
  riscv: qemu: Enumerate virtio bus during early boot
  riscv: qemu: Include some useful commands
  kconfig: Introduce HAVE_ARCH_IOMAP
  x86: Implement arch-specific io accessor routines
  virtio: Add virtio over pci transport driver
  x86: qemu: Imply virtio PCI transport and device drivers
  dm: pci: Add APIs to find next capability and extended capability
  test: dm: pci: Add cases for finding next PCI capability APIs
  virtio: pci: Support non-legacy PCI transport device
  virtio: net: Support non-legacy device
  doc: Document virtio support

Tuomas Tynkkynen (5):
  virtio: Add codes for virtual queue/ring management
  virtio: Add net driver support
  blk: Introduce IF_TYPE_VIRTIO
  virtio: Add block driver support
  virtio: cmd: Add virtio command for virtio block devices

 arch/Kconfig                            |   1 +
 arch/arm/Kconfig                        |   1 +
 arch/x86/include/asm/io.h               |  66 +++
 board/emulation/qemu-arm/Kconfig        |  12 +
 board/emulation/qemu-arm/qemu-arm.c     |   7 +
 board/emulation/qemu-riscv/Kconfig      |  11 +
 board/emulation/qemu-riscv/qemu-riscv.c |   7 +
 board/emulation/qemu-x86/Kconfig        |   3 +
 cmd/Kconfig                             |   7 +
 cmd/Makefile                            |   1 +
 cmd/sata.c                              |   9 -
 cmd/virtio.c                            |  37 ++
 common/usb_storage.c                    |   4 +-
 configs/qemu_arm64_defconfig            |   1 -
 configs/qemu_arm_defconfig              |   1 -
 disk/part.c                             |   6 +
 doc/README.virtio                       | 247 ++++++++++++
 drivers/Kconfig                         |   2 +
 drivers/Makefile                        |   1 +
 drivers/block/blk-uclass.c              |  25 +-
 drivers/block/ide.c                     |   2 -
 drivers/block/sandbox.c                 |  17 +-
 drivers/core/uclass.c                   |  13 +-
 drivers/mmc/mmc.c                       |   3 -
 drivers/nvme/nvme.c                     |   1 -
 drivers/pci/pci-uclass.c                |  48 ++-
 drivers/scsi/scsi.c                     |   1 -
 drivers/virtio/Kconfig                  |  43 ++
 drivers/virtio/Makefile                 |  10 +
 drivers/virtio/virtio-uclass.c          | 333 +++++++++++++++
 drivers/virtio/virtio_blk.c             | 127 ++++++
 drivers/virtio/virtio_blk.h             | 129 ++++++
 drivers/virtio/virtio_mmio.c            | 413 +++++++++++++++++++
 drivers/virtio/virtio_mmio.h            | 129 ++++++
 drivers/virtio/virtio_net.c             | 236 +++++++++++
 drivers/virtio/virtio_net.h             | 268 ++++++++++++
 drivers/virtio/virtio_pci.h             | 173 ++++++++
 drivers/virtio/virtio_pci_legacy.c      | 420 +++++++++++++++++++
 drivers/virtio/virtio_pci_modern.c      | 612 ++++++++++++++++++++++++++++
 drivers/virtio/virtio_ring.c            | 356 ++++++++++++++++
 include/blk.h                           |  22 +-
 include/dm/uclass-id.h                  |   1 +
 include/dm/uclass.h                     |   4 +-
 include/linux/io.h                      |   4 +
 include/pci.h                           |  48 +++
 include/virtio.h                        | 694 ++++++++++++++++++++++++++++++++
 include/virtio_ring.h                   | 320 +++++++++++++++
 include/virtio_types.h                  |  24 ++
 lib/Kconfig                             |   6 +
 lib/efi_driver/efi_block_device.c       |  26 +-
 test/dm/blk.c                           |  27 +-
 test/dm/pci.c                           |  20 +
 52 files changed, 4882 insertions(+), 97 deletions(-)
 create mode 100644 board/emulation/qemu-arm/Kconfig
 create mode 100644 cmd/virtio.c
 create mode 100644 doc/README.virtio
 create mode 100644 drivers/virtio/Kconfig
 create mode 100644 drivers/virtio/Makefile
 create mode 100644 drivers/virtio/virtio-uclass.c
 create mode 100644 drivers/virtio/virtio_blk.c
 create mode 100644 drivers/virtio/virtio_blk.h
 create mode 100644 drivers/virtio/virtio_mmio.c
 create mode 100644 drivers/virtio/virtio_mmio.h
 create mode 100644 drivers/virtio/virtio_net.c
 create mode 100644 drivers/virtio/virtio_net.h
 create mode 100644 drivers/virtio/virtio_pci.h
 create mode 100644 drivers/virtio/virtio_pci_legacy.c
 create mode 100644 drivers/virtio/virtio_pci_modern.c
 create mode 100644 drivers/virtio/virtio_ring.c
 create mode 100644 include/virtio.h
 create mode 100644 include/virtio_ring.h
 create mode 100644 include/virtio_types.h

-- 
2.7.4

^ permalink raw reply	[flat|nested] 82+ messages in thread

end of thread, other threads:[~2018-10-22 23:09 UTC | newest]

Thread overview: 82+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-23 13:41 [U-Boot] [PATCH 00/27] virtio: Introduce VirtIO driver support Bin Meng
2018-09-23 13:41 ` [U-Boot] [PATCH 01/27] dm: core: Allow uclass to set up a device's child after it is probed Bin Meng
2018-09-27 13:41   ` Simon Glass
2018-10-11  5:14     ` Bin Meng
2018-09-23 13:42 ` [U-Boot] [PATCH 02/27] dm: Add a new uclass driver for VirtIO transport devices Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-10-11  9:08     ` Bin Meng
2018-09-27 22:10   ` Tuomas Tynkkynen
2018-10-11  9:09     ` Bin Meng
2018-09-23 13:42 ` [U-Boot] [PATCH 03/27] virtio: Add codes for virtual queue/ring management Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-10-11  9:50     ` Bin Meng
2018-10-12  0:00       ` Simon Glass
2018-09-27 22:11   ` Tuomas Tynkkynen
2018-10-02 15:46     ` Bin Meng
2018-09-23 13:42 ` [U-Boot] [PATCH 04/27] virtio: Add virtio over mmio transport driver Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 05/27] virtio: Add net driver support Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-27 22:12   ` Tuomas Tynkkynen
2018-10-02 16:10     ` Bin Meng
2018-10-22 23:09   ` Joe Hershberger
2018-09-23 13:42 ` [U-Boot] [PATCH 06/27] test: dm: blk: Correct blk_base test case Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 07/27] sandbox: blk: Switch to use platdata_auto_alloc_size for the driver data Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 08/27] efi_driver: " Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 09/27] blk: Call part_init() in the post_probe() method Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 10/27] blk: Drop blk_prepare_device() Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 11/27] blk: Make blk_next_free_devnum() public Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 12/27] blk: Introduce IF_TYPE_VIRTIO Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 13/27] virtio: Add block driver support Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-27 22:12     ` Tuomas Tynkkynen
2018-09-23 13:42 ` [U-Boot] [PATCH 14/27] virtio: cmd: Add virtio command for virtio block devices Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 15/27] arm: qemu: Add a Kconfig in the board directory Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 16/27] arm: qemu: Enumerate virtio bus during early boot Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-10-11 13:21     ` Bin Meng
2018-09-27 22:13   ` Tuomas Tynkkynen
2018-10-11 13:28     ` Bin Meng
2018-09-23 13:42 ` [U-Boot] [PATCH 17/27] riscv: " Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 18/27] riscv: qemu: Include some useful commands Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-27 22:14   ` Tuomas Tynkkynen
2018-10-02 16:03     ` Bin Meng
2018-09-23 13:42 ` [U-Boot] [PATCH 19/27] kconfig: Introduce HAVE_ARCH_IOMAP Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 20/27] x86: Implement arch-specific io accessor routines Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-10-11 13:33     ` Bin Meng
2018-09-23 13:42 ` [U-Boot] [PATCH 21/27] virtio: Add virtio over pci transport driver Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-10-11 13:39     ` Bin Meng
2018-09-23 13:42 ` [U-Boot] [PATCH 22/27] x86: qemu: Imply virtio PCI transport and device drivers Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 23/27] dm: pci: Add APIs to find next capability and extended capability Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 24/27] test: dm: pci: Add cases for finding next PCI capability APIs Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-09-23 13:42 ` [U-Boot] [PATCH 25/27] virtio: pci: Support non-legacy PCI transport device Bin Meng
2018-09-27 13:42   ` Simon Glass
2018-10-11 13:41     ` Bin Meng
2018-09-23 13:42 ` [U-Boot] [PATCH 26/27] virtio: net: Support non-legacy device Bin Meng
2018-09-27 13:43   ` Simon Glass
2018-10-15 21:59   ` Joe Hershberger
2018-09-23 13:42 ` [U-Boot] [PATCH 27/27] doc: Document virtio support Bin Meng
2018-09-27 13:43   ` Simon Glass
2018-09-27 13:43 ` [U-Boot] [PATCH 00/27] virtio: Introduce VirtIO driver support Simon Glass
2018-09-27 22:19   ` Tuomas Tynkkynen
2018-10-02 11:21     ` Simon Glass
2018-10-04  7:00       ` Bin Meng
2018-10-09 16:20         ` Simon Glass
2018-10-10 15:35           ` Bin Meng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.