All of lore.kernel.org
 help / color / mirror / Atom feed
From: "João Peixoto" <jpeixoto@osyx.tech>
To: gregkh@linuxfoundation.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org
Cc: jose@osyx.tech, davidmcerdeira@osyx.tech, corbet@lwn.net,
	skhan@linuxfoundation.org, catalin.marinas@arm.com,
	will@kernel.org, linux@armlinux.org.uk, pjw@kernel.org,
	palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr,
	andrew.jones@oss.qualcomm.com, rdunlap@infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-riscv@lists.infradead.org
Subject: [RFC PATCH v3 0/6] virt: bao: Add Bao hypervisor IPC and I/O dispatcher drivers
Date: Fri,  7 Aug 2026 08:39:27 +0100	[thread overview]
Message-ID: <cover.1786010512.git.jpeixoto@osyx.tech> (raw)

This series adds guest-side drivers for the Bao static-partitioning
hypervisor: an IPC shared-memory driver and an I/O dispatcher, plus their
device-tree bindings, UAPI and MAINTAINERS entry.

Bao is a lightweight static-partitioning hypervisor for embedded and
safety-critical systems.
- The IPC shared-memory driver lets Bao guests exchange data through a
  shared-memory region split into a read and a write channel.
- The I/O dispatcher lets a backend guest service paravirtualised (VirtIO)
  I/O on behalf of frontend guests.

Sent as RFC: the RISC-V backend uses the SBI experimental extension space
(see "Open items" below), and the device-tree bindings were reworked in this
version and would benefit from another look.

## Changes since v2
- dt-bindings (ipcshmem): describe the two channels through reg/reg-names,
  drop read-channel/write-channel and the "id" property, use a vendor
  "bao,id", and use a generic node name (Krzysztof Kozlowski).
- dt-bindings (io-dispatcher): one node per backend device (single reg +
  interrupt) instead of one node describing many devices, modelled on the
  gunyah/Mediatek Genio bindings (Krzysztof Kozlowski).
- io dispatcher driver: one platform device per device model (/dev/bao-dmX);
  removed the global DM list, the anonymous-inode fd and the dispatcher
  indirection ioctl; fixed a leak and probe error-path bugs; initialise
  virtio_requests_lock and the hypercall context fields.
- ipcshmem driver: derive the two regions from reg; drop the success print;
  do the range arithmetic in u64.
- Kconfig: fix the help-text indentation (Randy Dunlap).
- style: unwrap the few-char line wraps; the IPC hypercall helper now takes a
  single argument and fits on one line (Andrew Jones).
- riscv: use BAO_SBI_EXT_ID consistently, document that it is in the SBI
  experimental extension space, and drop the redundant ecall input
  constraints (Andrew Jones).
- commit messages: rewritten to kernel style; the "consolidate the IPC
  hypercall ID" patch now explains why and covers the signature change
  (Greg KH).
- process: sent as a fresh thread with this changelog, and the mail setup that
  bounced v1/v2 is fixed (Krzysztof Kozlowski, Greg KH).

## Open items / still under discussion
- RISC-V uses the experimental SBI extension ID (0x08000ba0). A permanent
  implementation ID must be registered in the RISC-V SBI spec before RISC-V
  can be non-experimental; hence RFC.
- Whether the Remote I/O hypercall must follow SBI chapter-3 register rules
  (Andrew Jones) — see the reply on patch 4.
- The "bao,id" property and the "bao" vendor prefix (Krzysztof Kozlowski) —
  rationale is in the bindings; alternatives welcome.

Link to v2: https://lore.kernel.org/all/20260107162829.416885-1-joaopeixoto@osyx.tech/

