--host-core on|off is hand-written (stela_boot_core::options::HOST_CORE), so
the options revision stays 13; setup never writes it.
- stela_boot_core::host_core: plan (a processor left beyond the PEs, a
parallel run), confirm (every reserved processor started, the host core
last), the Channel (one poster, one taker: ping, stop, state, beat), the
self-check, covers (PE 0 leaves the pump only to a serving host core with a
fresh beat), Shares (each taker's time served). Host tests for each,
including a two-thread handoff and every fallback.
- system.rs: the plan reserves PEs + 1 processors; a refused plan or a
reservation that kept fewer boots exactly as without the option, with a
HOST CORE off: line. Resources::host_core marks the last slot.
- native_smp: --native-cores counts PEs (Resources::pe_cores); the last
started processor is set aside (Executors::set_aside_host_core) only when
every reserved one started, so the guest's PE count and topology are as
without the option.
- engine/host_core: the host core's loop (shootdowns, a service turn every
500 us as a waiting PE serves, gpu::pump_host_core every pass), the ping
it must answer within 50 ms before the guest starts, else HOST CORE
fallback and PE 0 keeps everything, and its stop before the service is
taken back at the run's end.
- gpu::pump_due: PE 0 defers ready work to a serving host core unless it
waited DEFER_LONGEST_NS or the host core's beat is older than 2 ms.
- The services beat line gains served_us waiting/boot/host_core and
pe0_share=N%, and with a host core its state, turns and pumps.
Lines: HOST CORE plan / off / set aside / cpu=... serving=service-turns,
gpu-pump ping_us= / fallback / stop.
Each perf round reads NV_THERM_I2CS_SENSOR_00 as gp100_temp_get() does;
nvkm_perf gains the register as last read, the temperature and the
beat's highest. "GPU THERMAL temp=52C max=55C power=unread" follows the
GPU PERF line every beat with a reading; a sensor that gives none (a
GSP-RM priv error or all ones) is said once with its register. Whether
GSP-RM leaves the sensor readable to the CPU is untested. Power is not
read: GSP-RM 570.144's headers hold no power monitor control.
On the tester's boot 3 the GPU was gone at 531.7 s; from 609.8 s, after
NVK's device loss, a job ran tu102_vmm_flush() over and over, each a
stalled PTIMER, a "timeout" and a WARN at vmmtu102.c:51, until the step
watchdog stopped it at 640.6 s. Its rip, image+0x1f2653e, sits on an
lfence before a return (code 0faee85dc3), as after an MMIO read; the
0.5.0 image's symbols are not at hand to name the function. Patch 0222 makes the
nvkm_rd*()/nvkm_wr*() accessors give all ones and drop writes once
nvkm_device_gone() holds, ends nvkm_nsec() waits with -ENODEV before
their condition runs, ends a wait whose PTIMER reads all ones at once
(feeding nvkm_device_gone()), and warns for neither, so the boot
reaches the GPU-lost stop.
A port that forwards to its GPU keeps its configuration page with the
containment fabric's owner of it (forward_cold_bridge), beside which no
other mapping may open, so port_above's read-only mapping was refused
with ResourceConflict on every GPU (native_mmio/shared.rs:738). The port
is now read through that owner (read_forwarding_bridge), and the old
mapping is kept only for a port that does not forward. The link lines at
the claim and the port's line at a loss or return now carry the port's
link, slot, AER and, new in the link report, its Downstream Port
Containment control, status and error source. As the port now reads,
the L1 PM Substates are set as Linux leaves them where they were skipped.
--gpu-aspm off|firmware, default firmware, is hand-written, so the options
revision stays 13. With off, each GPU's claim turns every L1 PM Substate
off at both ends, the GPU's first, then ASPM L0s and L1 at the GPU and
then at its port, as Linux's pcie_aspm.policy=performance does, through
the fabric that owns the port, read back, before the claim's reset; one
line says what each end had. Without a port, only the GPU's end, which
still keeps the link out of L1. The register work is
disable_link_power, beside disable_aspm_link, which now shares its
link-control and L1SS helpers. For a Yoga Slim 7 16ACH6 whose RTX 3050
drops off the bus after minutes with the firmware's ASPM L1 on
(stambha issue #1).
Each ITLB fill records its walk: every descriptor address and value read over
both stages, in order, the TTBR0 it started from and what it gave. A TLBI of
everything marks the contexts kept; Contexts::find gives no kept context, and
every number native code holds comes from find (the fetch's contexts, the
TTBR0 switch table through switch_contexts, the transition records through
live_contexts). The chain runs in contexts::VOID, both ITLB drop epochs grow
(no stamp or jump cache entry survives, since a stamp may name a page an
eviction took), the switch table and transition records are forgotten by the
generation as before, and the TLBI-by-VA filters are cleared and refilled by
verification.
Verification keeps an entry only while every recorded descriptor holds its
value, a lower-half page's TTBR0 is the recorded one (the upper context holds
the lower half's global pages and has no TTBR0 in its key), the host still
permits the fetch, and the entry is what a fill would make now (page_variant,
block_key). Anything else drops it and walks it again; a context with an entry
no record covers is forgotten. The upper half is kept only while its keys
leave out the ASID.
PES TLBI KEEP gives tlbis, contexts, verified, forgotten, kept, dropped,
checked, mismatches(check), verify_ns_per_tlbi and each PE's kept/dropped;
PES TLBI KEEP MISMATCH samples what the check found.
Tests: the five-scenario acceptance set runs on configured machines and passes
with the keep on, with and without the check, and fails in all five under the
mutation that keeps without verifying (a permanent test). New cases: a
descriptor changed and back (ABA), a table page freed and reused, a block split
into a table, a stage-2 change, permission-only changes (UXN, AP, PXN), a page
the host refuses, a frame whose variant changed, an ASID reused with the same
layout (private and global), the native paths' void state, and a randomized
differential of keeping against forgetting over 10,000 steps of table rewrites,
TLBIs and switches. Seven mutations of the checks (TTBR0, descriptors, host
permission, entry key, drop epochs, void context, refilter) each fail a test.
Options revision 13 kept: both options are hand-written. No translation input
changed, so the translator id is unchanged.
The 101 ms `HOST SERVICE SLOW part=network` lines of boot 23 (43.674 s and
1017.086 s, each ~260 ms before the host adapter's "link up") are the INFRA
port update of the association: ax/vif.rs cfg_func_sw delayed
(beacon_int + 1) * 1000 us once vif init had turned the port function on,
called from assoc::associate under Live::associate, under the station's
configure, under the keeper's poll, under GuestNetwork::carrier/receive in
the network part of PE 0's service step. Linux sleeps there; here it was a
busy wait on a guest PE.
- vif: port_function_on, quiet_us and port_update_after split the update
around its wait; port_update keeps the blocking order for vif init.
- assoc: associate_begin and associate_end; associate is begin, wait, end.
- Live: begin_association and finish_association hold the begun
association with its deadline; Chip::associate now returns Ok(false)
until it has passed. A begun association leaves as a made one; set_bssid
and a second association are refused meanwhile; power-off forgets it.
- ax station: configure keeps the admission and is Pending while the chip
waits; the keeper retries a deferred configure while the radio is still
Admitted (other radios unchanged).
- Flush without drop polls DLE_TXQ every 100 us instead of 10 ms.
- Link::slowest_step: the keeper times its steps (radio service, eapol and
keys, port, scan, scan end and join, associate, configure, ...).
- service: the network part's transmit and receive loops stop starting
frames after 2 ms (service_watch::Budget), the next turn starting at the
network; HOST SERVICE SLOW part=network carries carrier/queued/transmit/
receive/deliver us, sent, read, cut and keeper=step:us;
HOST SERVICE KEEPER names a keeper step of 2 ms or more; the host
adapter's link up/down line carries keeper_longest=.
A separate, conservative default: LOCK_SCALE_FLOOR is 2, a slower host
keeps its own larger scale, and --profile multiplies the result by 4 as
before. A real deadlock still panics within a second.
stela-boot-core's guest_watch takes the lines the home PE writes: XNU's
"panic(cpu N ...)" header counts only at a line's start, so lines that
merely mention a panic, or a header inside a long line's continuation, do
not. The first header is logged (GUEST PANIC seen) and shown as the
running step's detail; with no reset PANIC_HOLD_MILLIS later the run ends
through finish() as a halt, logged as STELA FATAL macOS panicked, with the
stop's usual reports, translation write, log store and screen. A panic
that a reset follows keeps today's path. --keep-running-on-panic, a
hand-written opt-in like --acpi-hardware, keeps the options revision at 13.
The scale stays the host's own without --profile; a profiled boot gets it
times PROFILE_LOCK_FACTOR, at most MAX_PROFILED_LOCK_SCALE (2 s for a
ticket spinlock). GUEST TIMEOUTS now also names host_scale and profile.
PES WHOLE TLBI TRIGGER same_ttbr0/new_ttbr0 gives each PE's split, read at
the TLBI from the register, so native TTBR0 switches count too; mail's
TLBIs of everything are another PE's and count in neither. Under step
timing, PES WHOLE TLBI SAMPLE lines name the caller: if nearly every one
follows an address-space switch, the trigger is the shared-region rule in
pmap_switch, which only keeping translations across the flush answers; if
not, the CPU model makes SPTM flush. Reads registers only.
after_a_whole_tlbi_every_fetch_runs_what_its_walk_now_gives runs five
scenarios on machines of their own: a page remapped, unmapped, made PXN, a
TTBR0 and ASID reused by a new process, one VA in two address spaces with
one changed. All pass, and all five fail when the TLBI of everything keeps
the contexts without checking them (a mutation of tlb_maintained), the
bar a "verify instead of forget" must clear. That change itself is not made
here. Engine translation inputs untouched: the translator id is unchanged.
mmu::WalkMemo keeps the last table a batch's walk read (translate_noting)
and starts the next walk there while it holds that walk's address
(translate_from), as a walk cache does; refill_pages makes one per batch
and drops it with the batch, which runs no guest code, changes no control,
makes no descriptor update and ends at the first walk that forgets
contexts. The refill's list is sorted, so its pages run through shared leaf
tables: one descriptor read a page past the first instead of three or four.
Tests: a randomized differential test (300 random regimes, granules,
stage 2 and tables) has every walk of a sorted batch equal the full walk,
also after the tables change between batches, path and hierarchical bits
included, and catches a memo kept across that change giving stale
translations; an engine test refills 48 pages after a TLBI ALL with a page
unmapped, one moved and one made PXN in between, takes exactly what full
walks give, and reads under two descriptors a page where the old walk read
three (144 in all; a
mutation to the old walk fails its bound). The engine's translation inputs
are untouched: the translator id is unchanged.
Nothing reads the host's A or D bits: the shadow keeps no dirty or access
tracking (the guest's own state is in its descriptors, which the walker
never updates, no FEAT_HAFDBS), and the fills test PRESENT alone. The
rights move to stela_boot_core::shadow_leaf, tested there, with a
compile-time check that its bits are the page tables' own. Engine and
compiler untouched: the translator id is unchanged.
The policy device (0x00120075, else the Vivobook's 0x00110019 with silent
and overboost swapped) is found by its DSTS presence bit on the ATK WMI
device that has the notebook events, and set with DEVS, which must answer
1, in a bounded firmware call after the ACPI activation, with or without
--acpi-hardware. The FA608PP's DSTS of the policy answers a constant
0x00010003, so the mode in effect is read from the EC RAM field its DEVS
writes (EC0.FTBL) before and after. One line:
"ASUS thermal policy: was X, set Y (...), the firmware reads Z", or why it
was skipped; nothing on a PC without the ASUS notebook device. A failure is
logged and the boot goes on. The asus-wmi power limits the device names
(PPT_* and NV_DYN_BOOST) are read with DSTS, read only, on a
"HOST POWER LIMITS asus-wmi" line.
--asus-mode is hand-written, as --laptop and --acpi-hardware are: no line
setup writes holds it, so the options revision stays 13.
With the option the provider attests FULL_CAPABILITIES, which only
Session::enable_hardware reads, so the namespace loads as without it.
Without it, or without a captured SCI route, nothing of hardware mode
runs and one line says why.
- _INI runs before the PCI census either way, so pci_power and the census
see what they see now; hardware activation then runs no _INI again and
the EC's _REG follows it, as under Linux without an ECDT.
- The activation runs inside the 10 s AML bound on the firmware calls'
11 s deadline. Its 5 s deadline was shorter than ACPICA's own 3 s wait
for SCI_EN plus _REG, and a continuation past its deadline closes the
work owner's entry for every later firmware call.
- The SCI's dispatch follows the storm guard: masked and polled while it
storms, its PM1/GPE registers logged once, run and rearmed on the retry.
- The EC's queries follow its budget and breaker; each query number gets
one line, so a test boot shows which events arrive.
--acpi-hardware is a flag setup never writes, so no line setup writes
changes meaning and the revision stays 13, as the fork's --trackpad and
--laptop did; mount_interface's revision notes name it. --laptop auto does
not take it until a laptop has proven it.
stela_boot_core::acpi_hardware holds what a host test can check:
- the off, refused and starting lines, the last naming SCI_INT, the SCI's
route and whether entering ACPI mode takes SMI_CMD <- ACPI_ENABLE (read
from the FADT: SCI_INT 46, SMI_CMD 48, ACPI_ENABLE 52, PM1a_CNT 64);
- SciGovernor: past 100 SCIs a second for 3 seconds the SCI stays masked
and ACPICA's handler runs every 100 ms, interrupts are tried again once
after 30 s, and a second storm keeps the polling for good;
- EcGovernor: 64 queries a second at most, events stopped after 3 failed
transactions in a row, and each query number named once.
ACPICA dispatches a raw GPE handler with gpe_block->node, which for the
FADT's blocks is acpi_gbl_fadt_gpe_device. acpi_ev_get_gpe_event_info finds
a GPE through a non-null device only when a GPE block device's object is
attached, which the \_GPE node never has, so both calls failed and the
handler returned NOT_HANDLED. Session::flag_gpe installs only on the FADT's
blocks, so the handler now names them with a null device
(drivers/acpi/ec.c: acpi_disable_gpe(NULL, ec->gpe)).
A new host test runs the --acpi-hardware path on the real ACPICA with a
fake chipset (PM1, PM1_CNT, GPE0 at 0x1010, SMI_CMD 0xb2 that sets SCI_EN
on ACPI_ENABLE 0xa0) and the fake EC: _INI once before activation, the
EC's _REG(3,1), ACPI_ENABLE written once, the SCI installed on IRQ 9, no
_INI replay, the EC's GPE taken from the SCI handler, QR_EC 0x2f, _Q2F's
Notify(LID0, 0x80) delivered as deferred work, and the GPE resumed. It
failed on the handler above before this fix.
On the ASUS TUF A16 FA608PP the ELAN touchpad at \_SB_.I2CA.TPD2 was
switched to touchpad mode at probe, then its first poll read a zero-length
input on the asserted pin. Device::poll returned UnexpectedReset for it,
fail() masked the interrupt route (the "recovery IrqMasked" in the log),
the device was left faulted and the boot's input loop removed it.
Linux takes a zero-length input as a host or device initiated reset
completing: it wakes a waiter when I2C_HID_RESET_PENDING is set and drops
it otherwise. Now:
- Device::poll returns InputReport::Reset and the device stays ready.
- Device::reinitialize starts a started device again from ready or failed
(never after a timing failure or an unreturned callback): power on, RESET
and its awaited response, both descriptors read again and unchanged.
- Device::settle watches the pin after a command that can reset the device.
- HidInput::new sets touchpad mode and watches 100 ms for a reset. A pad
that reset and no longer reads back touchpad mode (GET_REPORT of its Input
Mode feature) is started again and switched once more. A switch that
fails, or a second reset out of the mode, starts the pad again in its
firmware's mouse mode and reads it as a mouse.
- At run time a reset with the mode held is dropped and said once; a pad
that lost the mode is started again and switched back, three times in
10 s, then read as a mouse. Other devices stay in their power-on state,
as Linux leaves them.
- Each of these is logged as "INPUT <name>: <notice>".
The FA608PP tester build stopped at step f with "ACPICA called outside its
owned native continuation". The laptop decision itself reads only the FADT
and what the probe already read; the call that reached ACPICA was
HostAcpi::retain_power's lid.path() and notify(), which take the namespace
guard (stela_acpi_guard_enter -> services.thread_id). The batteries and AC
adapter it publishes are the probe's cached readings and stay where they
were. A laptop test now follows take_laptop_features, retain_power and
attach_brightness_keys and fails on any ACPICA call outside a firmware call.
A laptop is a FADT Preferred_PM_Profile of Mobile, Tablet or Appliance PC,
or an ACPI battery (PNP0C0A, present by _STA) and lid (PNP0C0D) the power
probe attached. On one, where the line does not say otherwise, the boot
behaves as if --battery, --lid method and --brightness-keys were given, and
--trackpad mt2 where --input is in effect, a precision touchpad is among
the host inputs and the guest's hub has a port left beside its disks.
--lid-sleep stays opt-in. Explicit options win (--test-battery, --lid
ignore, --trackpad builtin), and the new hand-written --laptop auto|off
takes none of them. The battery is still withheld from an install,
restore, staged update, recoveryOS and the plugin repair, and still waits
out a reading at 0%.
The decision runs once the probe has found the batteries, lid and inputs
and before the lid's handler, the input and the trackpad's cabling read
the options; brightness keys taken then are attached in their own bounded
firmware call, as hardware mode attaches them with the option. One line
says what was found and taken, with each skipped feature's reason:
"LAPTOP detected (FADT mobile, battery, lid): battery on, lid method,
brightness keys, trackpad mt2" or "DESKTOP (...): no laptop features".
Setup writes nothing new and the options revision stays 13 (schema 4):
--laptop is a hand-written option setup never writes, as --trackpad is.