R5c: illumos LinuxKPI layer (misc/linuxkpi) and the headless i915 (i915n) #15

Merged
toasterson merged 23 commits from r5c-linuxkpi into main 2026-10-05 17:02:32 +00:00
Owner

Anima work item: R5c 01a0f883-4e37-7572-95e8-bef02227b7f9

Adds the illumos Linux compatibility layer misc/linuxkpi and the headless Linux v7.2 i915 built on it as i915n.

  • i915n compiles with the illumos kernel flags and links with ld -ztype=kmod -z defs with no unresolved symbol.
  • It is packaged, without PCI aliases, together with the layer and drm-helpers.
  • It has not attached to an Intel GPU yet. The first attempt is on the ThinkPad X230 (gen7) and the 2018 MacBook Pro (gen9.5); the procedure is in the bring-up runbook.

This branch merges r5e-helpers (#14): misc/drm_helpers now builds on the layer. Review R5e's own content in #14.

Inventory (Linux v7.2 8d3ae59288f1, R5c configuration)

  • i915.mod has 310 objects. 163 translation units are headless (113,093 lines), and the display has 145.

  • Imports of the headless set:

    Provider Symbols
    kernel 437
    drm.ko 63
    dma-buf 39
    TTM 29
    gpu/drm buddy 6
    drm_kms_helper 3
    display functions 108
    excluded units 7
  • The include closure has 1,292 headers, 718 of them GPL-only. The build uses none of them.

  • Built: 154 Linux units, all MIT, plus 3 illumos units (module glue, generated display stubs, TTM/GSC/GMCH stubs).

  • Left out: the display, the TTM/local-memory/GSC units, the PMU, the gen2-5 GTT, and the two GPL tracepoint units.

  • Decision on ttm_device_init: it is not carried. Integrated GPUs place nothing with TTM, and discrete GPUs are refused at probe.

  • Licence check: every Linux file the compiler reads (483) is checked for MIT or HPND, and 0 are refused. Three GPL-2.0 headers i915 includes are replaced in the fetched tree by MIT files: the two tracepoint headers (generated no-ops) and intel_ips.h. No Linux source is in this repository: drivers/i915/PIN, fetch-and-patch.sh and patches/.

Layer (linuxkpi/, MIT)

  • Module decision: a separate module, misc/linuxkpi, versioned with LINUXKPI_ABI 1. It links -N misc/drm_core with -z defs against the DDI mapfile, the facade mapfile and private.d; the latter is 48 symbols beyond the DDI, each with its reason. Drivers link -N misc/linuxkpi against the generated linuxkpi.mapfile.
  • Packaging: packaging/linuxkpi.p5m. drmadm NEW_PKGS gains linuxkpi, drm-helpers and i915n. G7 mutual exclusion holds: excluding misc/drm_core keeps the layer and everything on it out.
  • Headers: 252, one per Linux header, under linuxkpi/include/{linux,asm,acpi,drm,lkpi,trace,uapi,xen}, plus a force-included prologue that renames the illumos tags that collide.
  • Sources: 35 in src/:
    • allocation (kmalloc with a header, slab over kmem_cache, may-fail requests that do not wait forever);
    • pages and shmem (over ddi_umem_alloc), vmap WB/WC/UC over hat_devload;
    • DMA over ddi_dma (one page per scatterlist entry, copy buffers refused), pin_user_pages over ddi_umem_lock;
    • locks, ww_mutex over the core's wait-die locks;
    • RCU/SRCU with two-phase reader counts, timers on a thread with an AVL tree, workqueues, tasklets and irq_work on ddi_taskq, completions and wait queues;
    • PCI/MMIO and IRQs (MSI-X, MSI or INTx; threaded handlers refused), firmware over firmload;
    • xarray/IDR/IDA, rbtree, bitmaps, printf with %p extensions (plain %p hashed);
    • fences, fence arrays and reservations over the facade, and the DRM device glue.
  • Explicit stubs: runtime PM, debugfs, sysfs, hwmon, tracepoints, perf, ACPI, vga_switcheroo, PM QoS and component answer "not present". The shrinker runs on its own task queue. SSE4.1 is not reported to drivers, so no driver enters a kernel FPU section.

Facade 1.1 (core)

  • Hooks for the device, file and inode types.
  • dma_resv_init/fini/trylock.
  • C transactions in the core's wait-die class (drm_illumos_ww_stamp, drm_illumos_resv_lock_ctx/trylock_ctx/unlock_ctx/is_locked).
  • drm_illumos_resv_fences: one snapshot per walk with each fence's usage. A driver's own fence comes back as its own structure, so i915 recognises its requests.
  • drm_syncobj_create, drm_syncobj_fence_get, drm_is_current_master.
  • illumos_close_every_handle: Linux's close for every handle, which i915's lookup tables need.
  • drm_dev_illumos_unplug/drm_dev_illumos_put: Linux's lifecycle.
    • The layer registers the device at devm_drm_dev_alloc(), because i915 makes GEM objects before it registers.
    • Detach is refused while user space holds the device.
    • The last put runs the driver's release (which frees i915's own objects) and then unregisters.

