Skip to content

virt: add opt-in Aura PV discovery client - #778

Open
DjDeveloperr wants to merge 3 commits into
mainfrom
codex/aura-pv
Open

DjDeveloperr wants to merge 3 commits into
mainfrom
codex/aura-pv

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

What changed

  • add the opt-in Aura PV discovery client (CONFIG_AURA_PV) and ABI 0.1 UAPI
  • expose bounded discovery and arithmetic self-test ioctls through /dev/aura-pv
  • add the executable selftest and document the ABI and explicit limitations

Validation

  • drivers/virt/aura_pv.o builds with CONFIG_AURA_PV=m
  • selftest compiles and exits 4 when /dev/aura-pv is unavailable, as expected
  • m1n1 host endpoint default-off/opt-in build and contract checks pass

This PR intentionally does not claim /dev/kvm guest-run, EL1 entry, stage-2 translation, virtual interrupts, timers, or nested guest context switching. The current m1n1 host has one global stage-2/VTTBR context, so a safe per-VM protocol is still required before ABI 0.2 guest execution.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Review, not merged yet. It builds in a test merge on integration/aurora 86cb1c3 (with 731 and 856), and the header passes HDRTEST. A few things to fix first:

  1. include/uapi/linux/aura_pv.h uses BIT_ULL() from <linux/bits.h>. The uapi linux/bits.h only has __GENMASK, so userspace that uses AURA_PV_FEATURE_* or AURA_PV_OUTPUT_* won't compile. HDRTEST doesn't catch it because nothing expands the macros. _BITULL() from <linux/const.h> works in both.
  2. aura_pv_hvc() is hand-rolled and doesn't list x4 to x17 as clobbered. That's only safe if Aura promises SMCCC 1.1 register preservation for these function IDs. arm_smccc_1_1_hvc() would cover it, or the asm needs the clobbers. If the x19/x20 sentinels are there to check that Aura preserves callee-saved registers, the client never compares them after the call.
  3. .compat_ioctl = aura_pv_ioctl passes a 32-bit pointer through unchanged. compat_ptr_ioctl is the usual fix.
  4. There's no module_exit, so the module can't be unloaded, and with no modalias it never autoloads. That's fine for a diagnostic, but the docs should say it has to be loaded by hand.
  5. asahi.config turns it on as =m for every distro kernel. It's harmless without the DT node, but the Aura side that publishes aurora,aura-kvm-pv-0 isn't merged yet (aura PR 33 is still a draft). Until it is, this would ship a module nothing can bind.

I'd hold it until the Aura host side lands and one guest run has passed on the Neo. Happy to re-run the build once it's updated.

@DjDeveloperr DjDeveloperr mentioned this pull request Nov 9, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Heads-up: #1363 (merged as 8484356) removed APIF from integration/aurora, including tools/testing/selftests/aurora-apif/. This PR still adds a test under that directory, so it needs a small fixup on rebase: move the test, or drop it if it's APIF-only.

@RyanTheTide

Copy link
Copy Markdown
Contributor

aura #77 (merged 2026-11-07) removed the PV-KVM endpoint, the monitor and the aurora,aura-kvm-pv-0 node this client binds to, so nothing on the tip or in aura can answer /dev/aura-pv any more. The branch also no longer applies to integration/aurora 110861f: its selftest lives in tools/testing/selftests/aurora-apif/, which #1363 removed. With the host side gone this looks obsolete; if PV discovery comes back on the aura side, a fresh PR against the new interface would be the way to bring it back.

@github-actions github-actions Bot added merge-conflict Conflicts with the base branch (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Nov 24, 2026

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CLOSE (obsolete; Aura PV endpoint removed in aura#77) at ce0b634c

Blockers:

  1. CONFLICTING with main and no CI run on current main.
  2. aura#77 (merged 2026-11-07) removed the PV-KVM endpoint, monitor, and aurora,aura-kvm-pv-0 DT node that this client binds to, so nothing in aura answers /dev/aura-pv.

Checked:

  • Verified mergeability (CONFLICTING) and prior status note confirming the Aura-side PV endpoint was removed in aura#77.
Evidence
  • Head ce0b634c vs main: CONFLICTING, 0 checks run.
  • Close unless a new Aura PV protocol is reintroduced and this branch is rebased onto main with current tests and hardware rows.

Resolve asahi.config: keep main's new entries and add the Aura PV client options after them.

Signed-off-by: DjDeveloperr <[email protected]>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 30, 2026 23:42

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: CLOSE (obsolete; Aura PV endpoint removed in aura#77) at e4273b687246

Blockers:

  • aura#77 (merged 2026-11-07) removed the PV-KVM endpoint, monitor, and aurora,aura-kvm-pv-0 DT node that this client binds to, so nothing in aura answers /dev/aura-pv.
  • Its selftest still lands under tools/testing/selftests/aurora-apif/, which #1363 removed from main.
  • Hosted CI is currently queued (27 jobs) — unless a replacement Aura PV host endpoint is planned, recommend closing this PR rather than merging dead discovery code.

Checked:

  • Verified merge commit e4273b687246 resolved asahi.config cleanly (MERGEABLE against main, 7 files +391/-0), while the underlying obsolescence noted on 2026-11-22 and 2026-11-28 remains unchanged.
Evidence
  • Head: e4273b687246187f0bed68ee34728b04bedcef08 (base main, MERGEABLE).

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the conflict-pass merge commit e4273b6 only: asahi.config keeps both sides (CONFIG_VIRT_DRIVERS=y, CONFIG_AURA_PV=m). The resolution keeps what each side had and adds nothing outside the conflict. Approved for the merge-up; merging still waits on CI and the rows at this head.

@github-actions github-actions Bot removed merge-conflict Conflicts with the base branch (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Merge readiness at e4273b68: not ready yet

Check Detail
CI at head no failing: apple-build, host-tests, source, KUnit ane-boot, rust-build, KUnit ane-pm
Review ok approved by RyanTheTide
Requested changes ok none
Hardware row at head no no line with the head SHA e4273b68, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text adopt when you next edit add a 'Tested:' line; a 'Risk:' line (door and Macs) (guide)

Areas: none matched in CODEOWNERS

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Dec 1, 2026

This branch has not been deployed

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

Labels

ci-failing A check failed at the PR head (bot) needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants