[AMDGPU] Fix noalias metadata for calls that capture a pointer earlier (#219887)
A call could get `!noalias` against a kernel noalias argument even when
that argument was captured into a global earlier and the call can reach
it that way
Only calls that touch just their own argument pointees are actually safe
to mark this way
[mlir][xegpu] Fix lane-local classification for packed-lane-data reductions (#223077)
isReductionLaneLocal decided whether a subgroup vector.multi_reduction
reduces within a lane by comparing the result vector type against its
distributed type. This assumes the lane_layout along the non-reduction
dim is always larger than 1, which is not always true.
This PR fixes it by checking the source's lane_layout along the
reduction dimension is 1.
assisted-by-claude
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
ice: Report SR-IOV VF status
Report the VF MAC, allocated transmit and receive queues, exact trunk
VLAN-filter count and capacity, negotiated virtchnl API, configured MAC,
VLAN, spoof-check, and promiscuous-mode policy, automatic link-state
policy, PF traffic permission, and fault containment through iflib.
Expose mirror configuration and active hardware rules, precise
malicious-driver isolation and counters, software mailbox-overflow
isolation and counters, VF-owned MAC-filter count and limit, and reset
diagnostics through a versioned driver.ice extension. Distinguish a
failed VF reset from a required VSI rebuild, which may still be pending
rather than failed. Keep the namespace schema local to the driver so
future extensions need no changes to common network headers or the
formatter.
Invalidate cached VF handshakes during preparation for an externally
initiated device reset, before releasing the context lock to wait for
hardware. Mark the VFs as requiring rebuild even if an early PF rebuild
[14 lines not shown]
[flang] Fix RecordType sizes, TRANSFER lowering, and BIND(C) ABI on SystemZ/PPC64le (#220377)
### Summary
`fir::getTypeSizeAndAlignment` had two bugs in its `RecordType` branch:
1. **Packed records**: `isPacked()` was ignored. LLVM packed structs
advance by `getTypeAllocSize` per field (not `getTypeStoreSize`), so
each component occupies `alignTo(storeSize, ABIalign)` bytes with no
inter-field or tail padding, and the struct ABI alignment is 1. For
example, a packed `{i32, f64}` on x86-64 is 12 bytes, not 16.
2. **Tail padding**: the unpacked field loop returned the raw summed
size without the final `alignTo(size, align)`. For example, `{i32, i8}`
(sum = 5 bytes, align = 4) was returned as 5 bytes instead of the
correct allocation size 8 bytes.
### Changes
[30 lines not shown]
[clang-tidy] Fix readability-redundant-parentheses false positive on typeof (#223512)
Preserve the required parentheses around the operand of `typeof`,
`typeof_unqual`, and GNU `__typeof__` by skipping `ParenExpr` nodes
whose immediate parent is a `TypeOfExprTypeLoc`. Redundant inner
parentheses such as those in `typeof((x))` are still diagnosed.
Fixes #220899.
[Github] Remove additional cmake install from test-suite (#224486)
Now that we are on ubuntu 26.04 we can resolve this todo as the system
CMake is new enough and already installed.
[Github] Fix container references from #224471 (#224490)
I screwed up some of the references (copying and pasting added an extra
sh256:) and they didn't show up because the workflow definitions for all
of these jobs only comes from main.
ice: Protect the PF mailbox from flooding VFs
Wire the shared code mailbox-overflow detector into the VF lifecycle and
virtchnl dispatcher. E830 controllers use their per-VF hardware
in-flight-message watermark. On older controllers, attribute a
congested mailbox snapshot to its sender, reset it with its queues
disabled, and discard its subsequent requests. Advance snapshot
accounting even for discarded requests. A physical VFLR, PF reset, or
IOV recreation releases the VF. A blocked VF can still submit mailbox
messages after reset, so discarding requests does not stop it from
replenishing the shared queue.
Process at most one initially full mailbox immediately. If producers
keep it nonempty, mask only the mailbox interrupt cause and let the
periodic admin timer schedule bounded drain work. Keep the shared admin
vector enabled so that OICR and other control-queue events can still be
serviced. Re-enable the mailbox cause after draining and recheck the
queue head for arrivals while the cause was masked. Retry failed reads
through the same deferred path instead of treating them as an empty queue.
[14 lines not shown]
[MLIR][XeGPU] Fix insert_strided_slice distribution divisor for partial-lane dims (#223060)
SgToLaneVectorInsertStridedSlice divided the distributed dimension's
size and offset by the full subgroup size. That divisor holds only when
the dimension spans every lane. When it spans a subset (lane_layout[dim]
< subgroupSize) — say size 2 across 2 lanes — 2 % 16 != 0 made the
pattern reject the op and failing legalization.
This PR divides the dimension size by lane_layout[destDistDim], the
number of lanes actually covering that dimension.
assisted-by-claude
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
[SlotIndexes] Add queries for stale indexes
An erased instruction leaves its index list entry in place, making the
index indistinguishable from a block boundary entry. Add
isBlockBoundaryIndex() and isStaleIndex() to tell the two apart, and
canonicalizeIndex() to resolve a stale index to the closest preceding
instruction's register slot, or the block start if none survives.
NFC. No caller yet. LiveDebugVariables is next.
[LiveDebugVariables] Repair stale SlotIndexes
The analysis keeps its indexes from before the first register allocator
until DBG_VALUEs are emitted, by which point passes in between have
erased some of the instructions they point at. Resolve them at the
start of each allocator run and before emitting.
SlotIndexes can then reclaim the entries of erased instructions without
sparing the ones held here, which would have made generated code depend
on -g. Emitted locations are unchanged, except that intervals resolving
to one position now emit a single DBG_VALUE rather than identical
consecutive ones.
[Github] Bump build workflows to Ubuntu 26.04 (#224455)
To pull in the new version of CMake and also now that the 24.04 images
won't recieve any new updates.
Bump __DragonFly_version for merging libthread_xu into libc
There is no ABI/API change with this merge, but it's a general good idea
to bump the version.
Suggested-by: tuxillo
Center timestamps in frequency regression
Subtract the first timestamp in each sample batch before accumulating the
least-squares terms. This preserves the fitted slope while avoiding
catastrophic cancellation between squared absolute Unix timestamps.
from Adam DePrince <adam.deprince at gmail.com>
ok bluhm@, deraadt@
ice: Isolate VFs after malicious-driver detection
Consume the per-function MDD latches to attribute transmit and receive
events to the offending VF. Treat the global debug registers only as
the last-cause diagnostic, add the missing Tx data-protection cause, and
select the E830 TCLAN register addresses when required.
Block every virtchnl request from an offending VF, reset it, and leave
its queues and interrupt mappings unconfigured. Most MDD classes stop a
queue, but Tx data protection only drops the offending packet; the reset
makes the reported blocked state an actual DMA fence for every class.
Complete VFR without restoring resources so a later physical FLR can
create a new reset edge and recover the function.
Complete VFR before restoring queue and interrupt mappings. E810 does
not retain mapping writes while VFSWR remains asserted; retaining the
original hardware order prevents an immediate post-attach VFR from
leaving queue-map enable clear.
[25 lines not shown]
ice(4): Correct SR-IOV filter defaults
The documented VLAN and MAC filter limits are reversed. Match the
defaults in the driver schema: 64 VLAN filters and 16 non-primary MAC
filters per VF.
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59027
ice: Make VF MAC filter requests idempotent
VF drivers replay their address filters after reset and may retry a
request whose reply was lost. The PF tracked only a count and
incremented it after an idempotent hardware add, so duplicate replays
eventually exhausted the quota. It then rejected an entire address
batch, including the administrator-assigned address.
Track exact non-primary MAC filter membership within each VF quota.
Validate a complete batch before changing hardware, charge only unique
absent addresses, and update ownership after each successful operation.
Preserve an administrator-assigned address when the VF is not permitted
to change it.
Validated on an E810-XXV with a host-attached iavf VF. The configured
filter quota was filled, then the complete set was replayed across VFR
and PF reset without a duplicate warning or ADD_ETH_ADDR NACK. Deleting
an absent address was a no-op. With allow-set-mac disabled, the guest
could not remove its administrator-assigned filter, while multicast
[5 lines not shown]
ice: Add VF reset and policy failure injection
Extend the optional ICE failure-injection facility with points for the
MAC anti-spoof firmware update and each mandatory VF reset stage.
The reset points report a failed Tx drain command, VFR timeout, receive
queue disable, or final PCIe transaction drain after the corresponding
hardware operation. This permits fail-closed state and recovery tests
without deliberately leaving live DMA during teardown.
The points remain absent unless the kernel is built with
options DRIVER_FAILPOINTS and retain the existing PF and VF selectors.
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59025
ice: Quiesce VFs before device reset
Reset preparation notifies cooperative VFs, then immediately releases
queue maps and firmware topology. A VF which ignores the notification
can continue DMA while the PF tears down the resources which describe
it.
Assert VFSWR for each configured VF before teardown. Run the mandatory
firmware drain serially, disable active receive queues, verify that PCIe
transactions have drained, and leave the VF held until its VSI rebuild
succeeds. Block ordinary mailbox requests as soon as quiesce begins so
a hostile VF cannot re-enable queues in the warning interval.
Also clear VFLR status only after VFRD and perform the final Transaction
Pending check before publishing VFACTIVE. This follows the VF reset
flow in section 4.1.3.3.3 of the Intel E810 Datasheet. Serializing VFs
stays below the documented limit of four concurrent VM/VF reset flows.
Validated on an E810-XXV with active host VFs and a Linux passthrough
[16 lines not shown]
iavf: Probe the Hyper-V VF device ID
The shared code already recognizes IAVF_DEV_ID_VF_HV and handles it
through the regular iavf register and virtchnl paths, but the PCI probe
table omits it. Add the missing entry so the driver attaches.
PR: 239849
(cherry picked from commit d983dc521b6ecaf054bdbe938bd1bf079030f76d)
ixgbe: Correct Wake-on-LAN configuration
Wake-on-LAN capability was inferred from NVM bits on every MAC even
though 82599 support is board and sometimes port specific. Private
sysctls formed a second policy interface, and the driver neither
coordinated the controller wake source with PCI PME nor reliably
rebuilt address filters erased by the stop-time reset.
Use the standard ifconfig wake capabilities. Derive support from the
82599 board and port matrix or the X540-and-newer NVM capability.
Require D3hot PME support, and use the NVM APME bit only to select the
initial magic-packet policy after initializing the LAN function number.
Snapshot requested filters before the terminal stop so shared reset and
PHY code sees the active wake policy. After reset, restore RAR0, the
multicast table, receive filtering, and the optical laser before arming
WUFC, WUC, and PCI PME. Remove device wake sources before clearing PCI
PME on detach, resume, and when wake is disabled. Clear autonomous APM
so ifconfig remains authoritative.
[19 lines not shown]