Project
State of the Art
This document extends Section 2 of the specification with <strong>code-level verification</strong> of the three existing public projects, performed on 10–11 November 2026 by reading the repositories vendored read-only for this study.
<strong>Honesty rule (spec Section 14).</strong> For every fact below we state its source: <strong>[code]</strong> = read directly in the project's source files (file paths given); <strong>[docs]</strong> = read only in the project's documentation, not verified by execution; <strong>[unverified]</strong> = claimed by us but not yet confirmed. <strong>None of the three projects has been executed</strong> — the host PC has no QNX SDP.
1. Comparative Table
<strong>A — gvergine/qnx-fs-9p</strong> |
<strong>B — eclipse-score/qnx_unit_tests</strong> (folder src/common/virtio9p) |
<strong>C — kodebooth/qnx-virtio</strong> |
|
|---|---|---|---|
| Date / activity | Created 3 Oct 2026, single commit <strong>[docs]</strong> | Created Mar 2026, active <strong>[docs]</strong> | April 2026 <strong>[docs]</strong> |
| License | Apache-2.0 <strong>[code: LICENSE]</strong> |
Apache-2.0, Eclipse Foundation headers <strong>[code: file headers]</strong> | MIT, © 2026 Abe Kohandel <strong>[code: LICENSE.md, SPDX headers]</strong> |
| Language | C <strong>[code: src/*.c, lib9p/]</strong> |
C++ (namespaces, iofunc_* C++ wrappers) <strong>[code]</strong> |
C <strong>[code: src/virtio*/]</strong> |
| Size (measured) | ~5,500 lines (src/ + lib9p/) <strong>[code: wc -l]</strong> |
~1,200 lines (virtio9p/) <strong>[code: wc -l]</strong> |
~2,700 lines (src/virtio*) <strong>[code: wc -l]</strong> |
| Stated goal | Everyday development; image stays minimal, programs and libraries run straight from the share <strong>[docs: README]</strong> | Share test binaries and data; "test infrastructure only" <strong>[docs: README]</strong> | Generic virtio transport library + sample GPIO driver <strong>[docs: README]</strong> |
| Guest architectures | <strong>aarch64 only</strong>; "x86_64 guests are not supported and were never tested" <strong>[docs: README — confirmed by code: only a virtio-mmio backend exists in src/transport_virtio.c, no PCI file]</strong> |
x86_64 (PCI) and ARM64 (MMIO) <strong>[code: src/transport/pci_transport.cpp, mmio_transport.cpp]</strong> |
x86_64 and aarch64le <strong>[code: cmake/toolchains/qnx_x86_64.cmake, qnx_aarch64.cmake; README presets]</strong> |
| Filesystem protocol | Full 9P2000.L: message enum incl. Tsymlink, Tstatfs, setattr path <strong>[code: lib9p/include/lib9p/p9.h]</strong> |
Reduced 9P2000.L subset: Tversion, Tattach, Twalk, Tlopen, Tlcreate, Tread, Twrite, Tclunk, Tgetattr, Treaddir, Tmkdir, Tunlinkat, Trenameat — <strong>no</strong> setattr/symlink/readlink/link/fsync/statfs/flush <strong>[code: include/protocol/nine_p_types.h]</strong> |
None — transport only <strong>[code: no filesystem protocol in src/]</strong> |
| Transport | virtio-mmio only, QEMU virt machine <strong>[code: src/transport_virtio.c header comment]</strong> |
PCI modern (vendor 0x1AF4, device 0x1009) + MMIO v1 and v2 <strong>[docs: README; code: both transport files exist]</strong> | PCI <strong>modern-only</strong> (0x1040 + type device IDs, dev->leagcy = false) + MMIO v1 & v2 registers incl. queue reset <strong>[code: src/virtio_pci/virtio_pci.c L16/L616, src/virtio_mmio/virtio_mmio.c]</strong> |
| Interrupts | Not examined in depth | MSI-X programmed manually via raw config-space reads (kCapIdMsix = 0x11, table BIR/offset, APIC vector arithmetic) with INTx fallback <strong>[code: pci_transport.cpp L147–361]</strong> |
MSI-X via QNX libpci (cap_msix_set_nirq, cap_msix_set_irq_entry, pci_device_cfg_cap_enable, cap_msix_unmask_irq_entry), one IST per device using InterruptAttachThread() + InterruptWait() <strong>[code: virtio_pci.c L655–690, virtio.c L37–48]</strong> |
| Linux↔QNX errno mapping | Explicit table, "never a cast", every asm-generic value mapped, fallback EIO <strong>[code: src/errno_map.c header + switch]</strong> |
Linux open-flag constants present <strong>[code: nine_p_types.h L109]</strong>; errno mapping not examined |
N/A (transport only) |
| Operations coverage | read, write, create, truncate, chmod/chown/utime, fsync, mkdir/rmdir, rename, symlinks, hard links, df, exec from share <strong>[docs: README — consistent with the message enum in lib9p/p9.h, but not executed]</strong> |
read, write, create, dirs, unlink, rename <strong>[code: message enum]</strong> | N/A |
| Privileges | Non-root with three abilities: mem_phys, interrupt, pathspace <strong>[docs: README + docs/user/integrating.md; exact on -u ... -A command line shown there]</strong> |
Unspecified | Sample uses ThreadCtl(_NTO_TCTL_IO) (root or IO privilege) <strong>[code: src/gpio/main.c]</strong> |
| Queue features | Unspecified | Unspecified | Descriptor chains via virtq_put_desc_chain; ring layout reserves avail_event/used_event slots; <strong>no indirect-descriptor support and no EVENT_IDX negotiation found</strong> <strong>[code: src/virtio/virtq.h, virtq.c]</strong> |
| Concurrency model | Multiple in-flight requests, signal interruption, clean unmount, timeout recovery, optional metadata cache <strong>[docs: README — src/cache.c exists in code]</strong> |
Unspecified; global OCB state (g_last_ext_ocb) suggests a simplified single-threaded model <strong>[code: fs_virtio9p.cpp L108–214]</strong> |
pthread spinlock around device ops; reset with polling timeout <strong>[code: virtio.c]</strong> |
| Testing | Comparison against QEMU 9P server trace events <strong>[docs: README Credits]</strong>; tests/unit + tests/integration directories exist <strong>[code: file listing]</strong> |
Unspecified; part of a Bazel-based QEMU test runner <strong>[docs: top-level README]</strong> | pytest integration tests driving QEMU over serial (tests/gpio/test_gpio.py); <strong>requires SDP + QEMU, no PC unit tests</strong> <strong>[code: test sources]</strong> |
| PC buildability (no SDP) | No — requires QNX SDP 8.0 <strong>[docs: README "Requires QNX SDP 8.0 to build"]</strong> | No — Bazel + QNX cross-toolchain <strong>[docs]</strong> | No — src/virtio/virtio.c includes <sys/neutrino.h> directly <strong>[code]</strong> |
2. What We Read in the Code vs Only in the Documentation
Read in the code (paths are inside the vendored copies)
- **A**: `lib9p/include/lib9p/p9.h` (full 9P2000.L message enum incl. `Tsymlink=16`, `Tstatfs=8`), `src/errno_map.c` (Linux→QNX errno table with explicit switch, `EIO` fallback), `src/transport_virtio.c` (mmio-only backend), `LICENSE` (Apache-2.0).
- **B**: `include/protocol/nine_p_types.h` (exact 13-message subset), `src/transport/pci_transport.cpp` (manual MSI-X programming with INTx fallback; device ID 0x1009 per README), `src/resmgr/fs_virtio9p.cpp` (resmgr/iofunc integration), Eclipse Apache-2.0 headers.
- **C**: `src/virtio/virtio.c` (`InterruptAttachThread` IST loop, spinlocks, polled device reset), `src/virtio/virtq.h/.c` (descriptor allocation/chaining API, no indirect descriptors, no EVENT_IDX feature negotiation), `src/virtio_pci/virtio_pci.c` (modern-only PCI IDs `0x1040+type`, full `libpci` MSI-X sequence, capability parsing incl. `SHARED_MEMORY_CFG=8`), `src/virtio_mmio/virtio_mmio.c` (v1 and v2 register maps incl. per-queue reset), `tests/gpio/` (QEMU/serial integration tests), `cmake/toolchains/` (x86_64 + aarch64le), `LICENSE.md` (MIT).
Read only in documentation (not verified by execution)
- **A**: all functional claims (exec-from-share, symlink behavior, timeout recovery, cache semantics, ability set); its "gaps" list in the user guide was **not read**.
- **B**: claimed PCI auto-discovery details beyond what the code inspection showed; performance characteristics; ARM64 MMIO base addresses (`smem=0xa003600,irq=75` in README examples).
- **C**: README build/test workflow; the claim that the library is reusable "for other virtio drivers".
- **All three**: runtime behavior under QEMU. Nothing was executed — feasibility tests E1–E5 cover this (see [verification-status.md](verification-status.md)).
3. Gaps Passerelle Fills
| Gap (spec Section 2) | Evidence from this study |
|---|---|
| <strong>Complete share on x86_64 guest</strong> | A has no PCI backend in code; B's x86_64 client implements only 13 of the ~25 messages needed for POSIX parity (no setattr, symlink, fsync, statfs) |
| <strong>virtiofs for a QNX guest</strong> | None of A/B/C contains any FUSE protocol code; QNX Hypervisor's virtio-fs is host-side only <strong>[docs: QNX hypervisor page, spec §2]</strong> |
| <strong>Conformance + benchmark testbed applicable to all clients</strong> | A tests against server traces; B has none documented; C tests only its GPIO sample — none provides a differential harness runnable against a third-party client |
| <strong>Priority-ordered request scheduling</strong> | No priority logic found in A/B/C code; C uses a plain spinlock-serialized queue |
<strong>One-command setup on mkqnximage images</strong> |
A requires manual snippet + QEMU flags <strong>[docs: README quickstart]</strong>; B is embedded in a Bazel runner; C has no host tooling |
| <strong>PC-buildable, fuzz-testable protocol layers (P9-10)</strong> | None of the three builds without the QNX SDP (A: SDP required; B: Bazel+SDP; C: <sys/neutrino.h> in core transport) |
4. Other Observations
- **QNX Hypervisor virtio-fs**: QNX documents a virtio-fs *device* where QNX is the **host** sharing folders with Linux/Android guests **[docs: spec §16 link]**. No guest-side QNX virtiofs driver was found; absence remains **unproven** — the question will be asked on the hackathon Discord (spec §11, §14).
- **Reuse posture**: per [decisions.md](decisions.md), Passerelle writes its own transport (D3) and offers the PCI/x86_64 work back to project A (D2). No file is copied from any of the three repositories; see [NOTICE](../NOTICE).