[SLOF] [PATCH v5 00/23]

Nikunj A Dadhania nikunj at linux.vnet.ibm.com
Fri Jan 29 22:19:00 AEDT 2016


Subject: [PATCH v5 00/24] Generic virtio 1.0 with block and network support

Following patch series enables virtio 1.0 support in SLOF.
Currently, two drivers are supported virtio-blk and virtio-net.

Patches are organised in following order:

    01-02: Fix gcc warning (-Wextra) in blk and net driver
       03: PCI byte read/write routines
    04-05: Fix code style
    03-14: Virtio code improvements and re-organization
    15-21: Enables generic virtio 1.0 functionality.
           Start using legacy structure and gets rid of virtio.fs
    22-23: Converts virtio-blk and virtio-net drivers to 1.0

Changelog:
v4:
* Move cpu_to_modern{16,32,64} and vice versa to virtio-internal.h
* Start using legacy structure variable in place of dev->base for 
  legacy devices.
* Remove virtio.fs as the functionality becomes redundant and 
  change the code accordingly to adapt.
* Fix missing address translation in ->is_io condition.
* Add comments and copyright in non-transactional device files.
* Change the prototype of virtioblk_read to fix gcc warning.

v3:
* Drop device-id hack in pci-device.fs, instead use separate 
  device files
* Change rx_size type to uint32
* Combine the set/get features api
* Re-organize virtio-net to drop mac-address in open call
* Remove type variable from virtio_device (VIRTIO_TYPE_PCI)
* Introduce virtio_cap_set_base_addr: common routine that can 
  be used by legacy and modern device to set the base address

v2:
* split patch 08 to different patches
* Set local-mac-address only once
* rename virtio_{read,write}64 to virtio_pci_{read,write}64
* Remove q_size magic
* Introduce cpu_to_modern{16,32,64} and vice versa
* Use cpu_to_le32 in place of bswap32
* Consistently use int type and 0/-1 as return
* Not required to set running = 0 in error case

v1:
* Patch re-organisation as suggested by alexey
* Separated out coding style changes and code re-organization
* Feature negotiation now sets and checks FEATURES_OK bit
* Added virtio_get_status for feature negotiation
* Added missing notify_off_mul in SLOF virtio_device structure
* virtio-net - net_hdr_size was missing at one place
* squashed all the api conversion to one single patch
* Introduced and enabled virtio_parse_capabilities in 
  one single patch. Also, disabled is_modern until the 
  driver is ready.

ToDo:
* Convert virtio-scsi and virtio-9p drivers

Nikunj A Dadhania (23):
  virtio-blk: fix gcc warnings (-Wextra)
  virtio-net: fix gcc warnings (-Wextra)
  pci: add byte read/write helper routines
  fix code style in byteorder.h
  virtio: fix code style/design issues.
  virtio: introduce helper for initializing virt queue
  virtio-{blk,9p}: enable resetting the device
  virtio-blk: add helpers for filling descriptors
  virtio-{net,blk,scsi,9p}: use status variable
  virtio-net: use virtio_fill_desc
  virtio-net: replace vq array with vq_{tx,rx}
  virtio-net: make net_hdr_size a variable
  virtio-net: move setup-mac to the open routine
  virtio: get rid of type variable in virtio_device
  virtio: add virtio 1.0 related struct and defines
  virtio: add 64-bit virtio helpers for 1.0
  virtio: make all virtio apis 1.0 aware
  virtio: update features set/get register accessor
  virtio: 1.0 guest features negotiation
  virtio: add and enable 1.0 device setup
  virtio: 1.0 helper to read 16/32/64 bit value
  virtio-blk: enable virtio 1.0
  virtio-net: enable virtio 1.0

 board-qemu/slof/Makefile                |   2 +
 board-qemu/slof/OF.fs                   |   4 -
 board-qemu/slof/pci-device_1af4_1001.fs |   9 -
 board-qemu/slof/pci-device_1af4_1009.fs |   9 -
 board-qemu/slof/pci-device_1af4_1041.fs |  15 ++
 board-qemu/slof/pci-device_1af4_1042.fs |  15 ++
 board-qemu/slof/virtio-block.fs         |   3 +-
 board-qemu/slof/virtio-fs.fs            |   3 +-
 board-qemu/slof/virtio-net.fs           |  33 ++-
 board-qemu/slof/virtio-scsi.fs          |   3 +-
 board-qemu/slof/virtio.fs               |  35 ---
 include/byteorder.h                     |  22 +-
 include/helpers.h                       |   2 +
 lib/libvirtio/p9.c                      |   2 +-
 lib/libvirtio/p9.h                      |   2 +-
 lib/libvirtio/virtio-9p.c               |  35 ++-
 lib/libvirtio/virtio-9p.h               |   2 +-
 lib/libvirtio/virtio-blk.c              | 100 ++++---
 lib/libvirtio/virtio-blk.h              |   2 +-
 lib/libvirtio/virtio-internal.h         |  48 ++++
 lib/libvirtio/virtio-net.c              | 200 +++++++-------
 lib/libvirtio/virtio-net.h              |  15 +-
 lib/libvirtio/virtio-scsi.c             | 163 ++++++------
 lib/libvirtio/virtio.c                  | 457 +++++++++++++++++++++++++++-----
 lib/libvirtio/virtio.code               |  23 +-
 lib/libvirtio/virtio.h                  |  59 ++++-
 lib/libvirtio/virtio.in                 |   2 +
 slof/helpers.c                          |  14 +
 28 files changed, 858 insertions(+), 421 deletions(-)
 create mode 100644 board-qemu/slof/pci-device_1af4_1041.fs
 create mode 100644 board-qemu/slof/pci-device_1af4_1042.fs
 delete mode 100644 board-qemu/slof/virtio.fs
 create mode 100644 lib/libvirtio/virtio-internal.h

-- 
2.5.0



More information about the SLOF mailing list