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

Ladi Prosek lprosek at redhat.com
Wed Mar 9 20:39:44 UTC 2016


On Wed, Mar 9, 2016 at 9:25 PM, Michael S. Tsirkin <mst at redhat.com> wrote:
> Thanks a lot for looking into this!
> I'll review early next week.
>
> On Wed, Mar 09, 2016 at 07:19:59PM +0100, Ladi Prosek wrote:
>> The goal here is to support booting from modern only (non-transitional)
>> virtio-net devices.
>
> Side-note: it is preferable to use transitional
> devices through the modern interface, as well.

That's actually the case in this series, apologies for the inaccurate
wording. If the VIRTIO_PCI_CAP_COMMON_CFG capability is found, the
driver uses the modern interface.

> Some advantages include:
>         - ability to work without enabling IO space (or even memory space)
>         - ability to reduce ring size, and generally lower memory consumption

Gotcha. I made no changes to the ring layout in this series in order
to keep it simple. My understanding is that minimizing the code size
here could be more important than optimizing run-time performance (the
driver ignores pretty much all virtio-net feature flags for example)
but I'm open to suggestions.

>> The code strives to comply with the virtio 1.0 spec
>> and is heavily inspired by the Linux kernel implementation.
>>
>> One notable divergence from Linux is the explicit differentiation
>> between port I/O and memory I/O due to the lack of __iomem in iPXE. See
>> struct virtio_pci_region for details.
>>
>>  src/drivers/bus/pciextra.c     |  54 ++++++---
>>  src/drivers/bus/virtio-pci.c   | 213 ++++++++++++++++++++++++++++++++-
>>  src/drivers/bus/virtio-ring.c  |  12 +-
>>  src/drivers/net/virtio-net.c   | 259 +++++++++++++++++++++++++++++++++++++++--
>>  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  | 231 ++++++++++++++++++++++++++++++++++++
>>  src/include/ipxe/virtio-ring.h |   9 ++
>>  9 files changed, 769 insertions(+), 30 deletions(-)
>>
>> [PATCH 1/4] [pci] Add pci_find_next_capability
>> [PATCH 2/4] [virtio] Add virtio 1.0 constants and data structures
>> [PATCH 3/4] [virtio] Add virtio 1.0 PCI support
>> [PATCH 4/4] [virtio] Add virtio-net 1.0 support



More information about the ipxe-devel mailing list