diff options
author | Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> | 2016-02-01 11:18:10 +0530 |
---|---|---|
committer | Alexey Kardashevskiy <aik@ozlabs.ru> | 2016-02-08 16:40:39 +1100 |
commit | f83299621cde03cd406cbb665fc5eb1f348afc9b (patch) | |
tree | 0fa0c612e57f74bbbe15490a560888dc0563ccb0 /lib/libvirtio/virtio-net.c | |
parent | 69a2f9ae1a191743acb3f68e6e0514eb65beb576 (diff) | |
download | SLOF-f83299621cde03cd406cbb665fc5eb1f348afc9b.zip SLOF-f83299621cde03cd406cbb665fc5eb1f348afc9b.tar.gz SLOF-f83299621cde03cd406cbb665fc5eb1f348afc9b.tar.bz2 |
virtio: add and enable 1.0 device setup
Introduce parsing routines for virtio capabilities. This would also
determine whether we need to function in legacy mode or virtio 1.0.
Update routine to start using the base address from the updated legacy
structure.
With the removal for base address setting in the Forth code and most of
the device setup happening in C code, code in virtio.fs is redundant.
Remove virtio.fs and move the allocation of the virtio_device structure
to the C code instead of the Forth code in individual files. Also, drop
the packed attribute for the virtio_{device,cap} structure. The
structure is not shared anymore.
Drivers need to negotiate the 1.0 feature capability before starting to
use 1.0. Disable it in all the drivers until 1.0 is enabled.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'lib/libvirtio/virtio-net.c')
-rw-r--r-- | lib/libvirtio/virtio-net.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libvirtio/virtio-net.c b/lib/libvirtio/virtio-net.c index 6eeb076..cce0bd7 100644 --- a/lib/libvirtio/virtio-net.c +++ b/lib/libvirtio/virtio-net.c @@ -68,7 +68,8 @@ static int virtionet_init_pci(struct virtio_device *dev) if (!dev) return -1; - virtiodev.base = dev->base; + /* Keep it disabled until the driver is 1.0 capable */ + virtiodev.is_modern = false; /* Reset device */ virtio_reset_device(&virtiodev); |