[ipxe-devel] [PATCH v2 0/4] Implement virtio 1.0 support

Ladi Prosek lprosek at redhat.com
Mon Mar 14 14:48:21 UTC 2016


The goal here is to support booting from modern and transitional
virtio-net devices using the new virtio 1.0 protocol. The code
strives to comply with the virtio 1.0 spec and is heavily inspired
by the Linux kernel implementation.

Changes from v1:

* removed the packed attribute from virtio structures

* notification cap is now always mapped per queue - results in
  one more ioremap call but eliminates special case code

* only sizeof(struct virtio_net_config) instead of PAGE_SIZE
  of the device cap is mapped

* the config cap is now looked for and required

* vpm_ioread* and vpm_iowrite* support memory, port I/O, and PCI
  config space access through the config cap as a fallback, and
  are not declared inline anymore

* extra parameter is now used by virtnet_probe_modern instead of
  specific error code to indicate that a 1.0 device was found

* device initialization follows the spec - note that reset,
  ACKNOWLEDGE, and DRIVER happen in virtnet_probe_modern and the
  rest in virtnet_open_modern

* nits, comments, and typos here and there

 src/drivers/bus/pciextra.c     |  54 +++++--
 src/drivers/bus/virtio-pci.c   | 324 ++++++++++++++++++++++++++++++++++++++++-
 src/drivers/bus/virtio-ring.c  |  15 +-
 src/drivers/net/virtio-net.c   | 254 ++++++++++++++++++++++++++++++--
 src/drivers/net/virtio-net.h   |  18 +++
 src/include/ipxe/errfile.h     |   1 +
 src/include/ipxe/pci.h         |   2 +
 src/include/ipxe/virtio-pci.h  | 207 ++++++++++++++++++++++++++
 src/include/ipxe/virtio-ring.h |  12 +-
 9 files changed, 852 insertions(+), 35 deletions(-)

[PATCH v2 1/4] [pci] Add pci_find_next_capability
[PATCH v2 2/4] [virtio] Add virtio 1.0 constants and data structures
[PATCH v2 3/4] [virtio] Add virtio 1.0 PCI support
[PATCH v2 4/4] [virtio] Add virtio-net 1.0 support




More information about the ipxe-devel mailing list