Re: [PATCH 2/5] virt: add Bao IPC shared memory driver

Greg KH
2025-12-24T15:53:37Z

On Wed, Dec 24, 2025 at 01:52:14PM +0000, joaopeixoto@osyx.tech wrote:
> From: João Peixoto <joaopeixoto@osyx.tech>
>
> Add a new driver providing an interface for communication with guests
> hosted by the Bao hypervisor using shared-memory channels. The driver
> exposes read/write regions defined in device tree and notifies the
> hypervisor via an architecture-specific hypercall (SMC/HVC on ARM and
> SBI ecall on RISC-V).
>
> The patch introduces:
> - drivers/bao/ with the initial Bao IPC shared-memory implementation
> - Kconfig entry enabling BAO_SHMEM
> - Makefile integration for building the driver
> - A character device interface supporting mmap(), read(), and write()
> - Platform driver support using DT properties for channel layout
>
> Each device instance maps its assigned shared-memory region, validates
> read/write channel configuration, and exposes a /dev/baoipc<N> node
> used by user space to exchange data with Bao guests.
>
> Signed-off-by: João Peixoto <joaopeixoto@osyx.tech>
> ---
> drivers/virt/Kconfig | 2 +
> drivers/virt/Makefile | 1 +
> drivers/virt/bao/Kconfig | 3 +
> drivers/virt/bao/Makefile | 3 +
> drivers/virt/bao/ipcshmem/Kconfig | 9 +
> drivers/virt/bao/ipcshmem/Makefile | 3 +
> drivers/virt/bao/ipcshmem/ipcshmem.c | 539 +++++++++++++++++++++++++++

Why two subdirs deep for a single .c file? Why not just put this in
drivers/virt/ instead?

thanks,

greg k-h