João Peixoto (6):
  dt-bindings: bao: add IPC shared-memory device
  virt: bao: add IPC shared-memory driver
  dt-bindings: bao: add I/O dispatcher device
  virt: bao: add I/O dispatcher driver
  virt: bao: consolidate the IPC hypercall ID in include/linux/bao.h
  MAINTAINERS: add Bao hypervisor entry

 .../bindings/bao/bao,io-dispatcher.yaml       |  58 +++
 .../devicetree/bindings/bao/bao,ipcshmem.yaml |  59 +++
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 .../userspace-api/ioctl/ioctl-number.rst      |   2 +
 MAINTAINERS                                   |  13 +
 arch/arm/include/asm/bao.h                    |  60 +++
 arch/arm64/include/asm/bao.h                  |  60 +++
 arch/riscv/include/asm/bao.h                  |  66 +++
 drivers/virt/Kconfig                          |   2 +
 drivers/virt/Makefile                         |   2 +
 drivers/virt/bao/Kconfig                      |   5 +
 drivers/virt/bao/Makefile                     |   4 +
 drivers/virt/bao/io-dispatcher/Kconfig        |  16 +
 drivers/virt/bao/io-dispatcher/Makefile       |   4 +
 drivers/virt/bao/io-dispatcher/bao_drv.h      | 349 +++++++++++++++
 drivers/virt/bao/io-dispatcher/dm.c           | 316 ++++++++++++++
 drivers/virt/bao/io-dispatcher/driver.c       |  95 +++++
 drivers/virt/bao/io-dispatcher/intc.c         |  64 +++
 drivers/virt/bao/io-dispatcher/io_client.c    | 401 ++++++++++++++++++
 .../virt/bao/io-dispatcher/io_dispatcher.c    | 181 ++++++++
 drivers/virt/bao/io-dispatcher/ioeventfd.c    | 323 ++++++++++++++
 drivers/virt/bao/io-dispatcher/irqfd.c        | 314 ++++++++++++++
 drivers/virt/bao/ipcshmem/Kconfig             |  10 +
 drivers/virt/bao/ipcshmem/Makefile            |   3 +
 drivers/virt/bao/ipcshmem/ipcshmem.c          | 228 ++++++++++
 include/linux/bao.h                           |  44 ++
 include/uapi/linux/bao.h                      |  96 +++++
 27 files changed, 2777 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bao/bao,io-dispatcher.yaml
 create mode 100644 Documentation/devicetree/bindings/bao/bao,ipcshmem.yaml
 create mode 100644 arch/arm/include/asm/bao.h
 create mode 100644 arch/arm64/include/asm/bao.h
 create mode 100644 arch/riscv/include/asm/bao.h
 create mode 100644 drivers/virt/bao/Kconfig
 create mode 100644 drivers/virt/bao/Makefile
 create mode 100644 drivers/virt/bao/io-dispatcher/Kconfig
 create mode 100644 drivers/virt/bao/io-dispatcher/Makefile
 create mode 100644 drivers/virt/bao/io-dispatcher/bao_drv.h
 create mode 100644 drivers/virt/bao/io-dispatcher/dm.c
 create mode 100644 drivers/virt/bao/io-dispatcher/driver.c
 create mode 100644 drivers/virt/bao/io-dispatcher/intc.c
 create mode 100644 drivers/virt/bao/io-dispatcher/io_client.c
 create mode 100644 drivers/virt/bao/io-dispatcher/io_dispatcher.c
 create mode 100644 drivers/virt/bao/io-dispatcher/ioeventfd.c
 create mode 100644 drivers/virt/bao/io-dispatcher/irqfd.c
 create mode 100644 drivers/virt/bao/ipcshmem/Kconfig
 create mode 100644 drivers/virt/bao/ipcshmem/Makefile
 create mode 100644 drivers/virt/bao/ipcshmem/ipcshmem.c
 create mode 100644 include/linux/bao.h
 create mode 100644 include/uapi/linux/bao.h


base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
-- 
2.43.0


WARNING: multiple messages have this Message-ID (diff)
From: "João Peixoto" <jpeixoto@osyx.tech>
To: gregkh@linuxfoundation.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org
Cc: jose@osyx.tech, davidmcerdeira@osyx.tech, corbet@lwn.net,
	skhan@linuxfoundation.org, catalin.marinas@arm.com,
	will@kernel.org, linux@armlinux.org.uk, pjw@kernel.org,
	palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr,
	andrew.jones@oss.qualcomm.com, rdunlap@infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-riscv@lists.infradead.org
Subject: [RFC PATCH v3 0/6] virt: bao: Add Bao hypervisor IPC and I/O dispatcher drivers
Date: Fri,  7 Aug 2026 08:39:27 +0100	[thread overview]
Message-ID: <cover.1786010512.git.jpeixoto@osyx.tech> (raw)

This series adds guest-side drivers for the Bao static-partitioning
hypervisor: an IPC shared-memory driver and an I/O dispatcher, plus their
device-tree bindings, UAPI and MAINTAINERS entry.

