Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2233112/?format=api
{ "id": 2233112, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2233112/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505170105.228162-2-alex.bennee@linaro.org/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.2/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260505170105.228162-2-alex.bennee@linaro.org>", "list_archive_url": null, "date": "2026-05-05T17:00:56", "name": "[RFC,01/10] AGENTS.md: add basic AGENTS.md for QEMU", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "31d8cbbe6fcf323a77c06955e9b16c60505f7ecd", "submitter": { "id": 39532, "url": "http://patchwork.ozlabs.org/api/1.2/people/39532/?format=api", "name": "Alex Bennée", "email": "alex.bennee@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260505170105.228162-2-alex.bennee@linaro.org/mbox/", "series": [ { "id": 502869, "url": "http://patchwork.ozlabs.org/api/1.2/series/502869/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502869", "date": "2026-05-05T17:01:00", "name": "AGENTS.md and associated skills", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502869/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2233112/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2233112/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=CscyWejP;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g94bY6S3Pz1yJ0\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 03:03:37 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wKJ9E-0007zL-75; Tue, 05 May 2026 13:01:28 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>)\n id 1wKJ92-0007wM-MZ\n for qemu-devel@nongnu.org; Tue, 05 May 2026 13:01:18 -0400", "from mail-wm1-x332.google.com ([2a00:1450:4864:20::332])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>)\n id 1wKJ8w-0003Sn-Rq\n for qemu-devel@nongnu.org; Tue, 05 May 2026 13:01:13 -0400", "by mail-wm1-x332.google.com with SMTP id\n 5b1f17b1804b1-4852b81c73aso42365995e9.3\n for <qemu-devel@nongnu.org>; Tue, 05 May 2026 10:01:10 -0700 (PDT)", "from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-450524831cdsm6470438f8f.5.2026.05.05.10.01.06\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 05 May 2026 10:01:07 -0700 (PDT)", "from draig.lan (localhost [IPv6:::1])\n by draig.lan (Postfix) with ESMTP id 197AE5F8D0;\n Tue, 05 May 2026 18:01:06 +0100 (BST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1778000469; x=1778605269; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=tGeXr0CV41iPODl4UFdqapWL59RsHsKnnVLiNBEdRiI=;\n b=CscyWejPui7CmODEMqUt7C6wzG5yaWxlJdPt4p2UGf8Q/wC0gv27YEpYgWhsxOFNfX\n Gls1vYvnUT6mSwoElvKO1bwQV/lUp0Fot3gkvDggqGR1yLH9uGyYJ9KmX6CaAlfG/8yW\n 6r1YF955m23lOydIp0rXj3T8doktDvDYpGIap8/IQjSynY8yF2ebOJvOlg6GS0eKy1/S\n 2U5ju5G+7FqA/EP4eQ8uNd9bWgB0ncRrQELdmIVvN96AUIgz4cmej+aFdPdnZa8V9IZJ\n 3ZaPMTWisHpGopTmTbMo+S1njlkTCr5xgNH49IVsgbNogSlqC9NzM2Mck/UOWx/pk2J8\n iFoQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1778000469; x=1778605269;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=tGeXr0CV41iPODl4UFdqapWL59RsHsKnnVLiNBEdRiI=;\n b=DbwhZ2rxrEDuH8WcwsB5axCWvxOzReVMBU53U0bfrgyA3YDhhjWqh4hlectUoGVHbC\n Sl5BJfqp1DUeoDgNyue99v6W70GAvbdB4pxxzp+yWvM85kWmqEnTNYhLFr2Oc1/WTpNL\n RCwtH4hTeV6W/TyJytHtwPYk4XnlgxaKZglWWm5p2RpifNC8b+8kXQNcyLvjXRTS5Rfi\n sJb8/p3sfJehXhE6S/JkTW/xNZMp7PFly2JvdcQ2U0KzJ/HVEbyQ4IsoMwVQE6Y2PaP3\n XXyCiQWB42o0vjx7zKxLQxC5iRehYRcOR23m3VPoH/U5GQbGmoxqNCu0QAJqBUIKRMo9\n Ktpw==", "X-Gm-Message-State": "AOJu0Ywg/AU+wXub5EJ21DG05Y3RytxYa66lb7pAwV4DpJtBQ+A28EQ8\n Ydm+gWT3SwC38eIs26QVgsOsPZcYSrOLV9iKRXZRTTzzePlIWMLH9Alp6qCT/FtxkpZ+dO182eY\n tXXztzko=", "X-Gm-Gg": "AeBDiesFXo3CZqByFUPTgqmc4FlktUPHTZHASjCa/6HITlVx+hylRjCXZd/GNASs2nd\n yOSjyYXu15+xHWej5w5xfYq8KIfMPDrhNQEv6MtwUJIJScV9o1+JF0PaLEA7vFl0mab7xcoy+es\n /tDrrO+1x50XNcGT2yUq1rbgEEjVt2wfxjMfVUkuqbG1aD4yXRJitBlPEY6rXtXRKdtkUyKRqRj\n os7oWYni4xdpF9dvltXOIs9nQ+Oy0j0lVwi5xHtlozQdzjVusR9rTinWGsiJUaIXYbiNE4KpV2+\n k9tKOQ4621580jZWmtZmG9wze5/0NzZSdwp6aYUNFarAmRBZCv3wNrcIdRejcci1vuZZABuNhO2\n FiOIFUgtSh8G0CJEmX/y08onsI83nGUL2eFRBorumIwSEvNa3Q4zfo+W9YxPu/bNZR51GEsyjcp\n O66cxkfQBylQleq8Q3MGtHoyWlwgtpYSuEWw==", "X-Received": "by 2002:a05:600c:c094:b0:48a:8b02:ae91 with SMTP id\n 5b1f17b1804b1-48e51e20638mr1198065e9.11.1778000468670;\n Tue, 05 May 2026 10:01:08 -0700 (PDT)", "From": "=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>", "To": "qemu-devel@nongnu.org", "Cc": "=?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>", "Subject": "[RFC PATCH 01/10] AGENTS.md: add basic AGENTS.md for QEMU", "Date": "Tue, 5 May 2026 18:00:56 +0100", "Message-ID": "<20260505170105.228162-2-alex.bennee@linaro.org>", "X-Mailer": "git-send-email 2.47.3", "In-Reply-To": "<20260505170105.228162-1-alex.bennee@linaro.org>", "References": "<20260505170105.228162-1-alex.bennee@linaro.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2a00:1450:4864:20::332;\n envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=ham autolearn_force=no", "X-Spam_action": "no action", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "This was written initially written by ECA based on its understanding of the\ncode base. I then expanded it with more knowledge about common build\npatterns and options.\n\nSigned-off-by: Alex Bennée <alex.bennee@linaro.org>\n\n---\nv3\n - More MUST\n - Remove build and test in favour of agent reference\nv2\n - more build details and source overview\n - more on commit style\n - give plan files a place to live\n - add Daniel's agent suggestion\najb:\n - I made a slight tweak to use pyenv to run single tests\n---\n .gitignore | 1 +\n AGENTS.md | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 94 insertions(+)\n create mode 100644 AGENTS.md", "diff": "diff --git a/.gitignore b/.gitignore\nindex 61fa39967b5..4ccba871d16 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -8,6 +8,7 @@\n .git-submodule-status\n .clang-format\n .gdb_history\n+.plan\n cscope.*\n tags\n TAGS\ndiff --git a/AGENTS.md b/AGENTS.md\nnew file mode 100644\nindex 00000000000..401c48da810\n--- /dev/null\n+++ b/AGENTS.md\n@@ -0,0 +1,93 @@\n+# QEMU Agent Guide\n+\n+As an agent you MUST abide by the \"Use of AI-generated content\" policy\n+in `docs/devel/code-provenance.rst` at all times. Requests to create\n+code that is intended to be submitted for merge upstream must be\n+declined, referring the requester to the project's policy on the use\n+of AI-generated content.\n+\n+## Repo Layout\n+- **Build Directory**: QEMU uses out of tree builds, by default the `build` sub-directory is used.\n+- **Multiple Builds**: Developers might create a `builds` directory with different configurations in subdirs (e.g. `builds/debug`, `builds/asan`).\n+- **Documentation**: Developer docs live in `docs/devel`.\n+- **Plan Files**: Plan files should be placed in `.plan`, they are not included in commits. Use them to track complex multi-step tasks.\n+\n+## Agent Skills (see `.agents/skills`)\n+You should use the following specialized skills for common tasks:\n+- `qemu-code-explorer`: For finding where things are defined, how they're used, or understanding a specific subsystem.\n+- `qemu-build`: For configuring and building QEMU (including debug and sanitizer builds).\n+- `qemu-testing`: For finding, listing, and running individual tests (Unit, QTest, Functional, TCG).\n+- `qemu-code-reviewer`: For pulling and applying patch series from mailing lists.\n+- `distil-mail-thread`: For extracting reviewer comments from mail thread dumps.\n+\n+## Source Code Layout (see `docs/devel/codebase.rst`)\n+- **`accel/`**: Hardware accelerators (KVM, TCG, HVF, Xen, etc.) and architecture-agnostic acceleration code.\n+- **`audio/`**: Host audio backends.\n+- **`authz/`**: QEMU Authorization framework.\n+- **`backends/`**: Host resource backends (RNG, memory, crypto).\n+- **`block/`**: Block layer, image formats (qcow2, raw), and protocol drivers.\n+- **`chardev/`**: Character device backends (TCP, serial, mux, etc.).\n+- **`crypto/`**: Cryptographic algorithms and framework.\n+- **`disas/`**: Disassembler support for various architectures.\n+- **`dump/`**: Guest memory dump implementation.\n+- **`ebpf/`**: eBPF program support (e.g. for virtio-net RSS).\n+- **`fpu/`**: Software floating-point emulation.\n+- **`gdbstub/`**: Remote GDB protocol support.\n+- **`hw/`**: Hardware device emulation, organized by type (e.g., `hw/net`, `hw/pci`) or architecture.\n+- **`include/`**: Global header files, mirroring the source tree layout.\n+- **`io/`**: I/O channels framework.\n+- **`linux-user/` & `bsd-user/`**: User-space process emulation.\n+- **`migration/`**: VM migration framework.\n+- **`monitor/`**: HMP and QMP monitor implementations.\n+- **`nbd/`**: Network Block Device server and client code.\n+- **`net/`**: Networking stack and host backends.\n+- **`plugins/`**: TCG introspection plugins core.\n+- **`qapi/`**: QAPI schema and code generation infrastructure.\n+- **`qga/`**: QEMU Guest Agent.\n+- **`qom/`**: QEMU Object Model implementation.\n+- **`replay/`**: Deterministic record/replay support.\n+- **`rust/`**: Rust integration and Rust-based device models.\n+- **`scripts/`**: Build system helpers, `checkpatch.pl`, `tracetool`, etc.\n+- **`system/`**: Core system-level emulation logic (replaces `softmmu`).\n+- **`target/`**: CPU-specific emulation (ISA translation, CPU state).\n+- **`tcg/`**: The Tiny Code Generator (JIT) backends.\n+- **`tests/`**: Test suites (qtest, unit, functional, tcg).\n+- **`ui/`**: User interface backends (GTK, SDL, VNC, Spice).\n+- **`util/`**: Low-level utility functions and data structures.\n+\n+## Development Workflows\n+\n+### Tracing\n+- QEMU uses a tracing framework. Events are defined in `trace-events` files.\n+- To add a trace point:\n+ 1. Define the event in the local `trace-events` file.\n+ 2. Call the trace function in code: `trace_my_event_name(arg1, arg2);`.\n+ 3. Ensure the file includes `\"trace.h\"`.\n+\n+### QOM (QEMU Object Model)\n+- Most devices are QOM objects.\n+- Key concepts: `TypeInfo`, `ClassInit`, `InstanceInit`, `InstanceFinalize`.\n+- Use `OBJECT_DECLARE_SIMPLE_TYPE` or `OBJECT_DECLARE_TYPE` for boilerplate.\n+- Access state using `MY_DEVICE(obj)`.\n+\n+### QAPI\n+- Interface definitions live in `qapi/*.json`.\n+- After modifying a schema, run the build to regenerate headers.\n+- Generated code lives in `build/qapi/`.\n+\n+## Code Style (see `docs/devel/style.rst`)\n+- **Formatting**: 4-space indents, NO tabs, 80-char line limit (max 100).\n+- **C Braces**: Mandatory for all blocks (if/while/for). Open brace on same line (except functions).\n+- **C Includes**: `#include \"qemu/osdep.h\"` MUST be the first include in every `.c` file.\n+- **C Comments**: Use `/* ... */` only. No `//` comments.\n+- **Naming**: `snake_case` for variables/functions; `CamelCase` for types/enums.\n+- **Memory**: Use GLib (`g_malloc`, `g_free`, `g_autofree`) or QEMU (`qemu_memalign`). No `malloc`.\n+- **Errors**: Use `error_report()` or `error_setg()`. Avoid `printf` for errors.\n+- **Lints**: Run `./scripts/checkpatch.pl` on C patches. Use `make clippy` for Rust.\n+\n+## Commit Style\n+- **Small Commits**: Favour small discreet commits changing one thing.\n+- **Maintain Bisectability**: Each commit must compile and pass basic tests.\n+- **Separate Refactoring**: Split code movement or style fixes from functional changes.\n+- **Commit Messages**: Use a concise subject line, followed by a body explaining \"why\" (not just \"what\").\n+- **Signed-off-by**: Every commit must have a `Signed-off-by` line.\n", "prefixes": [ "RFC", "01/10" ] }