From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E67037E5C7 for ; Fri, 7 Aug 2026 07:40:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786088454; cv=none; b=VaOf5W60MJ7BbwKPpQb3Nq1ah3Dr6YOzuY/X7IgsRfZpYw1al4QHpCSy+k09EzMfkifjvTALFgIWaufH6bDLpK6kLCfU6dDXQIZYAq2iN9Cmg8IM9VXkzmLKH0swke6zhqYzojvbVIw617MRhEU3alh//dhIE2sstXiNt/GzuTA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786088454; c=relaxed/simple; bh=yLlEJtUA4c+lx4MJarEGHOb+L+h2dwEqGLbgGSEeKdE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=nrQ3WfeGUFQdFss9IzlKvqLeFJlkbBm0XDZCNcOGgRQP6Qv2CiV5F+DgqF8RZdujw6aGJERyc3rHN+a0E9AB+8rXw9hC5eRyITj4qQrEwwhyRxyMpFXxELd1VdVGCYEA3q4I7fQUfZiAstzo4y1ChNC8Z3lmDRhhzzNlx2vDuQk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=osyx.tech; spf=none smtp.mailfrom=osyx.tech; dkim=pass (2048-bit key) header.d=osyx-tech.20251104.gappssmtp.com header.i=@osyx-tech.20251104.gappssmtp.com header.b=Jp4x8Hdk; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=osyx.tech Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=osyx.tech Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=osyx-tech.20251104.gappssmtp.com header.i=@osyx-tech.20251104.gappssmtp.com header.b="Jp4x8Hdk" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4995b0343c1so6835465e9.3 for ; Fri, 07 Aug 2026 00:40:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osyx-tech.20251104.gappssmtp.com; s=20251104; t=1786088451; x=1786693251; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=5ZtlYdzWPfbUjT+3726P4tEkOyWdFs4LizgvGG0WnvQ=; b=Jp4x8Hdk48kig/jwwlw4AjAbjyfMEqMOWxo+0m9Cx+gQab2HeHpwquwPHyDj0mEnhm Ht4zSobPtIL0sQm2RW8feK0fsv9VXidVds7aI4rqYwOdRXKwMDcijf0wiGzHoptnfgSc 8ZF/eJTYdaZJBw0W7rpVWljEA56ywtw19VZUPuEjxcr2RhdJbAnHJTCh7caieRlOAQap Csz2fHlmiODkzp5UmCahJt0u7mXQBL2/Z0rewSV8hHEKFBiF1VeuYBVHr2qvrrCS00un pMBsUCUBrTv4f/4jYXZVgX+dQ2oLVwxKEy7l8rljkzYtMWTm+7My/Tji3JduwsIwt/ea m0gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786088451; x=1786693251; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=5ZtlYdzWPfbUjT+3726P4tEkOyWdFs4LizgvGG0WnvQ=; b=WUiAwNd/Cj0kGtcBeOSQfEXxNc23LeaumX9k/o5mhV9K1wB+SxeihBtghM+rrtHJwI EXsVl31HexkDh/NFEc97lMeE9coOJ/Omi84IvgZ8PBhZUwuTL8c/HZ7ielEH6Zb1H9bK V8gHDP3YwYN2XBwUtCbAHBapp16GUj9BI7APrb6sb6vo4QwRFyW9/YHWjQVAAsD0jEMv bb4xHjPiOJtuxzMHbv4B3PK0G7g9Nc5cZ1PBuZqg1K/OaoqgdIZ35iyfWz3SHKo3Aqh/ uj2E9O11LiNOB4vsvHQtcTPkFt6+MXc1NLqOPNBRAc5Bhpu4hG+3AYVcBbrj8svq31z4 RDdQ== X-Forwarded-Encrypted: i=1; AHgh+RoGcrrFOh8Rc/p4lHy8JnmRlU6OlquxNHQ22RT359On2Nq1zP21ZOLqp5fvP5cqLIvy5MAoMgWMthF9LB0=@vger.kernel.org X-Gm-Message-State: AOJu0YzGFitHjAufkIO0e+skZ/6xM4ix+AlbPWvbh5P1/Nu3sVtzEHLU sYmj0ELU4Op53I6Igpfdn1lCTkRhNaGF06nOBu5PGyG9+Q9xtIjnU5IghkU35YlfPLiy X-Gm-Gg: AR+sD11uAsSTEG6pVsy93KhKeuIk1GlFn5YZWuSJtl1l64/3rAsoaqcNfPfwrj5a7t7 ndXkeJdRgiB/KpZvAYsuBWG5WuuroH05/Jka49GkUs13weZNp3tzBhFxrpKz/WhbccGqE0FoTVS YnFJ8hGSVKp2R5RGYVYfHhZME7TWCJKCvfTNwaJRPyBxDlLkHgB9JroXAMnmHalmFXX33rUjsxn 4sB+3+A2jSm08qFyHKGgZXPWuj+kH6nO22jV3LL+hMxgykPVMjybjSVkDA/GYdNDXVMbQa+dSEU URUXBpTHtVOY/eowsiNcYYvFwSmIiGKUh0skltMteyPRxMF2eFyNM62gLihaMa1KBYsU4BU2L2A p8j02wRUq+zYj8EIeBIS7JIHSc25bn1uP4t5ZyIeRa9/AmWEfVGI5VRKfH4Mc5BavgR2yx8fP0f D/mZb5kT4mdENyUourdZ8T1E1/hwGWT5Nc8ejBcULjFO//kufnLBAfb/EBV5sqQ4M= X-Received: by 2002:a05:600c:1f96:b0:496:c249:dd9a with SMTP id 5b1f17b1804b1-4994e71364fmr248230245e9.3.1786088445905; Fri, 07 Aug 2026 00:40:45 -0700 (PDT) Received: from jp-linux.Home ([2001:8a0:f59c:a900:2600:fba1:8d1e:1692]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-480021f90f8sm2819904f8f.26.2026.08.07.00.40.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2026 00:40:45 -0700 (PDT) From: =?UTF-8?q?Jo=C3=A3o=20Peixoto?= 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 Message-ID: X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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