From: Jason Gunthorpe <jgg@ziepe.ca>
To: Doug Miller <doug.miller@cornelisnetworks.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>,
Bjorn Andersson <andersson@kernel.org>,
linux-remoteproc@vger.kernel.org,
OFED mailing list <linux-rdma@vger.kernel.org>,
"Dalessandro, Dennis" <dennis.dalessandro@cornelisnetworks.com>
Subject: Re: How to create/use RPMSG-over-VIRTIO devices in Linux
Date: Mon, 23 Sep 2024 10:39:23 -0300 [thread overview]
Message-ID: <20240923133923.GB9634@ziepe.ca> (raw)
In-Reply-To: <9c79dcce-39dc-498e-ad41-f50fe2752582@cornelisnetworks.com>
On Fri, Sep 20, 2024 at 08:56:07AM -0500, Doug Miller wrote:
> On 9/20/2024 7:45 AM, Jason Gunthorpe wrote:
> > On Mon, Sep 16, 2024 at 08:38:42AM -0500, Doug Miller wrote:
> > > On 9/15/2024 11:58 AM, Jason Gunthorpe wrote:
> > > > On Fri, Sep 13, 2024 at 08:39:26AM -0600, Mathieu Poirier wrote:
> > > > > KVM has nothing to do with this. The life of a virtio device starts
> > > > > in the VMM (Virtual Machine Manager) where a backend device is created
> > > > > and a virtio MMIO entry for that device is added to the device tree
> > > > > that is fed to the VM kernel. When the VM kernel boots the virtio
> > > > > MMIO entry in the DT is parsed as part of the normal device discovery
> > > > > process and a virtio-device is instantiated, added to the virtio-bus
> > > > > and a driver is probed.
> > > > >
> > > > > I suggest you start looking at that process using the kvmtool and a
> > > > > simple virtio device such as virtio-rng.
> > > > I would repeat again, I think trying to create a companion virtio
> > > > device to go along with a real vPCI device and then logically
> > > > associating both of them with a single driver is going to cause so
> > > > much pain you should not do it.
> > > >
> > > > Find a way to send your RPCs through your own vPCI device.
> > > When you say "your own vPCI device", are you referring to the virtual
> > > functions that are created by the adapter? Those are defined by the
> > > hardware specification and we don't have the ability to extend them.
> > Yes you do the VMM can extend them. You need some qemu code or a
> > vfio-cornelis or something like that.
> We can't require that SR-IOV customers use one specific VMM (qemu).
No matter what you do, you will require some modification. The other
end of any imagined virtio will be in qemu too after all.
> you're talking about modifying the kernel virtio_pci facility, that may
> be a worthwhile effort long term but I suspect it will take a longer
> time to get adopted. Using an existing kernel facility as-is would be
> the most practical solution.
There is really nothing.
> > > What we're investigating is using RPMSG-over-VIRTIO, not using virtio
> > > devices directly.
> > I understand, and that will be very painful.
> Can you expand on what you mean by "painful"? Are you speaking from
> experience with the rpmsg interfaces (can you point to problem areas)?
> Or is this based on the fact that, as of yet, no one has come forward to
> explain exactly how to do this?
From understanding how vfio works and knowing that if you try to tie w
virtio and your PCI together it will be a huge mess.
Jason
next prev parent reply other threads:[~2024-09-23 13:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2024-09-17 21:35 ` Doug Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240923133923.GB9634@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=andersson@kernel.org \
--cc=dennis.dalessandro@cornelisnetworks.com \
--cc=doug.miller@cornelisnetworks.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox