Code walkthrough

Each patch of the series laid out side by side: its code on the left, split into units (functions, structures, sections), and on the right what each unit means and how the pieces fit together.

#PatchStructureFilesUnits
01ctlv: Add the schema language and generatorIntroduces the whole build-time half of CTLV: three JSON-Schema meta-schemas under Documentation/ctlv/ that define the YAML spec language, the append-only family registry and the generated-file manifest, plus the Python package tools/ctlv/ctlvgen that consumes them.23212
02ctlv: Add the UAPI wire format and family APIHeaders-only patch that fixes the contract of the series: the userspace TLV wire format, ioctl and event record (uapi/linux/ctlv.h), the cursor type shared by core and families (linux/ctlv.h), and the static schema/op/family descriptors that generated family code fills in (linux/ctlv_family.h).523
03ctlv: Add the root family specification and generated filesDefines the root CTLV family (ID 0) that every device answers: its YAML spec is the source of truth, with the registry, generated-file manifest and ABI snapshot around it.943
04Documentation: ctlv: Add userspace ABIDocumentation-only patch that publishes the CTLV userspace ABI as one RST document, links it into the userspace-api index and adds it to the CTLV MAINTAINERS entry.320
05ctlv: Prepare message input handlingIntroduces the drivers/ctlv core module skeleton (Kconfig, Makefile, MAINTAINERS) and the input side of message handling: bounds-checked walking of TLV nests, a per-request index of attrs, and validated accessors.734
06ctlv: Prepare blob descriptor validationAdds the helper that parses a blob descriptor (the nested type/address/fd/offset/length attribute group) out of a request and checks it against the blob limits of the schema node.38
07ctlv: Prepare schema validationAdds schema.c, the layer that interprets the generated schema tables: walking the family chain, computing effective message size limits, and validating inbound messages against the schema while building a per-request index.325
08ctlv: Prepare message output handlingAdds the schema-aware reply builder: the put and nest helpers that family code uses to write output attributes, plus operation error reporting and query fragment completion.519
09ctlv: Prepare VA blob handlingAdds the blob layer: a family callback can resolve a validated blob descriptor in the request into a pinned, CPU-accessible user buffer, read or write it by offset, and release it.626
10ctlv: Prepare event queue supportAdds the event half of the core: per-open subscriptions, bounded per-file event queues with loss reporting, and event creation/emission for families.733
11ctlv: Prepare runtime introspectionAdds drivers/ctlv/introspection.c, the handlers behind the CTLV root family's discovery queries: list the family chain, list a device's published operations with effective sizes and state, and describe the request/reply message schema of an operation.218
12ctlv: Add device and operation dispatchThis patch adds drivers/ctlv/core.c, the layer that turns a family descriptor chain into a registered character device and dispatches validated ioctl operations to family callbacks.762
13Documentation: ctlv: Describe how to write a familyAdds the driver-API guide for writing a CTLV family: the YAML specification, generated descriptors and callbacks, device lifecycle, operations, hooks, blobs, events and extension through inheritance.319
14attestation: Add the base family specification and generated filesDefines the base attestation CTLV family specification-first: the YAML spec, its ABI snapshot, registry entries, and the generated UAPI and kernel files.1052
15attestation: Prepare provider and instance coreIntroduces the attestation core module: the public provider descriptor (include/linux/attestation.h), the private instance object (core/internal.h) and the registry, validation and lifecycle code (core/core.c) that implement the generated base-family callbacks.827
16attestation: Prepare measurement register journalAdds the measurement-register layer to the attestation core: per-instance MR objects built from the provider's fixed MR list, an append-only journal of INFO and EXTEND entries keyed by MR generation, and a prepare/commit scheme for extensions that allocates everything (entry and event) before calling the provider so publication is infallible.630
17attestation: Add CTLV operation handlingThis patch adds the translation layer between the generated CTLV attestation family (patch 14) and the provider/MR-journal core (patches 15-16): core/ctlv.c implements the per-operation handlers named by the family's op table.624
18tdx-guest: Expose the native attestation service APIThis patch refactors the TDX guest driver so that TDREPORT, Quote and RTMR operations are available as an in-kernel service (struct tdx_guest_ops) in addition to the existing misc ioctl, TSM report and TSM MR frontends, all sharing the same locks and buffers.426
19attestation: Add the TDX family specification and generated filesDeclares the ctlv-attestation-tdx family (ID 2), a child of ctlv-attestation that fills the device-info extension point with TDX-specific measurement IDs.919
20attestation: Add the TDX family implementationImplements the TDX attestation provider as a module that registers as a client of the native tdx-guest service (patch 18) and creates a ctlv-attestation-tdx instance per TDX device.415