Bao is a lightweight static-partitioning hypervisor for embedded and
safety-critical systems.
- The IPC shared-memory driver lets Bao guests exchange data through a
  shared-memory region split into a read and a write channel.
- The I/O dispatcher lets a backend guest service paravirtualised (VirtIO)
  I/O on behalf of frontend guests.

Sent as RFC: the RISC-V backend uses the SBI experimental extension space
(see "Open items" below), and the device-tree bindings were reworked in this
version and would benefit from another look.

## Changes since v2
- dt-bindings (ipcshmem): describe the two channels through reg/reg-names,
  drop read-channel/write-channel and the "id" property, use a vendor
  "bao,id", and use a generic node name (Krzysztof Kozlowski).
- dt-bindings (io-dispatcher): one node per backend device (single reg +
  interrupt) instead of one node describing many devices, modelled on the
  gunyah/Mediatek Genio bindings (Krzysztof Kozlowski).
- io dispatcher driver: one platform device per device model (/dev/bao-dmX);
  removed the global DM list, the anonymous-inode fd and the dispatcher
  indirection ioctl; fixed a leak and probe error-path bugs; initialise
  virtio_requests_lock and the hypercall context fields.
- ipcshmem driver: derive the two regions from reg; drop the success print;
  do the range arithmetic in u64.
- Kconfig: fix the help-text indentation (Randy Dunlap).
- style: unwrap the few-char line wraps; the IPC hypercall helper now takes a
  single argument and fits on one line (Andrew Jones).
- riscv: use BAO_SBI_EXT_ID consistently, document that it is in the SBI
  experimental extension space, and drop the redundant ecall input
  constraints (Andrew Jones).
- commit messages: rewritten to kernel style; the "consolidate the IPC
  hypercall ID" patch now explains why and covers the signature change
  (Greg KH).
- process: sent as a fresh thread with this changelog, and the mail setup that
  bounced v1/v2 is fixed (Krzysztof Kozlowski, Greg KH).

## Open items / still under discussion
- RISC-V uses the experimental SBI extension ID (0x08000ba0). A permanent
  implementation ID must be registered in the RISC-V SBI spec before RISC-V
  can be non-experimental; hence RFC.
- Whether the Remote I/O hypercall must follow SBI chapter-3 register rules
  (Andrew Jones) — see the reply on patch 4.
- The "bao,id" property and the "bao" vendor prefix (Krzysztof Kozlowski) —
  rationale is in the bindings; alternatives welcome.

Link to v2: https://lore.kernel.org/all/20260107162829.416885-1-joaopeixoto@osyx.tech/