i915 patches (drivers/i915/patches, all __illumos__)

  • 0001: the core owns the device file.
  • 0002: no panic screen.
  • 0003: GEM handle lookups through the core.
  • 0004: execbuffer out-fences through the core.
  • 0005: user mappings through the core (WB; WC/UC only where coherent with the LLC), illumos_umem, close for every handle.
  • 0006: the display-engine interrupt master enable without the display code. On gen5-7 no interrupt arrives without it.
  • 0007: timeline points through the core.
  • 0008: SET_CACHING keeps the WB-for-WC objects coherent.
  • 0009: GPUs outside gen6-9.5 with a PCH are refused.
  • 0010: reference lookups straight through the core.

At 57022d7, built on oibuild (gcc 14.3.0-oi-4, JOBS=2):

  • 157/157 units compiled.
  • ld -ztype=kmod -N misc/drm_core -N misc/linuxkpi -N misc/drm_helpers -z defs -M ddi.mapfile -M drm_facade.mapfile -M linuxkpi.mapfile -M drm_helpers.mapfile -M drivers/i915/private.mapfile succeeded with 0 unresolved. private.mapfile holds 3 symbols: _pageshift (from the facade's inline drm_vma_node_offset_addr), memcmp and strrchr.
  • misc/linuxkpi, misc/drm_helpers and linuxkpi_selftest were also linked with -z defs.
  • CI now runs this link gate.

Tests

  • Host tests:
    • layer: 30 tests, 777 checks (trees, xarray/IDR/IDA, bitmaps, lists, refcount, printf, strings, kobjects; clang sanitizers on the Mac, gcc on illumos);
    • carried: 24 tests, 839,569 checks;
    • drm-core: 160 tests, including native-fence lookup against the last put, mixed C/Rust wait-die transactions and handle_dropped.
  • Guest (hephaistos, illumos 7e802e88a3, -device pci-testdev): tools/test/run-r5c-test.sh passed 22 checks.
    • No module defines a kernel symbol. The runs found six collisions (for example timer_delete, sscanf), now renamed.
    • linuxkpi_selftest passed 157 checks, including concurrency tests:
      • workqueues, timers, hrtimers, tasklets, RCU/SRCU and quiesce;
      • shmem, vmap, DMA, SLAB_TYPESAFE_BY_RCU and the shrinker;
      • reservation walks, AB/BA transactions and fence arrays;
      • a DRM device made as i915 makes its own.
    • Detach was refused while a DRM node was open, and the release ran at the detach that followed.
    • i915n loaded and unloaded twice and refused a device outside its ID table.
    • No WARN fired outside the self-test.
    • run-r5e-test.sh with misc/drm_helpers on the layer passed (130,876 checks at seed 20261004, as R5e).
  • Not run: the i915 probe. There is no Intel GPU in the guest; this is the first step on the hardware.

Review

Opus reviews, four areas per round.

  • Round 1: all four areas rejected. The findings are fixed in cdf6f47 and the commits after it. Among them: the interrupt master enable, per-handle close, native fences, reservation-walk leaks, detach lifetime, RCU grace periods, a workqueue lost wakeup, may-fail allocations, the licence checks and the CI gate.
  • Round 2:
    • memory, scheduling/PCI and i915/build/packaging approved;
    • core/DRM rejected with one blocker: i915 makes GEM objects before drm_dev_register(), when the core had no GEM state yet. That and its other findings are fixed in 57022d7 (the lifecycle above, plus a guest test of it) and have not been re-reviewed. After two rounds the item is the owner's decision.

Open issues

  • The i915 probe and everything after it is untested until the X230/MBP run.
  • Patch 0004: if the sync-file descriptor cannot be made after submission, the ioctl fails for a submitted batch. A core reserve/commit interface would close this.
  • Mappings: GTT mmaps (through the aperture) return -ENODEV. Discrete and LMEM GPUs are not supported.
  • Builds without -Werror: the layer, glue and carried builds use only selected -Werror= flags.
  • Detach: a device whose state the core cannot drop within five seconds of the release stays attached until reboot, by design.
Anima work item: R5c `01a0f883-4e37-7572-95e8-bef02227b7f9` Adds the illumos Linux compatibility layer `misc/linuxkpi` and the headless Linux v7.2 i915 built on it as `i915n`. - `i915n` compiles with the illumos kernel flags and links with `ld -ztype=kmod -z defs` with no unresolved symbol. - It is packaged, without PCI aliases, together with the layer and `drm-helpers`. - It has not attached to an Intel GPU yet. The first attempt is on the ThinkPad X230 (gen7) and the 2018 MacBook Pro (gen9.5); the procedure is in the bring-up runbook. This branch merges `r5e-helpers` (#14): `misc/drm_helpers` now builds on the layer. Review R5e's own content in #14. ## Inventory (Linux v7.2 `8d3ae59288f1`, R5c configuration) - `i915.mod` has 310 objects. 163 translation units are headless (113,093 lines), and the display has 145. - Imports of the headless set: | Provider | Symbols | |---|---| | kernel | 437 | | `drm.ko` | 63 | | dma-buf | 39 | | TTM | 29 | | gpu/drm buddy | 6 | | `drm_kms_helper` | 3 | | display functions | 108 | | excluded units | 7 | - The include closure has 1,292 headers, 718 of them GPL-only. The build uses none of them. - **Built:** 154 Linux units, all MIT, plus 3 illumos units (module glue, generated display stubs, TTM/GSC/GMCH stubs). - **Left out:** the display, the TTM/local-memory/GSC units, the PMU, the gen2-5 GTT, and the two GPL tracepoint units. - **Decision on `ttm_device_init`:** it is not carried. Integrated GPUs place nothing with TTM, and discrete GPUs are refused at probe. - **Licence check:** every Linux file the compiler reads (483) is checked for MIT or HPND, and 0 are refused. Three GPL-2.0 headers i915 includes are replaced in the fetched tree by MIT files: the two tracepoint headers (generated no-ops) and `intel_ips.h`. No Linux source is in this repository: `drivers/i915/PIN`, `fetch-and-patch.sh` and `patches/`. ## Layer (`linuxkpi/`, MIT) - **Module decision:** a separate module, `misc/linuxkpi`, versioned with `LINUXKPI_ABI` 1. It links `-N misc/drm_core` with `-z defs` against the DDI mapfile, the facade mapfile and `private.d`; the latter is 48 symbols beyond the DDI, each with its reason. Drivers link `-N misc/linuxkpi` against the generated `linuxkpi.mapfile`. - **Packaging:** `packaging/linuxkpi.p5m`. drmadm `NEW_PKGS` gains linuxkpi, drm-helpers and i915n. G7 mutual exclusion holds: excluding `misc/drm_core` keeps the layer and everything on it out. - **Headers:** 252, one per Linux header, under `linuxkpi/include/{linux,asm,acpi,drm,lkpi,trace,uapi,xen}`, plus a force-included prologue that renames the illumos tags that collide. - **Sources:** 35 in `src/`: - allocation (`kmalloc` with a header, slab over `kmem_cache`, may-fail requests that do not wait forever); - pages and shmem (over `ddi_umem_alloc`), `vmap` WB/WC/UC over `hat_devload`; - DMA over `ddi_dma` (one page per scatterlist entry, copy buffers refused), `pin_user_pages` over `ddi_umem_lock`; - locks, ww_mutex over the core's wait-die locks; - RCU/SRCU with two-phase reader counts, timers on a thread with an AVL tree, workqueues, tasklets and irq_work on `ddi_taskq`, completions and wait queues; - PCI/MMIO and IRQs (MSI-X, MSI or INTx; threaded handlers refused), firmware over `firmload`; - xarray/IDR/IDA, rbtree, bitmaps, printf with `%p` extensions (plain `%p` hashed); - fences, fence arrays and reservations over the facade, and the DRM device glue. - **Explicit stubs:** runtime PM, debugfs, sysfs, hwmon, tracepoints, perf, ACPI, vga_switcheroo, PM QoS and component answer "not present". The shrinker runs on its own task queue. SSE4.1 is not reported to drivers, so no driver enters a kernel FPU section. ## Facade 1.1 (core) - Hooks for the device, file and inode types. - `dma_resv_init`/`fini`/`trylock`. - C transactions in the core's wait-die class (`drm_illumos_ww_stamp`, `drm_illumos_resv_lock_ctx`/`trylock_ctx`/`unlock_ctx`/`is_locked`). - `drm_illumos_resv_fences`: one snapshot per walk with each fence's usage. A driver's own fence comes back as its own structure, so i915 recognises its requests. - `drm_syncobj_create`, `drm_syncobj_fence_get`, `drm_is_current_master`. - `illumos_close_every_handle`: Linux's `close` for every handle, which i915's lookup tables need. - `drm_dev_illumos_unplug`/`drm_dev_illumos_put`: Linux's lifecycle. - The layer registers the device at `devm_drm_dev_alloc()`, because i915 makes GEM objects before it registers. - Detach is refused while user space holds the device. - The last put runs the driver's release (which frees i915's own objects) and then unregisters. ## i915 patches (`drivers/i915/patches`, all `__illumos__`) - 0001: the core owns the device file. - 0002: no panic screen. - 0003: GEM handle lookups through the core. - 0004: execbuffer out-fences through the core. - 0005: user mappings through the core (WB; WC/UC only where coherent with the LLC), `illumos_umem`, close for every handle. - 0006: the display-engine interrupt master enable without the display code. On gen5-7 no interrupt arrives without it. - 0007: timeline points through the core. - 0008: SET_CACHING keeps the WB-for-WC objects coherent. - 0009: GPUs outside gen6-9.5 with a PCH are refused. - 0010: reference lookups straight through the core. ## Link gate At `57022d7`, built on oibuild (gcc 14.3.0-oi-4, JOBS=2): - 157/157 units compiled. - `ld -ztype=kmod -N misc/drm_core -N misc/linuxkpi -N misc/drm_helpers -z defs -M ddi.mapfile -M drm_facade.mapfile -M linuxkpi.mapfile -M drm_helpers.mapfile -M drivers/i915/private.mapfile` succeeded with 0 unresolved. `private.mapfile` holds 3 symbols: `_pageshift` (from the facade's inline `drm_vma_node_offset_addr`), `memcmp` and `strrchr`. - `misc/linuxkpi`, `misc/drm_helpers` and `linuxkpi_selftest` were also linked with `-z defs`. - CI now runs this link gate. ## Tests - **Host tests:** - layer: 30 tests, 777 checks (trees, xarray/IDR/IDA, bitmaps, lists, refcount, printf, strings, kobjects; clang sanitizers on the Mac, gcc on illumos); - carried: 24 tests, 839,569 checks; - drm-core: 160 tests, including native-fence lookup against the last put, mixed C/Rust wait-die transactions and `handle_dropped`. - **Guest** (hephaistos, illumos `7e802e88a3`, `-device pci-testdev`): `tools/test/run-r5c-test.sh` passed 22 checks. - No module defines a kernel symbol. The runs found six collisions (for example `timer_delete`, `sscanf`), now renamed. - `linuxkpi_selftest` passed 157 checks, including concurrency tests: - workqueues, timers, hrtimers, tasklets, RCU/SRCU and quiesce; - shmem, vmap, DMA, `SLAB_TYPESAFE_BY_RCU` and the shrinker; - reservation walks, AB/BA transactions and fence arrays; - a DRM device made as i915 makes its own. - Detach was refused while a DRM node was open, and the release ran at the detach that followed. - `i915n` loaded and unloaded twice and refused a device outside its ID table. - No WARN fired outside the self-test. - `run-r5e-test.sh` with `misc/drm_helpers` on the layer passed (130,876 checks at seed 20261004, as R5e). - **Not run:** the i915 probe. There is no Intel GPU in the guest; this is the first step on the hardware. ## Review Opus reviews, four areas per round. - **Round 1:** all four areas rejected. The findings are fixed in `cdf6f47` and the commits after it. Among them: the interrupt master enable, per-handle close, native fences, reservation-walk leaks, detach lifetime, RCU grace periods, a workqueue lost wakeup, may-fail allocations, the licence checks and the CI gate. - **Round 2:** - memory, scheduling/PCI and i915/build/packaging approved; - core/DRM rejected with one blocker: i915 makes GEM objects before `drm_dev_register()`, when the core had no GEM state yet. That and its other findings are fixed in `57022d7` (the lifecycle above, plus a guest test of it) and have not been re-reviewed. After two rounds the item is the owner's decision. ## Open issues - The i915 probe and everything after it is untested until the X230/MBP run. - **Patch 0004:** if the sync-file descriptor cannot be made after submission, the ioctl fails for a submitted batch. A core reserve/commit interface would close this. - **Mappings:** GTT mmaps (through the aperture) return -ENODEV. Discrete and LMEM GPUs are not supported. - **Builds without `-Werror`:** the layer, glue and carried builds use only selected `-Werror=` flags. - **Detach:** a device whose state the core cannot drop within five seconds of the release stays attached until reboot, by design.
Minimal Linux headers at R5c's paths (linuxkpi/include/linux) for the
carried helpers: types, compiler annotations (typeof for the gate's
-fno-asm), limits, bitops, math64, log2, bug (WARN through cmn_err),
kernel (min/max), errno, lists over the facade's struct list_head
(without list_move_tail, which illumos' sys/list.h has), red-black trees
with Linux's node layout and augmentation protocol (linuxkpi/lib/rbtree.c,
textbook algorithms), the generic interval tree, and stubs drm_mm only
includes (slab, seq_file, stacktrace, mm_types, export, spinlock).
Reimplementations, not copies: Linux's are GPL (decision D7).
drm_mm.c and drm_mm.h (MIT text, Tungsten Graphics and Intel) vendored
byte for byte at 8d3ae59288 (carried/linux.pin) with their SHA-256 in
carried/drm_mm/SOURCES and an empty patch series. fetch-and-patch
verifies them (-f against git.kernel.org at the pin, -u refreshes),
refuses non-MIT files and applies the series; build.sh compiles them
with the gate's kernel flags and links misc/drm_helpers -z defs -B
reduce, failing unless its globals are exactly _init, _fini, _info and
the ten drm_mm functions i915's headless build imports
(drm_helpers_scope.mapfile; drm_helpers.mapfile for dependents).
carried/drm_mm/tests/drm_mm_selftest.c re-expresses the six KUnit
cases of Linux's GPL-only drm_mm_test.c and adds what i915 relies on:
reservations, insertion modes and ONCE, ranges, non-power-of-two
alignments, colour adjustment with guard gaps, interval queries, the
eviction scan with colour eviction, random walks against an exhaustive
feasibility oracle and independent allocators on four threads. Every
change is followed by a full verification of the allocator's list,
holes and three red-black trees.

drm_helpers_test is a pseudo driver linked -N misc/drm_helpers against
the exported functions only; it runs the tests at attach and reports
through a kstat and the system log (inject_failure=1 proves the failure
path). tools/test/run-r5e-test.sh drives it on a guest. host-test.sh
builds the same tests, host-only drm_mm tests and red-black/interval
tree tests into a userland program.
packaging/drm-helpers.p5m; the illumos CI job builds misc/drm_helpers
and drm_helpers_test and runs carried/host-test.sh; the README records
the inventory, the module decision, the vendoring rules, the
compatibility headers to reconcile with R5c and the test results.
drm_cache.c and drm_cache.h (MIT) are carried too: patch 0001 builds only
drm_clflush_virt_range() until R5c's struct page and scatterlist models
exist (CONFIG_LKPI_STRUCT_PAGE), which then bring drm_clflush_sg(); the
module exports it (11 functions), reads CLFLUSH and CLFLUSHOPT and the
line size from CPUID in _init (linuxkpi/lib/x86_cpu.c, asm/*.h) and
refuses a processor without CLFLUSH; wbinvd_on_all_cpus() has no
definition, so -z defs proves the fallback is compiled out. Self-tests for
it in the kernel and on x86-64 hosts.

fetch-and-patch makes OUT absolute, copies only the files SOURCES lists
and refuses others, and takes GNU or BSD patch without fuzz. The test
driver reports a scale outside 1..100 instead of silently using 1, and
run-r5e-test.sh checks the kstat's scale and can test the package
(PKG=<p5p>).
The manifest carries drm_cache's notice; the README classifies the 63
drm.ko imports with drm_cache carried (19 facade, 12 carried, 31 core,
1 display), describes the drm_cache patch and the CLFLUSH rule, and says
who decides the buddy allocator: i915_ttm_buddy_manager.o also imports
TTM, so the TTM decision of the i915 port settles it.
Removing the reboot-needed module from the live image makes pkg(1) clone
the boot environment, so the uninstall check failed on the live root
(found on the guest). The package phase now runs with pkg -R in a
scratch boot environment that is destroyed afterwards.
DRM_FACADE_DEVICE_T, DRM_FACADE_DEVICE_DIP and DRM_FACADE_FILE_T let a
compatibility layer see its own struct device/struct file in drm_device.dev,
drm_minor.kdev, drm_gem_object.filp, drm_file.filp and dma_buf.file.
Layouts unchanged. Not yet built or tested; the version history names
reservation functions that are still to be added.
About 200 headers under linuxkpi/include (base types, compiler, atomics,
bitops, lists, rbtree/interval tree, locks, RCU, time, wait queues,
workqueues, timers, memory/page model, DMA, PCI, device, stubs for
debugfs/sysfs/runtime PM/tracepoints), lkpi/prologue.h and
src/lkpi_rbtree.c. Incomplete: most src/ implementations and the DRM
wrapper headers are not written; nothing compiles yet.
Linux v7.2 8d3ae59288 pin, the R5c Kconfig and generated config.h, the 163
headless TUs, mit-headers.txt, fetch-and-patch.sh (no patches yet) and the
compile half of build.sh (link step not written).
The linuxkpi headers both branches added keep R5c's versions; R5e's
carried build is reconciled with them in the following commits.
Layer headers completed for the i915 headless set, DRM wrapper headers
over the facade, facade 1.1 inode/attachment device hooks, R5e's asm
headers folded into the layer (lib/rbtree.c, lib/x86_cpu.c removed in
favour of src/), patches 0001-0003, TTM, local-memory and GSC TUs left
out (stubs to come). Not linked yet.
dma_resv_init/fini give a driver's own dma_resv a core reservation;
dma_resv_trylock; drm_illumos_ww_stamp/resv_lock_ctx/resv_unlock_ctx let a
C caller keep a wait-die transaction (WwMutex::lock_raw_ctx with the
caller's stamp and count, Owner::RawCtx, host tests against Rust
transactions); drm_illumos_resv_fences snapshots fences for resv
iterators; drm_syncobj_create, drm_illumos_syncobj_dup,
drm_syncobj_fence_get, drm_is_current_master. Bindings and mapfile
regenerated (134 symbols).
The layer's sources (memory, pages, shmem, DMA, scheduling, wait queues,
RCU, timers, workqueues, PCI, interrupts, devices, module glue, strings,
printf, xarray, CPU facts, fences, reservations, DRM glue), the i915n
module glue and stubs, i915 tracepoint headers replaced by generated MIT
no-op headers, misc/drm_helpers rebuilt on misc/linuxkpi with drm_cache
whole (drm_clflush_sg exported), the linuxkpi_selftest driver, private
mapfiles. Cross-compiled only; not linked on illumos yet.
Layer: may-fail allocations, WC vmap, DMA and scatterlist fixes, copy
buffers refused, shrinker on its own task queue, foreign page reaping;
bounded RCU/SRCU grace periods (two phases), workqueue lost wakeup,
private timer key, delayed work disarmed at destroy, module quiesce,
threaded IRQs on their own thread, software IRQ masking, PCI walks
within the parent during attach, config-space limits, refcounted
devices, real hrtimer/timer_shutdown/disable_work semantics, signal
checks; reservation walks without leaks (locked snapshots end with the
walk or the unlock), standalone ww_mutex refused, unlock order, fence
arrays poll their children, DRM messages formatted by the layer,
hashed %p, SSE4.1 hidden from drivers, DRM detach in two steps.

Core (facade 1.1): resv snapshots with usages that return a driver's own
fence structures, a status from drm_illumos_resv_unlock_ctx,
illumos_close_every_handle, drm_dev_illumos_unplug; tests for native
fence lookup, mixed C/Rust wait-die transactions, handle_dropped.

i915n: patches 0006 (display-engine interrupt master enable headless),
0007 (timeline points), 0008 (coherence guard), 0009 (refuse uncovered
GPUs), 0010 (direct lookups); close every handle; licence check of
every compiler input, intel_ips.h replaced; config without Kconfig text;
stricter kernel flags; concurrency self-tests (sched, mem, resv); CI
link gate; guest test extended.
Core (facade 1.1): the last put of an unplugged device runs the driver's
release first and then unregisters, retrying for leftover fences up to
five seconds (drm_dev_illumos_put reports a device it had to keep); GEM
reservations are marked so dma_resv_init leaves them alone.

Layer: devm_drm_dev_alloc registers the device in attach (i915 makes GEM
objects before drm_dev_register), the devres action unplugs and puts;
threaded IRQ handlers refused, deferred hardware disable under lv_run;
quiesce loops until nothing is left, timer quiesce waits for re-arms,
flush_work waits for a running instance after a cancel; locked-walk
snapshots released per owning thread, unlock fast path; line printer as
Linux's; RETRY_MAYFAIL may wait for memory within size bounds.

i915n: patch 0007 keeps the head fence when a point is missing, 0004
documents the fd-after-submit difference, lookup_rcu does not wait for
memory, quiesce on _init failure; manifest, scripts, README fixed.
Self-test: a DRM device made like i915's (GEM object before register,
freed in release); guest test checks refused and successful detach.
README: R5c status
Some checks failed
ci / check-hosted (pull_request) Failing after 7m27s
ci / kmod-illumos (pull_request) Failing after 11m56s
b14c75c468
Patch 0001 now guards the page and scatterlist functions
(CONFIG_LKPI_STRUCT_PAGE, R5c's struct page and sg_table) separately from
the swiotlb and write-combining-copy ones (CONFIG_LKPI_IOSYS_MAP:
iosys_map, Xen, memory encryption, static keys, kernel FPU), so that
defining the first brings drm_clflush_sg and nothing that needs the
second. The drm_cache tests keep 256 bytes before their buffers: Linux's
drm_clflush_virt_range also flushes the line of addr + len - 1, which
for an empty range at the buffer's start is the byte before it.
README: R5e results at 65afae7
Some checks failed
ci / check-hosted (pull_request) Failing after 23m46s
ci / kmod-illumos (pull_request) Failing after 2h32m7s
f76f376e1f
The committed gcc output predated drm_gem_object_funcs'
illumos_close_every_handle, so facade-check reported it missing.
Regenerated on oibuild (gcc 14.3.0-oi-4) from this branch's headers with
the CI command (gcc -m64 -D_KERNEL -std=gnu99 -I include -S
tools/facade/facade_layout.c); the only change is that offset (57).
Merge pull request 'R5e: carried Linux helpers (drm_mm, drm_cache) in misc/drm_helpers' (#14) from r5e-helpers into main
Some checks failed
ci / check-hosted (push) Has been cancelled
ci / kmod-illumos (push) Has been cancelled
613e4c1bad
Merge branch 'main' into r5c-linuxkpi
Some checks failed
ci / check-hosted (pull_request) Successful in 1h2m26s
ci / kmod-illumos (pull_request) Failing after 1h51m23s
f52ae87066
main now has r5e-helpers' final head f76f376 (PR 14); this branch merged
its earlier head 6a7f8cc and rebuilt misc/drm_helpers on misc/linuxkpi.
Resolved as on graphics-dev (de3af3a, 9a57be0): R5c's version wins in
drm_helpers and the compatibility headers, R5e's tests stay.

- carried/build.sh, carried/drm_cache/patches/series: this branch's
  (the series is empty; drm_cache.c builds unmodified).
- Removed R5e's round 2 patch
  0001-build-only-drm_clflush_virt_range-without-the-page-and-iosys-map-models.patch,
  which the empty series no longer lists.
- README.md, the drm_cache paragraph: this branch's text.
- R5e's round 2 test change in carried/drm_cache/tests merged cleanly.
toasterson changed target branch from r5b-layouts to main 2026-10-05 17:02:21 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
illumos/illumos-drm!15
No description provided.