# Predicting Marc Zyngier's review comments (KVM/arm64) From 1000 of Marc's review emails (`~/progs/kernel/tmp/maz_reviews/sample/`), read in four parts, plus his replies to our own patches in November 2026. The counts are emails per 1000 (rough). The checklist is the part to use; the rest explains it. ## Pre-send checklist **Rationale and correctness** - [ ] The commit message says *why*, with the concrete sequence of events that goes wrong. "Why?" / "What is the rationale?" is his most common question (~100). - [ ] The behaviour matches the ARM ARM (or the GIC/PSCI spec), using its terms: UNDEF, RES0, CONSTRAINED UNPREDICTABLE. Cite the section if it isn't obvious. Not "what QEMU does" or "what x86 does" (~95). - [ ] The root cause is fixed rather than papered over. A WARN stays until the bug behind it is fixed. **Cost** - [ ] Nothing new runs on every entry or exit, and nothing new traps, unless it has to. Prefer vcpu_load()/vcpu_put() or a static key. Don't make VMs without the feature pay for it. Under nested virtualization, ID-register reads and EL2 accesses trap, so count them. Any performance claim needs numbers from an exit-heavy workload such as hackbench (~55). *Ours:* trapping TCR_EL1 to fix TCR2 got "an absolute performance sink"; the `loaded` checks in kvm_inject_nested() got "fast-path bloating". **Minimal fixes** - [ ] The smallest backportable change: no rework, no churn (renames, reordering, moving files, guard() conversions), no speculative fields or hooks, no Kconfig options ("battery included") (~40). - [ ] Fixes: points at the real culprit, and only at something actually broken. Cc: stable only if the backport is worth having (~30). **Reuse** - [ ] Use the existing infrastructure instead of a parallel mechanism: generated sysreg definitions, config.c feature maps, FGT/FGU, the trap tables, sanitised registers, vcpu requests, existing helpers. No magic numbers or duplicate definitions; use BIT()/GENMASK()/FIELD_PREP() (~55). **Nested virtualization** - [ ] Nested virtualization is VHE-only, and nVHE is effectively dead for new features. Don't add code for combinations that can't exist. - [ ] A new trap register comes with everything it traps: encoding_to_cgt[]/encoding_to_fgt[] entries, FGU, RES0/RES1 in kvm_init_nv_sysregs(), and VNCR where it applies. No half-done features. - [ ] Keep nested-only hacks local, so that someone who doesn't think about nested virtualization can't undo them by accident. **Userspace ABI** - [ ] Assume any VMM, in any order, and saving or restoring at any time; not only QEMU. No KVM-internal state in the UAPI, and no new capabilities for KVM's own problems. Tracepoints and stats are ABI. Choose the errno with care. Ask whether a WARN can be triggered from userspace: it panics under pKVM (~65). **Locking** - [ ] For each lock, READ_ONCE() or preempt_disable(), know what it protects against, and what stops the vcpu running or the value changing "behind your back" (~45). **Code style** (~70, mostly "nit:") - [ ] Clear names (not "Java-esque"); one helper per job, written once, no single-caller one-liners; no unneeded inline/__always_inline; no macro abuse. - [ ] Comments only where the reason isn't obvious; no stale, wrong or obvious ones. - [ ] Don't break lines just for 80 columns; he ignores checkpatch line length. **Commit message** - [ ] Short and technical: not a cover letter, not a recap of earlier versions, not marketing, no "No functional change intended" restating what was said. It matches the code. The subject says what the patch really does, with the right prefix ("KVM: arm64:", "KVM: arm64: nv:") (~40). **Series and process** - [ ] One logical change per patch, bisectable, documentation and UAPI in their own patches, the feature enabled last, each hunk in the patch that uses it (~45). - [ ] A cover letter; a "Changes since vN" log for each version; Cc the maintainers and earlier reviewers; based on kvmarm/next or -rc1..-rc3, and only fixes after about -rc6; tested, and say how (QEMU as well as kvmtool, 64K pages, lockdep, a selftest for anything with a reproducer) (~60). - [ ] When he replies with a diff ("completely untested", "How about this instead?"), take it. If he writes a comment, paste it in verbatim. ## What makes him blunt Ignored review comments, missing changelogs, maintainers left off Cc, untested code ("I stopped reading here"), churn, hand-waving about performance without numbers, "go read the x86 patch", and wrong bot findings. He does credit correct bot findings ("Sashiko has spotted an interesting corner case") and accepted a patch with "Assisted-by: Claude" without comment: what matters is whether the content is right. ## Our own patches, November 2026 | Patch | His comment | Checklist item | |---|---|---| | NULL deref v1, `loaded` checks | fast-path bloat; load the vcpu in the ioctl instead | Cost, minimal fixes | | AT TCR2 v1 | asked for a comment explaining why it works; gave one | Paste his comment verbatim | | TCR2 trap patches | trapping TCR_EL1 is a performance sink; load 0s instead | Cost | | mmio_needed (Sashiko) | "multiple ways to commit" the exception state | Root cause, reuse |