Skip to content

trusty: ipc: Submit shared-memory handles as premapped buffers - #251

Draft
latentoperator wants to merge 1 commit into
derekross:omamobilefrom
latentoperator:omamobile-lynx-trusty-20261114
Draft

latentoperator wants to merge 1 commit into
derekross:omamobilefrom
latentoperator:omamobile-lynx-trusty-20261114

Conversation

@latentoperator

@latentoperator latentoperator commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

November 19 review update

The separate lynx build reported by alfikpl had no per-device DMA override and Trusty rejected the inbound message size. Our archived November 13 configuration had both CONFIG_XEN=y and CONFIG_ARCH_HAS_DMA_OPS=y. There is no isolated record of that failure on our handset. The design reason for passing shared-memory handles explicitly still applies. The revised commit message records this distinction; that revision is local pending human sign-off. The independent 7a and 7 Pro checks remain open. Original report

The isolated arm64 build on upstream 26867fc4e826 produced 7.3.0-rc6-omamobile-lynx-trusty-ba8c55460a+ and 1,830 matching modules. I unpacked the five-image Pixel 7a set on the host, compared the kernel and device tree with the build outputs, and verified the boot and init_boot AVB footers. WLAN and PCIe stay disabled. The release suffix identifies the pre-message-edit commit. Its source tree is identical to the patch awaiting sign-off. This is host evidence. The independent 7a run and the reference 7 Pro run are still open.

November 15 submission

What and why

Trusty IPC shares its message storage before queuing. Submit its shared-memory
handle through premapped TX, initial RX and recycled RX descriptors, rather than
mapping the bookkeeping structure through a transport DMA override.

One independent commit. This intentionally changes the shared Trusty transport
on every Trusty board; IPC, AoC and dependent-service regression checks on the
reference Pixel 7 Pro remain a merge gate.

Evidence and limits

The source was split from the local experimental stack that passed one guarded
Pixel 7a connection on November 13, documented in
mobile #751.
That test used 7.3.0-rc6-omamobile-lynx-msi-20261113+ on published base
2db2bc35b plus local changes. It does not qualify these revised commits.
An earlier readiness-corrected connection stalled WMI/TX and lost USB; the
bounded guard recovered the phone. One later pass does not establish the
failure's cause or a stable fix.

Combined offline preparation on published omamobile base
82f31d3a7a3511f9c5a6d1e7c855358762ed3f58: six touched C objects and ten DTBs
build with W=1 and no new diagnostics; nine non-lynx DTBs including cheetah are
byte-identical. Both changed bindings pass documentation validation; full
schema checks add no diagnostics over base, including the lab overlays.
AoC absent/module/built-in consumer reachability checks pass. Strict checkpatch
has no errors, only the new-header MAINTAINERS warning. Independent source
review caught and rechecked late-link MSI readiness, runtime MSI disablement,
and the binding's required AoC dependency.

This is combined source/build evidence, not a standalone build or runtime
qualification of every topic/intermediate commit. No complete new kernel/module
link or fresh phone-smoke report is claimed. The full historical smoke table is
in #751; all six required checks passed on that earlier boot. Optional CMA/GPU
failures remain recorded there. No device operation was performed to prepare
these commits. Firmware and private captures are not included.

Before merge

Keep this draft while reference-device and revised-source qualification remain
open. Shared Trusty/AoC behavior must run on the Pixel 7 Pro before merge;
unchanged DTBs do not establish unchanged shared C behavior. A complete matched
kernel/module/image set and a new reviewed, identity-pinned watchdog/recovery
runbook are required before an attended lynx trial. Automatic firmware-ready
reprobe and lifetime handling, sustained traffic, reconnect, suspend/resume and
Bluetooth coexistence remain unqualified. The new board path stays disabled.

Human DCO certification was completed on November 14 and independently verified
against the frozen review inputs: 25 commit objects across the five topic and
integration refs, representing ten logical patches. The signed source trees,
per-commit diffs, author identities and author dates are unchanged.

Published topic head: 94222c3bdd58ddc60ad8d3c516086900369eaa81 (1 commits including any prerequisites).
The exact signed head passes local tools/kernel-pr-check --merge against
82f31d3a7: clean merge, author sign-offs, prefixes, checkpatch and privacy/blob
policy. Hosted exact-head CI now passes sign-offs, checkpatch, W=1 and device-tree checks. No merge or release enablement is
requested.

Related work

Trusty IPC allocates and shares message storage before queuing it. The
virtqueue descriptor must carry that shared-memory handle, not the
address of the message-buffer bookkeeping structure. Set the scatterlist
DMA fields explicitly and use the premapped virtqueue helpers for TX,
initial RX and recycled RX. Remove the transport's private DMA override.

The combined local stack passed Trusty IPC and AoC startup on lynx on
November 13. This changes the shared transport on every Trusty board;
Pixel 7 Pro IPC, AoC and dependent-service regression testing is required.
This preparation is rebased and has not run on hardware.

Assisted-by: OpenAI Codex
Signed-off-by: Chris Gray <chrisgray70@gmail.com>
@derekross

Copy link
Copy Markdown
Owner

Thank you, Chris. I read this one on its own, and I think the direction is right: handing the virtqueue the shared-memory id as a premapped address says what the code means, where the override got there by mapping the bookkeeping struct and turning its address back into the id. By my reading the descriptors Trusty sees are the same as before (the same id and length), and nothing else in drivers/trusty still queues the old way.

It does change what the Pixel 7 Pro runs at every boot, as you say yourself, so it needs a run there before it merges, and that one is mine. Before it leaves draft:

  1. Please put the reason in the message. What went wrong on the 7a with the override? There's one reason that would hold on every phone: on arm64, per-device DMA ops exist only when Xen is configured (select ARCH_HAS_DMA_OPS if XEN); without it set_dma_ops() does nothing, and the old path would pass Trusty the address of a kernel struct. Our config has Xen on only because defconfig does. If that's what you hit, say so; if it was something else, I'd like to know what.
  2. One run of this commit alone on your 7a on today's omamobile, with the kernel release in the message. The one pass so far was the whole local stack.

I haven't built it on today's base or compared objects yet; I'll do both when it's ready. This PR stands alone, so it can go in ahead of the rest of the series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants