[SLOF] [PATCH v2 04/19] virtio: introduce helper for initializing virt queue
thuth at redhat.com
Thu Jan 21 18:27:21 AEDT 2016
On 21.01.2016 07:08, Nikunj A Dadhania wrote:
> Alexey Kardashevskiy <aik at ozlabs.ru> writes:
>> On 01/21/2016 12:12 AM, Thomas Huth wrote:
>>> On 20.01.2016 13:10, Nikunj A Dadhania wrote:
>>>> The routine takes care to allocate and set the queue address in the
>>>> device. Add these calls in virtio-net, virtio-blk and virtio-9p.
>>>> With the lack of this routine, devices like virtio-blk and virtio-9p did
>>>> not do a device reset in the driver initialization code. This helper
>>>> will fix that problem
>>>> Change the signature of virtio_set_qaddr, accepting queue address as
>>>> unsigned long argumet.
>>>> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
>>>> diff --git a/lib/libvirtio/virtio-9p.c b/lib/libvirtio/virtio-9p.c
>>>> index 5a5fd01..81cedb9 100644
>>>> --- a/lib/libvirtio/virtio-9p.c
>>>> +++ b/lib/libvirtio/virtio-9p.c
>>>> @@ -19,6 +19,7 @@
>>>> #include "virtio-9p.h"
>>>> #include "p9.h"
>>>> +struct vqs vq;
>>> Defining this as global sounds wrong - what if there is more than one
>>> virtio device?
>> Can SLOF possibly work with more than a single boot device at the time?
> The open client interface does provide such interface where there can be
> multiple device open.
Right, it's unlikely that it happens, but it is possible. Think of a
secondary bootloader (like an enhanced version of grub for example) that
opens multiple network interfaces to listen for DHCP messages on all
interfaces simultaneously and also scans the hard disks for bootable
kernels in the background ...
More information about the SLOF