virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Tanmay Shah <tanmay.shah@amd.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>,
	andersson@kernel.org, jasowang@redhat.com,
	xuanzhuo@linux.alibaba.com, eperezma@redhat.com,
	linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	virtualization@lists.linux.dev, xiaoxiang@xiaomi.com,
	Xiang Xiao <xiaoxiang781216@gmail.com>,
	arnaud.pouliquen@foss.st.com
Subject: Re: [RFC PATCH 2/2] rpmsg: virtio_rpmsg_bus: get buffer size from config space
Date: Tue, 16 Dec 2025 15:45:13 -0700	[thread overview]
Message-ID: <aUHg-bN90ZPyZk0W@p14s> (raw)
In-Reply-To: <d858a46d-e5cc-4d87-b5b5-8130dfd42145@amd.com>

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@gmail.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 */
> > > > 
> > > > 
> > 
> 

  reply	other threads:[~2025-12-16 22:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14 18:46 [RFC PATCH 0/2] Enhance RPMsg buffer management Tanmay Shah
2025-11-14 18:46 ` [RFC PATCH 1/2] rpmsg: virtio_rpmsg_bus: allow the different vring size for send/recv Tanmay Shah
2025-11-21  9:40   ` Arnaud POULIQUEN
2025-12-03 17:38     ` Tanmay Shah
2025-12-17 20:58   ` Mathieu Poirier
2025-11-14 18:46 ` [RFC PATCH 2/2] rpmsg: virtio_rpmsg_bus: get buffer size from config space Tanmay Shah
2025-11-21  9:44   ` Arnaud POULIQUEN
2025-12-03 18:00     ` Tanmay Shah
2025-11-22 12:05   ` Zhongqiu Han
2025-12-03 18:12     ` Tanmay Shah
2025-12-03 19:35       ` Michael S. Tsirkin
2025-12-04 16:55         ` Tanmay Shah
2025-12-16 22:45           ` Mathieu Poirier [this message]
2025-12-05 16:01       ` Arnaud POULIQUEN
2025-12-16 22:43         ` Mathieu Poirier
2025-12-17 21:31 ` [RFC PATCH 0/2] Enhance RPMsg buffer management Mathieu Poirier
2025-12-17 22:20   ` Tanmay Shah

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=aUHg-bN90ZPyZk0W@p14s \
    --to=mathieu.poirier@linaro.org \
    --cc=andersson@kernel.org \
    --cc=arnaud.pouliquen@foss.st.com \
    --cc=eperezma@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=tanmay.shah@amd.com \
    --cc=virtualization@lists.linux.dev \
    --cc=xiaoxiang781216@gmail.com \
    --cc=xiaoxiang@xiaomi.com \
    --cc=xuanzhuo@linux.alibaba.com \
    --cc=zhongqiu.han@oss.qualcomm.com \
    /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;
as well as URLs for NNTP newsgroup(s).