public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* How to create/use RPMSG-over-VIRTIO devices in Linux
@ 2024-09-03 15:52 Doug Miller
  2024-09-10 13:12 ` Doug Miller
  0 siblings, 1 reply; 15+ messages in thread
From: Doug Miller @ 2024-09-03 15:52 UTC (permalink / raw)
  To: Mathieu Poirier, Bjorn Andersson, linux-remoteproc,
	OFED mailing list
  Cc: Dalessandro, Dennis

I am trying to learn how to create an RPMSG-over-VIRTIO device (service)
in order to perform communication between a host driver and a guest
driver. The RPMSG-over-VIRTIO driver (client) side is fairly well
documented and there is a good example (starting point, at least) in
samples/rpmsg/rpmsg_client_sample.c.

I see that I can create an endpoint (struct rpmsg_endpoint) using
rpmsg_create_ept(), and from there I can use rpmsg_send() et al. and the
rpmsg_rx_cb_t cb to perform the communications. However, this requires a
struct rpmsg_device and it is not clear just how to get one that is
suitable for this purpose.

It appears that one or both of rpmsg_create_channel() and
rpmsg_register_device() are needed in order to obtain a device for the
specific host-guest communications channel. At some point, a "root"
device is needed that will use virtio (VIRTIO_ID_RPMSG) such that new
subdevices can be created for each host-guest pair.

In addition, building a kernel with CONFIG_RPMSG, CONFIG_RPMSG_VIRTIO,
and CONFIG_RPMSG_NS set, and doing a modprobe virtio_rpmsg_bus, seems to
get things setup but that does not result in creation of any "root"
rpmsg-over-virtio device. Presumably, any such device would have to be
setup to use a specific range of addresses and also be tied to
virtio_rpmsg_bus to ensure that virtio is used.

It is also not clear if/how register_rpmsg_driver() will be required on
the rpmsg driver side, even though the sample code does not use it.

So, first questions are:

* Am I looking at the correct interfaces in order to create the host
rpmsg device side?
* What needs to be done to get a "root" rpmsg-over-virtio device created
(if required)?
* How is a rpmsg-over-virtio device created for each host-guest driver
pair, for use with rpmsg_create_ept()?
* Does the guest side (rpmsg driver) require any special handling to
plug-in to the host driver (rpmsg device) side? Aside from using the
correct addresses to match device side.

Thanks,
Doug

External recipient

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-09-23 13:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03 15:52 How to create/use RPMSG-over-VIRTIO devices in Linux Doug Miller
2024-09-10 13:12 ` Doug Miller
2024-09-10 15:13   ` Mathieu Poirier
2024-09-10 15:43     ` Doug Miller
2024-09-11 16:12       ` Mathieu Poirier
2024-09-11 17:24         ` Doug Miller
2024-09-12 15:10           ` Mathieu Poirier
2024-09-13 11:46             ` Doug Miller
2024-09-13 14:39               ` Mathieu Poirier
2024-09-15 16:58                 ` Jason Gunthorpe
2024-09-16 13:38                   ` Doug Miller
2024-09-20 12:45                     ` Jason Gunthorpe
2024-09-20 13:56                       ` Doug Miller
2024-09-23 13:39                         ` Jason Gunthorpe
2024-09-17 21:35                 ` Doug Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox