Skip to content

About

Passerelle - shared folder for QNX 8.0 guests under QEMU: virtio transport (PCI/MMIO), 9P2000.L and virtiofs clients, resource manager, conformance + benchmark bench. QNX Global Hackathon 2026.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

161 Commits

Folders and files

Passerelle

coverage

Passerelle is a high-performance host-guest shared filesystem driver for QNX® Neutrino® 8.0 virtual machines under QEMU, providing seamless directory sharing via 9P2000.L and virtiofs over modern virtio-PCI and virtio-MMIO.

Submitted to the QNX Global Hackathon 2026 under the Apache-2.0 license.


Why Passerelle?

Developing software for QNX virtual machines today usually means suffering a slow iteration loop:

[Host] cross-compile  ──>  [SCP / rebuild disk image]  ──>  [Guest] boot / transfer  ──>  [Guest] test run

Every change pays a "copy tax". If the VM image is read-only or minimal, you must regenerate the entire image just to test one binary.

With Passerelle, your build directory on the host PC is mounted directly inside the QNX guest:

[Host] cross-compile  ──>  [Guest] run immediately from /host

Binaries execute straight from the share, shared libraries load on demand, and files created or modified by QNX are instantly available on the host.


Prior Art & What Passerelle Adds

In accordance with open-source engineering ethics and hackathon standards, Passerelle explicitly acknowledges prior art. Two public 9P clients and one virtio transport library exist for QNX:

  1. gvergine/qnx-fs-9p (October 2026, Apache-2.0): A feature-rich 9P2000.L client designed for everyday development, but strictly restricted to ARM64 guests over virtio-mmio. It does not support x86_64 and has no PCI transport.
  2. eclipse-score/qnx_unit_tests (virtio9p) (March 2026, Apache-2.0): Supports both x86_64 (PCI) and ARM64 (MMIO), but is intentionally stripped down to test runner needs: no symbolic links, no permission or ownership changes (chmod/chown), no timestamp updates, no file locking.
  3. kodebooth/qnx-virtio (April 2026, MIT): A transport library for virtio on QNX 8.0 with a sample GPIO driver, but no filesystem implementation and no host-side testability.

What Passerelle Adds

Capability qnx-fs-9p (A) qnx_unit_tests (B) Passerelle
Full x86_64 Guest Support (PCI modern, MSI-X) ❌ ARM64 only ⚠️ Minimal ops only Target: complete POSIX share
Full ARM64 Guest Support (MMIO v1 & v2) ✅ Yes ⚠️ Minimal ops only Target: complete POSIX share
POSIX Operations (symlinks, chmod, chown, utime, df) ✅ Yes ❌ No Target: yes (redirect symlinks, atomic renames)
virtiofs for QNX Guests (FUSE over virtio) ❌ No ❌ No ✅ Target (X tier) — no public implementation found
Real-Time Priority Scheduling ❌ FIFO ❌ Unspecified Target: priority-ordered dispatch
Host PC Testability without QNX SDP ❌ Needs SDP ❌ Needs Bazel/SDP ✅ Portable L1/L2/L3, PC unit tests
Differential Conformance Testbed ❌ Trace-only ❌ None ✅ Harness written (host/fsproof, 1M-op target)
One-Command Setup CLI (qshare) ❌ Manual QEMU ❌ Manual script ✅ qshare tool written

Reading this table honestly. The "Passerelle" column states what the project provides by design and targets; the columns for projects A and B state what their code and documentation show today. Implementation status per requirement — including what is not yet done — is in docs/verification-status.md. The absence of a public QNX virtiofs guest driver is a search result, not a proof (spec §14).

See docs/state-of-the-art.md for detailed code-level analysis and NOTICE for project attributions.


Architecture

Passerelle follows a modular three-layer design:

  QNX Applications: open, read, write, stat, readdir, execve...
        │  QNX Messages handled at caller priority (QNX-03)
 ┌──────▼────────────────────────────────────────────────────────┐
 │ Layer 3 — Filesystem Resource Manager (`rmfs/`)               │
 │   Path namespace, fids/inodes, permission checks (SEC-01),     │
 │   guest-local range locks (FS-14), priority scheduler (QNX-04)│
 ├──────────────────────────────┬────────────────────────────────┤
 │ Layer 2 — 9P2000.L Protocol  │ Layer 2 — FUSE Protocol        │
 │ (`proto9p/`)                 │ (`protofuse/` - virtiofs)      │
 │ Pure C11, strict decoders    │ Pure C11, node refcounts       │
 ├──────────────────────────────┴────────────────────────────────┤
 │ Layer 1 — virtio Transport (`virtio/`)                        │
 │   Split virtqueue, indirect descs (VIO-08), zero-copy (VIO-07) │
 │   Backends: PCI Modern (x86_64), MMIO v1/v2 (ARM64), PC Mock  │
 └──────┬────────────────────────────────────────────────────────┘
        │
   QEMU: `virtio-9p-pci` / `virtio-9p-device`  or  `virtiofsd`
        │
   Host Workstation Directory

See docs/architecture.md for full design documentation.

Passerelle architecture: the three layers inside the QNX guest, the QEMU device, and the host side with the shared directory and the host tools

The picture is the README version of the design: three layers inside the guest (resource manager rmfs/, wire protocols proto9p/ and protofuse/, virtio transport virtio/), one QEMU device band underneath, and the host directory on the other side — plus the host tools (qshare, qrun, fsproof, pbench) and the reference servers that drive the same client without QNX.


One-Command Demo

On the host workstation (tooling status: see verification-status.md):

# 1. Share your project directory and start the VM
qshare ~/my-project

# 2. Inside the QNX VM, the host folder is mounted at /host
ls -la /host

# 3. Cross-compile on the host, run in QNX with zero copying
make -C ~/my-project
/host/bin/my_program

See docs/user-guide.md for mount options, troubleshooting, and CMake/Rust workflows.


Building

Passerelle targets QNX SDP 8.0 (x86_64le and aarch64le) and builds natively on Linux for PC testing.

1. Build on Host PC (Portable Layers & Unit Tests, No SDP Needed)

The transport abstraction, protocol codecs, and resource manager core are 100% portable C11 and run directly on your Linux host:

# Standard build and CTest execution
cmake -B build -DPGW_MODULES="common;virtio;proto9p;protofuse;rmfs"
cmake --build build -j8
ctest --test-dir build --output-on-failure

# Build with AddressSanitizer and UBSan
cmake -B build-asan -DPGW_SANITIZERS=ON
cmake --build build-asan -j8
ctest --test-dir build-asan --output-on-failure

2. Cross-Compile for QNX 8.0

Requires QNX SDP 8.0. Source the SDP environment, then use the toolchain file shipped with the SDP (no repository-local toolchain wrapper exists yet — see docs/building.md):

source ~/qnx800/qnxsdp-env.sh

# For an x86_64 guest
cmake -B build-qnx-x86 \
      -DCMAKE_TOOLCHAIN_FILE="$QNX_HOST/usr/cmake/QNXToolchain.cmake" \
      -DCMAKE_SYSTEM_PROCESSOR=x86_64
cmake --build build-qnx-x86 -j8

# For an aarch64le guest
cmake -B build-qnx-arm \
      -DCMAKE_TOOLCHAIN_FILE="$QNX_HOST/usr/cmake/QNXToolchain.cmake" \
      -DCMAKE_SYSTEM_PROCESSOR=aarch64le
cmake --build build-qnx-arm -j8

Detailed step-by-step instructions and test level runner commands are available in docs/building.md.

3. Install the package, use it from another project

The portable stack can be installed into a prefix and consumed by another CMake project or by any build that speaks pkg-config:

cmake -B build -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build build -j8
cmake --install build

# downstream, with CMake
find_package(Passerelle REQUIRED)
target_link_libraries(my_app PRIVATE Passerelle::pgw_common)

# downstream, with pkg-config
cc $(pkg-config --cflags passerelle) app.c $(pkg-config --libs passerelle)

tests/install proves it end to end on every build: the tree is installed into a throwaway prefix, then a small consumer is built from that prefix with pkg-config and with find_package(Passerelle), and runs.

4. Supply chain: SBOM, provenance, coverage badge

  • SBOM — python3 tools/sbom/generate_sbom.py --output passerelle.sbom.json writes a CycloneDX 1.5 document listing the real inputs (the C sources with their SHA-256, the version, the toolchain, the git commit) and states explicitly that the shipped artefact depends on no third-party library. The build provenance (compiler, flags, build type, commit, dirty state) goes to the companion file.
  • Coverage badge — the badge at the top of this file is written by the coverage job of .github/workflows/quality.yml from the gcov measurement of the production C code, and committed with its record (docs/_assets/coverage.json). tools/quality/coverage_badge.py --check fails the build when the badge does not match its record or when the measurement is too old: a badge that lies is worse than no badge.

Honest Verification Status

Every requirement is tracked against automated testing, and this README only claims what a command in this repository actually proves. What still needs a QNX SDP or a QNX guest is said so explicitly.

  • Unit & codec layers (level 0) — implemented and green on the host PC for every portable layer: common, virtio, proto9p, protofuse, rmfs and the portable half of drivers (ctest --test-dir build). The QNX-only glue is compiled on the PC against tests/qnx-stub (job qnx-syntax), which proves it parses and type-checks, not that it runs.
  • Randomized input (level 1) — tests/fuzz runs deterministic seeded campaigns against every wire decoder, in CI, under ASan+UBSan (fuzz_p9, fuzz_fuse). Measured out of CI: 5 000 000 iterations per decoder family, zero defect — 11 s (9P) and 10 s (FUSE) in a normal build, 21 s and 18 s under sanitizers.
  • Differential conformance (level 2) — tests/e2e replays seeded random operation suites through pgw_rmfs and compares every result with the PC folder, which is the truth (test_diff, plus the directed cases of spec 7.4 in test_directed). A divergence is automatically reduced to the shortest prefix that reproduces it. host/fsproof runs the same method against a real guest. Measured out of CI: 3 000 000 operations (3 seeds × 1 000 000), zero divergence, in 60 s — the spec 7.6 "complete" threshold.
  • Host-side integration (E5) — tests/qemu boots a minimal Linux guest on the exact options qshare emits and exchanges files both ways, for 9P and virtiofs: feasibility test E5 passed, in 9 s per protocol (docs/verification-status.md §3.1).
  • A real QNX guest, and what it sees — tests/qemu/qnx71 boots QNX Neutrino 7.1.0 x86_64 on this PC with our virtio-9p-pci device attached. Its own pci-tool reports the device as 1af4:1009 with the MSI-X capability plus the five virtio vendor capabilities and three assigned BARs, and reports no interrupt routed to it — which is the actionable half of E1 (EVIDENCE.md). It has no compiler, so this says nothing about our driver yet.
  • Performance (level 3) and guest-side robustness (level 4) — the harnesses are written (host/bench, host/fsproof). The Linux reference baseline of spec 7.5 is published in docs/measurements/ (822 requests, round-trip table from a real QEMU 8.2 trace on an active guest). The numbers for our own QNX driver require a QNX guest and are not measured yet.
  • Feasibility tests E1–E4 — blocked on the QNX SDP (issues #2 to #6). E5 is done.
  • No QNX-side requirement is claimed as verified: no QNX SDP is installed on the machine that produced this tree, and no public SDP 8.0 could be pulled without an account (the community image that ships one, ghcr.io/kodebooth/qnx-sdp, is private).

See docs/verification-status.md for the full matrix and docs/measurements/ for the numbers.


Documentation Index


Repository CI

This repository uses a self-hosted CI pipeline on dedicated Dell PowerEdge R630 workers enforcing strict C11 compliance, AddressSanitizer verification, a 5-minute maximum runtime budget per job, and automated merge queues via Mergify. Details are documented in docs/ci.md.


License & Attribution

Passerelle is distributed under the Apache License, Version 2.0.
See LICENSE for full legal text and NOTICE for third-party project attributions.

About

Passerelle - shared folder for QNX 8.0 guests under QEMU: virtio transport (PCI/MMIO), 9P2000.L and virtiofs clients, resource manager, conformance + benchmark bench. QNX Global Hackathon 2026.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages