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.code | |
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.code')
-rw-r--r-- | lib/libvirtio/virtio.code | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libvirtio/virtio.code b/lib/libvirtio/virtio.code index 0c22ecc..8eec8f0 100644 --- a/lib/libvirtio/virtio.code +++ b/lib/libvirtio/virtio.code @@ -18,6 +18,11 @@ /******** core virtio ********/ +// : virtio-setup-vd ( -- dev ) +PRIM(virtio_X2d_setup_X2d_vd) + PUSH; TOS.a = virtio_setup_vd(); +MIRP + // : virtio-vring-size ( queuesize -- ringsize ) PRIM(virtio_X2d_vring_X2d_size) TOS.u = virtio_vring_size(TOS.u); |