[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aUHg-bN90ZPyZk0W@p14s>
Date: Tue, 16 Dec 2025 15:45:13 -0700
From: Mathieu Poirier <mathieu.poirier@...aro.org>
To: Tanmay Shah <tanmay.shah@....com>
Cc: "Michael S. Tsirkin" <mst@...hat.com>,
Zhongqiu Han <zhongqiu.han@....qualcomm.com>, andersson@...nel.org,
jasowang@...hat.com, xuanzhuo@...ux.alibaba.com,
eperezma@...hat.com, linux-kernel@...r.kernel.org,
linux-remoteproc@...r.kernel.org, virtualization@...ts.linux.dev,
xiaoxiang@...omi.com, Xiang Xiao <xiaoxiang781216@...il.com>,
arnaud.pouliquen@...s.st.com
Subject: Re: [RFC PATCH 2/2] rpmsg: virtio_rpmsg_bus: get buffer size from
config space
On Thu, Dec 04, 2025 at 10:55:10AM -0600, Tanmay Shah wrote:
>
>
> On 12/3/25 1:35 PM, Michael S. Tsirkin wrote:
> > On Wed, Dec 03, 2025 at 12:12:46PM -0600, Tanmay Shah wrote:
> > > Hello,
> > >
> > > Thanks for your reviews. Please find the response below.
> > >
> > > On 11/22/25 6:05 AM, Zhongqiu Han wrote:
> > > > On 11/15/2025 2:46 AM, Tanmay Shah wrote:
> > > > > From: Xiang Xiao <xiaoxiang781216@...il.com>
> > > > >
>
> [...]
>
> > >
> > > Thanks, that's a good question. I keept id 2 unmodified from the original
> > > series. I don't know why ID 2 was chosen in the original series. I will have
> > > to discuss this with the linux remoteproc/rpmsg maintainers and choose the
> > > correct ID.
> > >
> > > I don't see any problem choosing ID 1, but for some reason if ID 1 was
> > > assigned and deprecated (I don't think that is the case) then only we should
> > > use ID 2.
> > >
> > >
> > > Arnaud, Mathieu, Bjorn any input here?
> > >
> > > > > +
> > > > > +struct virtio_rpmsg_config {
> > > > > + /* The tx/rx individual buffer size(if VIRTIO_RPMSG_F_BUFSZ) */
> > > > > + __u32 txbuf_size;
> > > > > + __u32 rxbuf_size;
> > > > > + __u32 reserved[14]; /* Reserve for the future use */
> > > >
> > > > Should we use __virtio32 instead of __u32 to avoid endianness issues?
> > > >
> > > >
> > >
> > > Sure, if that is the standard in other virtio headers I will modify it.
> > >
> > > Thanks,
> > > Tanmay
> >
> > rpmsg is still not standardized, sadly. It's really time it was.
> >
> >
> >
> > Modern virtio devices use __le32.
> > Accordingly, accessed with virtio_cread_le
> >
> >
> > __virtioXX and virtio_cread are for legacy compatible parts of config space.
> >
>
> As of now, I am using virtio_cread so I think it is legacy compatible.
>
> >
> > Does rpmsg want to be modern or keep using legacy? I donnu.
> >
>
> I don't know either. This we have to discuss with the maintainers and other
> vendors.
>
I would certainly like to see a modernization effort, but it needs to be
backward compatible. Probably outside the scope of this set though.
>
> > Ideally it should finally be documented and at that point we
> > definitely will want to switch to __le32.
> >
> >
> > For now, run sparse to make sure you don't introduce new endian-ness
> > issues.
>
> Ack.
>
> >
> >
>
>
>
> > > > > + /* Put the customize config here */
> > > > > +} __attribute__((packed));
> > > > > +
> > > > > +#endif /* _LINUX_VIRTIO_RPMSG_H */
> > > >
> > > >
> >
>
Powered by blists - more mailing lists