[SLOF] [PATCH v2 19/19] virtio: support virtio 1.0 only device ids
Alexey Kardashevskiy
aik at ozlabs.ru
Fri Jan 22 16:18:50 AEDT 2016
On 01/20/2016 11:10 PM, Nikunj A Dadhania wrote:
> After the transition, virtio device id will be numbered starting from
> 0x1041 instead of 0x1000. Adjust the pci device naming routine to pick
> up the right driver.
>
> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
> ---
> slof/fs/pci-device.fs | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/slof/fs/pci-device.fs b/slof/fs/pci-device.fs
> index 7b17758..708a0d4 100644
> --- a/slof/fs/pci-device.fs
> +++ b/slof/fs/pci-device.fs
> @@ -60,7 +60,14 @@ s" dma-function.fs" included
> s" pci-device_"
> my-space pci-vendor@ 4 int2str $cat
> s" _" $cat
> - my-space pci-device@ 4 int2str $cat
> + \ Special case virtio 1.0 only devices
> + \ The device ids are numbered starting from 1041
> + my-space pci-vendor@ 1AF4 = IF
> + my-space pci-device@ dup 1040 > IF 41 - THEN
> + 4 int2str $cat
> + ELSE
> + my-space pci-device@ 4 int2str $cat
> + THEN
> s" .fs" $cat
> ;
>
Is this simply to avoid creating new
board-qemu/slof/pci-device_1af4_1041.fs, etc? I would rather have those 3
extra files than this quite a hack.
--
Alexey
More information about the SLOF
mailing list