mirror of
https://github.com/ipxe/ipxe
synced 2026-04-16 03:00:10 +03:00
[virtio] Add virtio 1.0 PCI support
This commit adds support for driving virtio 1.0 PCI devices. In addition to various helpers, a number of vpm_ functions are introduced to be used instead of their legacy vp_ counterparts when accessing virtio 1.0 (aka modern) devices. Signed-off-by: Ladi Prosek <lprosek@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
committed by
Michael Brown
parent
7b499f849e
commit
8a055a2a70
@@ -24,14 +24,15 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <ipxe/list.h>
|
||||
#include <ipxe/iobuf.h>
|
||||
#include <ipxe/netdevice.h>
|
||||
#include <ipxe/pci.h>
|
||||
#include <ipxe/if_ether.h>
|
||||
#include <ipxe/ethernet.h>
|
||||
#include <ipxe/virtio-ring.h>
|
||||
#include <ipxe/virtio-pci.h>
|
||||
#include <ipxe/virtio-ring.h>
|
||||
#include "virtio-net.h"
|
||||
|
||||
/*
|
||||
@@ -135,7 +136,7 @@ static void virtnet_enqueue_iob ( struct net_device *netdev,
|
||||
virtnet, iobuf, vq_idx );
|
||||
|
||||
vring_add_buf ( vq, list, out, in, iobuf, 0 );
|
||||
vring_kick ( virtnet->ioaddr, vq, 1 );
|
||||
vring_kick ( NULL, virtnet->ioaddr, vq, 1 );
|
||||
}
|
||||
|
||||
/** Try to keep rx virtqueue filled with iobufs
|
||||
|
||||
Reference in New Issue
Block a user