Re: Looking for guidance on using virtqueues and virtio devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/12/2024 11:35 AM, Doug Miller wrote:
On 6/11/2024 3:41 PM, Doug Miller wrote:
We are adding support for a new adapter to the hfi1 driver. This new
adapter supports SR-IOV and we need a way to communicate between VFs
and PFO. There are some resources that need to be requested from the
VFs and some notifications needed from PF0 to the VFs. I am looking
at using virtqueues to allow a VF running in a VM to communicate with
PF0 on the host, but am not sure how virtio devices/drivers should be
used for this. Is there a general-purpose message-passing virtio
device that can be used for this? Or do we have to create a new
device specifically for our driver to use? Or is there some other
communication mechanism that is better suited for this?

Thanks,
Doug

It looks like rpmsg (over virtio) may be what we're looking for. Is
this the kind of thing rpmsg is suited for? Communication between
drivers running in different "realms"?

I've been trying to learn more about rpmsg and how to use it for what we
need. It appears to me that each guest (VFx) would operate as an rpmsg
driver, and the host (PF0) would be an rpmsg device(s). However, I'm not
finding documentation or examples on how to setup and use an rpmsg
device inside Linux, in spite of finding CONFIG_RPMSG (etc.), which
seems to enable the related interfaces. There is an example of an rpmsg
driver.

Is this the right approach for what we need to do? Are there any
examples of using the rpmsg device interfaces in Linux? Is there
documentation on these interfaces?

Also, I see some interfaces (such as rpmsg_send()) that have comments
like "Can only be called from process context (for now)". Is this still
a restriction and what do these routines do that requires process context?

Thanks,
Doug

External recipient





[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux