[RFC PATCH 0/2] Enhance RPMsg buffer management

From: Tanmay Shah

Date: Fri Nov 14 2025 - 13:46:51 EST


Take rx and tx buffer size from virtio device config space in the
resource table. This allows each firmware to configure RPMsg buffer size
as needed in each direction.

Original seris:
https://lore.kernel.org/all/1548949280-31794-1-git-send-email-xiaoxiang@xxxxxxxxxx/

Following modificaitons are done to the original series:
- Separate dma allocation is not done for tx and rx buffers. Instead
allocated chunk of memory is split between tx and rx buffers.
- If vdev doesn't support VIRTIO_RPMSG_F_BUFSZ feature then use the
default size of 512 bytes for buffers
- Change MAX_RPMSG_BUF_SIZE to DEFAULT_RPMSG_BUF_SIZE
- move virtio_rpmsg.h from uapi to linux dir
- RPMsg buffer size must be set to hold rpmsg header at minimum in the
vdev config space of the firmware.
- align total buf size to page size when allocating and deallocating
memory

Xiang Xiao (2):
rpmsg: virtio_rpmsg_bus: allow the different vring size for send/recv
rpmsg: virtio_rpmsg_bus: get buffer size from config space

drivers/rpmsg/virtio_rpmsg_bus.c | 105 ++++++++++++++++++++-----------
include/linux/virtio_rpmsg.h | 24 +++++++
2 files changed, 93 insertions(+), 36 deletions(-)
create mode 100644 include/linux/virtio_rpmsg.h


base-commit: f982fbb1a6ca3553c15763ad9eb2beeae78d3684
--
2.34.1