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

Stefan Hajnoczi stefanha at redhat.com
Tue Mar 15 18:02:04 UTC 2016


On Mon, Mar 14, 2016 at 03:48:21PM +0100, Ladi Prosek wrote:
> 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

Looks good.  I posted a few small comments but the overall approach
makes sense.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20160315/52e6419a/attachment.sig>


More information about the ipxe-devel mailing list