João Peixoto (6):
  dt-bindings: bao: add IPC shared-memory device
  virt: bao: add IPC shared-memory driver
  dt-bindings: bao: add I/O dispatcher device
  virt: bao: add I/O dispatcher driver
  virt: bao: consolidate the IPC hypercall ID in include/linux/bao.h
  MAINTAINERS: add Bao hypervisor entry

 .../bindings/bao/bao,io-dispatcher.yaml       |  58 +++
 .../devicetree/bindings/bao/bao,ipcshmem.yaml |  59 +++
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 .../userspace-api/ioctl/ioctl-number.rst      |   2 +
 MAINTAINERS                                   |  13 +
 arch/arm/include/asm/bao.h                    |  60 +++
 arch/arm64/include/asm/bao.h                  |  60 +++
 arch/riscv/include/asm/bao.h                  |  66 +++
 drivers/virt/Kconfig                          |   2 +
 drivers/virt/Makefile                         |   2 +
 drivers/virt/bao/Kconfig                      |   5 +
 drivers/virt/bao/Makefile                     |   4 +
 drivers/virt/bao/io-dispatcher/Kconfig        |  16 +
 drivers/virt/bao/io-dispatcher/Makefile       |   4 +
 drivers/virt/bao/io-dispatcher/bao_drv.h      | 349 +++++++++++++++
 drivers/virt/bao/io-dispatcher/dm.c           | 316 ++++++++++++++
 drivers/virt/bao/io-dispatcher/driver.c       |  95 +++++
 drivers/virt/bao/io-dispatcher/intc.c         |  64 +++
 drivers/virt/bao/io-dispatcher/io_client.c    | 401 ++++++++++++++++++
 .../virt/bao/io-dispatcher/io_dispatcher.c    | 181 ++++++++
 drivers/virt/bao/io-dispatcher/ioeventfd.c    | 323 ++++++++++++++
 drivers/virt/bao/io-dispatcher/irqfd.c        | 314 ++++++++++++++
 drivers/virt/bao/ipcshmem/Kconfig             |  10 +
 drivers/virt/bao/ipcshmem/Makefile            |   3 +
 drivers/virt/bao/ipcshmem/ipcshmem.c          | 228 ++++++++++
 include/linux/bao.h                           |  44 ++
 include/uapi/linux/bao.h                      |  96 +++++
 27 files changed, 2777 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bao/bao,io-dispatcher.yaml
 create mode 100644 Documentation/devicetree/bindings/bao/bao,ipcshmem.yaml
 create mode 100644 arch/arm/include/asm/bao.h
 create mode 100644 arch/arm64/include/asm/bao.h
 create mode 100644 arch/riscv/include/asm/bao.h
 create mode 100644 drivers/virt/bao/Kconfig
 create mode 100644 drivers/virt/bao/Makefile
 create mode 100644 drivers/virt/bao/io-dispatcher/Kconfig
 create mode 100644 drivers/virt/bao/io-dispatcher/Makefile
 create mode 100644 drivers/virt/bao/io-dispatcher/bao_drv.h
 create mode 100644 drivers/virt/bao/io-dispatcher/dm.c
 create mode 100644 drivers/virt/bao/io-dispatcher/driver.c
 create mode 100644 drivers/virt/bao/io-dispatcher/intc.c
 create mode 100644 drivers/virt/bao/io-dispatcher/io_client.c
 create mode 100644 drivers/virt/bao/io-dispatcher/io_dispatcher.c
 create mode 100644 drivers/virt/bao/io-dispatcher/ioeventfd.c
 create mode 100644 drivers/virt/bao/io-dispatcher/irqfd.c
 create mode 100644 drivers/virt/bao/ipcshmem/Kconfig
 create mode 100644 drivers/virt/bao/ipcshmem/Makefile
 create mode 100644 drivers/virt/bao/ipcshmem/ipcshmem.c
 create mode 100644 include/linux/bao.h
 create mode 100644 include/uapi/linux/bao.h


base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
-- 
2.43.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

             reply	other threads:[~2026-08-07  7:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07  7:39 João Peixoto [this message]
2026-08-07  7:39 ` [RFC PATCH v3 0/6] virt: bao: Add Bao hypervisor IPC and I/O dispatcher drivers João Peixoto
2026-08-07  7:39 ` [RFC PATCH v3 1/6] dt-bindings: bao: add IPC shared-memory device João Peixoto
2026-08-07  7:39   ` João Peixoto
2026-08-07  7:45   ` sashiko-bot
2026-08-07  7:39 ` [RFC PATCH v3 2/6] virt: bao: add IPC shared-memory driver João Peixoto
2026-08-07  7:39   ` João Peixoto
2026-08-07  7:56   ` sashiko-bot
2026-08-07  7:39 ` [RFC PATCH v3 3/6] dt-bindings: bao: add I/O dispatcher device João Peixoto
2026-08-07  7:39   ` João Peixoto
2026-08-07  7:39 ` [RFC PATCH v3 4/6] virt: bao: add I/O dispatcher driver João Peixoto
2026-08-07  7:39   ` João Peixoto
2026-08-07  7:54   ` sashiko-bot
2026-08-11  9:29   ` Will Deacon
2026-08-11  9:29     ` Will Deacon
2026-08-07  7:39 ` [RFC PATCH v3 5/6] virt: bao: consolidate the IPC hypercall ID in include/linux/bao.h João Peixoto
2026-08-07  7:39   ` João Peixoto
2026-08-07  7:50   ` sashiko-bot
2026-08-07  7:39 ` [RFC PATCH v3 6/6] MAINTAINERS: add Bao hypervisor entry João Peixoto
2026-08-07  7:39   ` João Peixoto

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=cover.1786010512.git.jpeixoto@osyx.tech \
    --to=jpeixoto@osyx.tech \
    --cc=alex@ghiti.fr \
    --cc=andrew.jones@oss.qualcomm.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=corbet@lwn.net \
    --cc=davidmcerdeira@osyx.tech \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jose@osyx.tech \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=robh@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=will@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.