From nobody Sat May 30 17:44:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780049721; cv=none; d=zohomail.com; s=zohoarc; b=NcVY8Imphc/j/jqpSP16p2HJ7V2Ye/tJBqplKHMJB2dda1OUBunYntZgx3+0VT06zFzeY9LT8DyOHvYYsgcLp1rhpPa5/aONQW4FYNPRAacYkQxXnSQ3o4f4PpIuB7ahOS9eI+x2f8SmLpOx4JixOLafs2vzB6dsRgNp2Km53rU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780049721; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/VIw3YmXx5HJytkVxeDA1OLVA6u9Y15TcNLpyHWAKcQ=; b=McEKNtoM7KWcCutXu7ZJj8FocbBkPn/2lWWlBKOHex/jmy7Rs0SWdg+p1sWeD0VzQ3AvTE6hfSQRhB2rE+SWQaV2GnZJUOctIfVp7cOy2Qvf3u6f50pAR7mx3uUrXHfeDAZHdtO2HzC32Ug9jb9Pm4BWcHn/KWoEKFz8NQKc9/M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780049721450392.9692178949265; Fri, 29 May 2026 03:15:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSuEq-0002z4-Ap; Fri, 29 May 2026 06:14:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSuEo-0002yU-T5 for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:46 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSuEj-00014C-R5 for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:46 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4904c1ce4c1so78948355e9.3 for ; Fri, 29 May 2026 03:14:40 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909cab0e79sm63839815e9.13.2026.05.29.03.14.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:14:38 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C0F8C5FA5C; Fri, 29 May 2026 11:14:37 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780049680; x=1780654480; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/VIw3YmXx5HJytkVxeDA1OLVA6u9Y15TcNLpyHWAKcQ=; b=dhFeoCynVr4wAVynU0BPTh3lI7AVhmqMMNS2aehYHPj99D7GGAhOETD2opEpdkwq9V dUz6dHye8X3xiT92eXby+SeQ5s7a0UIl8BXBNxEq/mmlTCTuSsxLiqDcUZBeKFcEjx/V HlWbuXUGfpg3dGINUIBYAWG1BPunmZpJmO8ViGfZwn3JK22Dp1GW9W1MjIksenNB9NHI 46ZLEMCC2jARzf7U4G3uhZgQ+/DY0P4h3TRRtyg9VDIZYdpQebYt35uExH6EuNiF4Hrf 75IoqcZuoVkoO/O0WnPG+14sbgDorxwidN0BjqHOHbBaVbgAAuYWk1fBb1agG1l8EvGA om9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780049680; x=1780654480; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/VIw3YmXx5HJytkVxeDA1OLVA6u9Y15TcNLpyHWAKcQ=; b=AWVZ/2nXdxBpoSwHFFbGvcZEXeyAMg//yaSMb1jsjAbE+Ngl3odKknxRd6gu7qqLeM T+vMVubxcXV8g9tCT7/xRDJ1Xm2aYor31NguJmefLUWHdwqoilPwlBqr68/OQEDmeKQt X9xPiL2lkoY2jJIuOdILQ+vvtpO17XWRzkjaslctA1jgwVIa1q8OGtgkD0X4SvzvY/H/ a5Oy/kKCZ84S5ovqF3CUslKxmiPddzZspZLlM6EJSHme7KcvN3wmrXi9FkXaUsPVPnXT trMgTbYpp2I9K4d/71+z3CXN9Dsi/hADDWs6NuE2vNO40s77cPJu86Yjvp87EM2NUrgD igbg== X-Gm-Message-State: AOJu0YzyrASBzb9ZhAMn5INfDdXch2rB9/WHjZOP0sTLjH+7cmSr3lT7 aGxpKqwqA5CASi9zP4CIvbaXPmyXnP9eljXX1ykFiFXQMFX6ouUGOmWhQ2FkMCJ5Eqg= X-Gm-Gg: Acq92OHXAIaRZTcOGzvD2OjeWIYej2Lp3Nx5LFzC2ARTrBrbhjoE7EHzMKIYzUjmYoR lS5RaeaYZ+948uZj13uiZ4oePPOzPMiJJgVUBtp/Rmam5+Pprr8dSIfhY98pjQtWaNPHtC5ubDh 9/OzOMKTlIzIYLLU4i+pNmwu5hecfswwM4e9JyatBdcd+W0IiL0EegZLgQaZmGbRXmsGor8BIBs rZCEVn2kmHlPQ0kkwsO4kIbU9GqI3ov3KP4laELno66Zh1gFR/b1RJcqAc41hL6ZSpQpurpbwIR cC3dsBx7AAz0JXa+eNmpGCqHzeHXaYtNW8t5vdRpCaqEiEJm1D9Efijpjaozw8IjBl9nyUbQGvn +Vs+M9Kd6MHngbRseEZJEcJ7TwZO3JIkhkRhciI8NSyaON9MrSG3Y9bLzc+C00eRdNP+E4H0Nuj sQGgpnGrwon73f3WT+XpOLu5LUpFeBKENrlQ== X-Received: by 2002:a05:600c:3f14:b0:490:9699:4428 with SMTP id 5b1f17b1804b1-4909c0c2d66mr42709545e9.26.1780049679835; Fri, 29 May 2026 03:14:39 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , John Snow , Paolo Bonzini , Alistair Francis , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Kevin Wolf , "Michael S. Tsirkin" , Peter Maydell , Warner Losh , Paolo Bonzini Subject: [PATCH v4 01/12] docs/devel: relax policy on AI-generated contributions Date: Fri, 29 May 2026 11:14:26 +0100 Message-ID: <20260529101437.410181-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529101437.410181-1-alex.bennee@linaro.org> References: <20260529101437.410181-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780049723892158500 From: Paolo Bonzini Until now QEMU's code provenance policy declined any contribution believed to include or derive from AI-generated content. A blanket ban was easy to maintain while LLM output was rarely usable on its own, but as the tools improved an absolute prohibition has become harder to justify. The concern that motivated the policy is unchanged, and it is worth stating precisely: the DCO is about whether the submitter has the legal right to contribute the code, not about "creative expression". The copyright and license status of LLM output remains unsettled, so that question is still open. What has shifted is the balance of risk: - projects accepting AI-assisted content have not run into serious legal trouble so far, which suggests the probability of the risk materializing is not high; - other organizations, such as Red Hat[1], have assessed the risk as acceptable -- though a community of individual developers does not have the legal backing of a company, and even an unfounded dispute would be a long-lasting distraction from work on QEMU. Revise the policy to permit AI assistance where the ramifications of copyright violations are at least easy to revert and unlikely to spread: tests, documentation, mechanical changes, and small bug fixes. Core code that other things depend on, and that cannot simply be thrown away once a problem is noticed long after the fact, stays off-limits without prior agreement from a maintainer. Related to this, and already visible in the incredible uptick in security requirements, is the question of maintainer burnout and the shift in effort from the author to the reviewer of the code. AI lowers the cost of producing a patch but does nothing to lower the cost of understanding and reviewing one; if anything it raises it, since a reviewer can no longer assume that the submitter has reasoned through every line. The limits above work just as much to keep the volume of review work sustainable. Furthermore, introduce "AI-used-for:" as a trailer to record where AI was used, and include other suggestions that help reviewers judge the result. The standard is slightly different from the more usual "Assisted-by", which doubles as a check that the author has read the policy. In any case, use of AI does not relax any other contribution requirement: authors still comply with the DCO and take responsibility for the whole patch via Signed-off-by. [Commit message largely based on https://lore.kernel.org/qemu-devel/ahXbxzB4C_lr6b0N@redhat.com/, by Kevin Wolf. - Paolo] [1] https://www.redhat.com/en/blog/ai-assisted-development-and-open-source-= navigating-legal-issues Cc: Alistair Francis Cc: Daniel P. Berrang=C3=A9 Cc: Kevin Wolf Cc: Michael S. Tsirkin Cc: Peter Maydell Cc: Warner Losh Link: https://lore.kernel.org/qemu-devel/20260524083329-mutt-send-email-mst= @kernel.org/T/ Signed-off-by: Paolo Bonzini Acked-by: Michael S. Tsirkin Message-ID: <20260528073412.551117-1-pbonzini@redhat.com> Signed-off-by: Alex Benn=C3=A9e --- v2 - add warning emphasis to policy - add Documentation to list of acceptable uses - make clear maintainers have discretion to accept/reject large AI changes - make it clear a human should write the commit message - rephrase "presence" to "usage" - make helpful/unhelpful prompts clearer --- docs/devel/code-provenance.rst | 172 +++++++++++++++++++++------------ 1 file changed, 111 insertions(+), 61 deletions(-) diff --git a/docs/devel/code-provenance.rst b/docs/devel/code-provenance.rst index 65b8f232a08..3085c2e99dc 100644 --- a/docs/devel/code-provenance.rst +++ b/docs/devel/code-provenance.rst @@ -1,7 +1,7 @@ .. _code-provenance: =20 -Code provenance -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +Code provenance and AI usage +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =20 Certifying patch submissions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -288,62 +288,112 @@ content generators below. Use of AI-generated content ~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20 -TL;DR: - - **Current QEMU project policy is to DECLINE any contributions which are - believed to include or derive from AI generated content. This includes - ChatGPT, Claude, Copilot, Llama and similar tools.** - - **This policy does not apply to other uses of AI, such as researching AP= Is - or algorithms, static analysis, or debugging, provided their output is n= ot - included in contributions.** - -The increasing prevalence of AI-assisted software development results in a -number of difficult legal questions and risks for software projects, inclu= ding -QEMU. Of particular concern is content generated by `Large Language Models -`__ (LLMs). - -The QEMU community requires that contributors certify their patch submissi= ons -are made in accordance with the rules of the `Developer's Certificate of -Origin (DCO) `. - -To satisfy the DCO, the patch contributor has to fully understand the -copyright and license status of content they are contributing to QEMU. Wit= h AI -content generators, the copyright and license status of the output is -ill-defined with no generally accepted, settled legal foundation. - -Where the training material is known, it is common for it to include large -volumes of material under restrictive licensing/copyright terms. Even where -the training material is all known to be under open source licenses, it is -likely to be under a variety of terms, not all of which will be compatible -with QEMU's licensing requirements. - -How contributors could comply with DCO terms (b) or (c) for the output of = AI -content generators commonly available today is unclear. The QEMU project = is -not willing or able to accept the legal risks of non-compliance. - -The QEMU project thus requires that contributors refrain from using AI con= tent -generators on patches intended to be submitted to the project, and will -decline any contribution if use of AI is either known or suspected. - -Examples of tools impacted by this policy includes GitHub's CoPilot, OpenA= I's -ChatGPT, Anthropic's Claude, and Meta's Code Llama, and code/content -generation agents which are built on top of such tools. - -This policy may evolve as AI tools mature and the legal situation is -clarified. - -Exceptions -^^^^^^^^^^ - -The QEMU project welcomes discussion on any exceptions to this policy, -or more general revisions. This can be done by contacting the qemu-devel -mailing list with details of a proposed tool, model, usage scenario, etc. -that is beneficial to QEMU, while still mitigating issues around compliance -with the DCO. After discussion, any exception will be listed below. - -Exceptions do not remove the need for authors to comply with all other -requirements for contribution. In particular, the "Signed-off-by" -label in a patch submission is a statement that the author takes -responsibility for the entire contents of the patch, including any parts -that were generated or assisted by AI tools or other tools. +.. warning:: + + Please read the below policy before using AI to contribute code or + documentation to QEMU. This applies to ChatGPT, Claude, Copilot, + Llama, and similar tools. + +The increasing prevalence of AI-assisted software development, +and especially the use of content generated by `Large Language Models +`__ (LLMs), +poses a number of difficult questions. + +Risks to open source projects include maintainer burnout from an +increased number of contributions, as well as the risk to the project +from unintentional inclusion of copyrighted material in the LLM's output. +In order to mitigate these risks, the QEMU project currently allows +using AI/LLM tools to produce patches in a limited set of scenarios: + +**Mechanical changes** + If you can use a deterministic tool or a script, it is preferred + that you use it and not replace it with AI. If you don't know how + to do the change deterministically, you can ask the AI for help. + +**Small bug fixes** + These should be limited to 20 lines of code or less, not including + tests. You are still expected to understand and explain your changes + and the rationale behind them. + +**Tests** + Note that you must still confirm that each test actually exercises + the intended behavior including, for regression tests, that it + fails without the code under test and passes for the right reason. + +**Documentation** + Updates to documentation can be driven by an AI tool. However it is + essential the result is carefully reviewed before submission. LLMs + can write nicely worded and plausible prose that is still incorrect. + +These boundaries do not apply to other uses of AI, such as researching +APIs or algorithms, static analysis, or debugging, provided the model's +output is not included in contributions. + +If you wish to send large amounts of AI-generated changes, or any other +contribution not in the above categories, please get in touch with the +maintainer beforehand. It is at the discretion of the relevant +maintainers if they would review and accept such contributions. + +**Use of AI does not remove the need for authors to comply with all +other requirements for contribution.** In particular, the +``Signed-off-by`` label in a patch submission is a statement that +the author takes responsibility for the entire contents of the patch, +certifying that their patch submission is made in accordance with the +rules of the `Developer's Certificate of Origin (DCO) `. + +Commit messages for AI-assisted changes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +AI tools **should not be used to write commit messages**. The act of +summarising and explaining the reasoning for the changes is an +important demonstration of the human authors understanding of the +commit. + +When AI/LLM tools produce or substantively shape your patch, add an +``AI-used-for:`` trailer along with the sign-offs and other metadata +at the bottom of the commit message. The text of the trailer could be +one or more of ``code``, ``tests``, ``docs``, ``research``, possibly +followed by an explanation in parentheses: + +.. code-block:: none + + AI-used-for: tests, docs + AI-used-for: code + AI-used-for: code (refactoring) + AI-used-for: code (prototype) + AI-used-for: research + +The trailer is intended as a clarification of your DCO obligations as +well as to guide reviewers. It is not intended for minimal usage such +as autocomplete or asking for a pre-review of the patch, and it does +not remove your responsibility to understand the changes that you are +submitting. + +There is no requirement to include your prompts or summarize the +conversation in the commit message or cover letter, but you may do so +if you think it helps a reviewer judge the result. For example: + +**Helpful prompts** + These describe concrete constraints or instructions, making it easy for a + reviewer to see how the tool's output was guided: + + * "move field ``foo`` from ``struct aa`` to ``struct bb``. If a + function already has a local variable or parameter of type ``struct + bb``, use it instead of accessing ``aa.bb``" + + * "add an implementation of the trait for ``Mutex``; for + the implementation, take the lock around the calls and forward to ``T`= `" + +**Unhelpful prompts** + These are too generic to provide meaningful context: + + * "write user-facing documentation for the new tool" + + * "write testcases for the new functions" + +QEMU does *not* use ``Assisted-by`` or ``Generated-by`` trailers. In +particular, it is not necessary to specify the exact AI model or tool +used to create the commit. + +Deterministic tooling (sed, coccinelle, formatters) is out of scope for +the trailer, but should be mentioned in the commit message. --=20 2.47.3 From nobody Sat May 30 17:44:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780049720; cv=none; d=zohomail.com; s=zohoarc; b=AKoJTcvpxVDgRypRtBTlGFqmrDHTaPob+uFqY1olv0RvI9nV+unYdGmzQmSp9YysEoZX1uY1tZW1/NMNskgpjJs9qu9kz5UTC+gYk4JHykzqPSAtkBTlPR5VQnEz02Jv6aqZDRi1V6QP0kXzgmMoUouB/0129BCvstTtUXtZDVo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780049720; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+ZIxJLKnogiZRFtEdFhe3ZYq8nsDN+K6T721uRSyCqw=; b=crkTu0viRIotEXJooM1voDcO78ncvA3Ji44mY0qzPaafg21iluRnUmjEboiria5hhj6GNZ28te7peGvHFPW+u5zowT39v/lTrXKH6kcFT/AAs5SzjJij0IZaiHIif9AVYS2AIFspLNLMyPF+45digipRmf5VQDpFUJiqTpMzE/U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780049720839232.25062342058118; Fri, 29 May 2026 03:15:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSuEo-0002y8-GV; Fri, 29 May 2026 06:14:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSuEm-0002xi-Hu for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:44 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSuEj-00014K-R5 for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:44 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-45ee5cdbd28so1017513f8f.1 for ; Fri, 29 May 2026 03:14:41 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef354bb7asm2560512f8f.20.2026.05.29.03.14.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:14:38 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D8F5A602BD; Fri, 29 May 2026 11:14:37 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780049680; x=1780654480; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+ZIxJLKnogiZRFtEdFhe3ZYq8nsDN+K6T721uRSyCqw=; b=DnfhOXCXH4Guo0NA5BleduZOwuX6qnhhnxLcKlchjoERvIjypRPMxKkIbn7OZ22hxy YGCCicKDgJxXxD7EtssKPey9lEqlQ/TbKzwY8/4yIxUaC0ui+3ddrbXj/QNMq70XLH9M aVscbmgNTmevO03EjzBwDT+gqLHALvFDzGXxoBh4PA0GmZ6fY60qoQuRRAgD92F+HqFK sq7GzrFssAiWINhtP7GfoASxzbU0yMh1n0R13hAk/OTOskPNYgeX6yFHWuFcrPPPJ+Ed Hz80f2rMPu/qG0X/VstDHKCaXakYNlBDRjWhM0dwVw6I5lS4wBPJuy0KD4M54T/Gd2+m Ylcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780049680; x=1780654480; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+ZIxJLKnogiZRFtEdFhe3ZYq8nsDN+K6T721uRSyCqw=; b=bhGvW9JTUblpOoIyeLfegKlcZzBfY3iOoTOwanAA1hotMsiBvIzpkmLVB73szKSsRI n45GgJ3s1msBxNTKXtBIzruJWoLJERDXq469Lm49NpxJiyTdwOWCySOFCAAMKgGpHrF4 S6p7n72aQs3i6Jn5w747xVnIZnzf0eIjmHUAGPXiDLbDHrQ+qGRpaEX6Swo84QyOGckT FyBJoFCVYCoRfMPfbAyksP7nO7LfpRLHKRIN8SCQbSSZGpPPnVwbnEZObVw8gfj6SBRV cDkX6GNAPnLCwVTySdwqXbA1eFLz4JMqF7sNIQIlBhcXKAUiyst7Yxwt5kr+x1NhMPBc sMMQ== X-Gm-Message-State: AOJu0YxQCjLmha6NLDvmmBa6Pi1L4pJ0xcUdfvgy6qjAxHWLyQHKl3iJ rSwjB009De9KNCO17KeZ1mv2E9odeNFVYw/JVHFwVbTZ+s2xz/iXM7z6ohz9kwF05NU= X-Gm-Gg: Acq92OHoaohaK/+cd6yBEddP0JuT0kf7wJ/iHfo1Y32iXkAQKK6kWkFNyQNt2LDRaYP DtC1JKjgwLWbQ0zQJjPzCanNcqMmTOIL9QoBSwRunIRI4PlNV274+sxEcmL6MuzX2dCJGbgkYpd Mtlx7G7/x5bWVmRGWYcRzN0FO+ZBu5Svlo9XoApJ2gPTdgLugaV24tdPfF5Khr+yojssx1gAEud ZWLjHJ+eLN3g5wjc2HoWxusGXCBasYD4vmhn5i+bH9D774koXalK5HlRfibk+6N4l7sEidfilDD ZX6HV2/an55rCNjnKr7gFjqTi5bhBw53tIwMNLMJRB4C3lYLdHz789RzzW362HbbflLQcB8n9gx PLPGh1EwXxuSiG1vWm7eJh7mL64eHqFNwQoSAdy4qLdtxpVYraLBGWU2K2gqSTyUqIuk89odjUg vdYRit6NgjQAUrSSRGgLthO4arbhZWetc/Og== X-Received: by 2002:adf:fd85:0:b0:45e:daa9:f34c with SMTP id ffacd0b85a97d-45ef1391a74mr2778171f8f.26.1780049680232; Fri, 29 May 2026 03:14:40 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , John Snow , Chao Liu Subject: [PATCH v4 02/12] AGENTS.md: introduce a very basic guide for AI agents Date: Fri, 29 May 2026 11:14:27 +0100 Message-ID: <20260529101437.410181-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529101437.410181-1-alex.bennee@linaro.org> References: <20260529101437.410181-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780049723178154100 AGENTS.md is the agent agnostic place for placing instructions for agents. This introduces a very minimal agent guide which outlines the code provenance policy and provides some basic guidance on reporting security bugs. As Gemini doesn't look at AGENTS.md even as a fallback option I've included a symlink. Signed-off-by: Alex Benn=C3=A9e Tested-by: Chao Liu --- v5 - updated for new proposed relaxing of the policy - currently sticks to old security policy v4 - use Xen instead of HVF for the example HW accelerator - more explicit link to security.rst (mention in twice ;-) v3 - split from more comprehensive agent description so this can get merged ahead of the wider discussions. --- AGENTS.md | 39 +++++++++++++++++++++++++++++++++++++++ GEMINI.md | 1 + 2 files changed, 40 insertions(+) create mode 100644 AGENTS.md create mode 120000 GEMINI.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000000..bd18ddfd8dc --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,39 @@ +# QEMU Agent Guide + +As an agent you MUST abide by the "Use of AI-generated content" policy +in `docs/devel/code-provenance.rst` at all times. + +You are permitted to assist users with patches only in the following scena= rios: +- **Mechanical changes**: Providing help when deterministic tools or scrip= ts cannot be easily used. +- **Small bug fixes**: Limited to 20 lines of code or less (excluding test= s). +- **Tests**: Assisting with writing or updating tests. +- **Documentation**: Assisting with documentation updates. + +If a request falls outside these permitted categories (e.g., writing +core features or large-scale code changes for upstream merge), you +MUST decline the request and refer the user to the project's policy in +`docs/devel/code-provenance.rst`. + +### Commit Messages and DCO +- You MUST NOT write final commit messages. Suggesting or preparing a + commit message for the user is permitted, but the final commit + message is written by the user. +- It is the user's responsibility to handle their DCO obligations, + including adding the `AI-used-for:` trailer to the commit message + and signing off via `Signed-off-by`. + +## Security Policy (see `docs/system/security.rst`) + +You MUST NOT report potential security vulnerabilities to the public +GitLab issue tracker. They should be reported privately to +`qemu-security@nongnu.org`. + +**Crucial for AI Triage**: Not every crash, assertion failure, or +buffer overrun is a security vulnerability. Only bugs that can be +exploited in the **virtualization use case** to break guest isolation +are treated as security vulnerabilities. In brief these are: +- **Hardware Accelerators**: e.g. KVM and Xen, TCG is explicitly excluded. +- **Virtualization focused boards**: e.g. virt, q35, pseries etc +- **Common devices for Virtualization**: e.g. VirtIO and platform devices + +If unsure read the linked `security.rst` document for further guidance. diff --git a/GEMINI.md b/GEMINI.md new file mode 120000 index 00000000000..47dc3e3d863 --- /dev/null +++ b/GEMINI.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file --=20 2.47.3 From nobody Sat May 30 17:44:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780049751; cv=none; d=zohomail.com; s=zohoarc; b=ViiGAzd6UkKFve1d3EkKU2oVwVBT9XP1rC1KqNLdPf8ButZPapfMcX1YnKtXsBNCjbh8+cOejfGwd0NnGqg4MlLiviRHW8rFeeh0m6Q7DvcY+Wp3G78/Uoo2iAG8BfN+/yoMioiwi2p44z88TpoRDI5taQ7TpJ7BDBfmbIRpcJk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780049751; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=eMMFe0yvVmEzgfmkcxW/z0D7RgLYHXLz9oPQn8R7iKk=; b=VTJC1IAaFeLg3CL+fPfaYV+i1Mwb4EijBF8PcSa4k4z1Uv71Yi5IAa9DTaLSBqE7AWWgLIZMp8YeFSJUCzbfFJprBKGbr5rTVUuSSGP5gwh0ZCH6MooJt4S7e5X23MXhszJ0YbTAIrgB4B1Vq7nbabH2OxRpmrW4NdnteBsG7+w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780049751390903.196080018194; Fri, 29 May 2026 03:15:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSuEp-0002yr-RO; Fri, 29 May 2026 06:14:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSuEo-0002xz-8N for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:46 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSuEl-00014Z-BT for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:45 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-45e9f4a3510so4612464f8f.1 for ; Fri, 29 May 2026 03:14:42 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef358c07bsm2447017f8f.36.2026.05.29.03.14.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:14:39 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id F2EE3602E1; Fri, 29 May 2026 11:14:37 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780049681; x=1780654481; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eMMFe0yvVmEzgfmkcxW/z0D7RgLYHXLz9oPQn8R7iKk=; b=F9+Iur/4bnwGGtaAviTbJFPoWs1/3ds0bfS+GWoQZNR/bVEo7EJfD3tdLtsS8lNzs9 Yt+6j/AG8hDde4uVn5CNIQ0SCm+7jeac5WiQ7xOZaKt4efXdhQKBD/ITOhCBfrFqiu6v 2Z6il0pDFn35HROyFz/OTrsLvCiBkFkqJn2hzYDPuGP5C+dR7KRJOn0vapDPOhCBVdus 60gMaZh/tP7t5mgvwrs6GTjVrtXmlTwlHJfG1GMj5SMjEYl6whZ1EOIe98AU6vXxCooS fUMBp8XYgCqFdZeKonQMgwxGtJxqlfwxHTqayJwdOeIX3xoAzYn9g/hAYvvcz+nCwtsJ 2cNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780049681; x=1780654481; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=eMMFe0yvVmEzgfmkcxW/z0D7RgLYHXLz9oPQn8R7iKk=; b=o8iBlgWCRvAqGrgq72NtM2gBtv53WuHWW/gMFf9q1/HaKm4GkCAuNrLGIbiKvknAQg X+HMnwDEx9YK6QT+z0fG0xU+NBZJJzC1ZYTIbiy3C8OFY7Go5jdgr6o0OZ18FS+7Kh2s b048S6jA/yNB5ldkeIyeBEp9UvgO06j53tXR7NSQUr3AN9c+IuC5NbmfzMA1MYn1dpvt XkZi5E5JQy06KEZx+zylE0iyJRKg7sgapHeMrzdc4k4EQwC2bMpuBxilFiDSyCBNIw0y X7Xq7RQM2jw7WrGs3DLgQQQfyswxgGDt3XJb3RJVq4zqWzhBC2iRBBMyyQWdZC6fHwpP WNfg== X-Gm-Message-State: AOJu0YyIoTbxZnYCbTWY7mKVZ0D1OSwxILVpfkWqy7mePCDsaHGyGB2O FD1WYdW2bqtS2ES74JWSkP6vN4IP/+wFbYpJVn0mkv5fr5560gQDmaRVvYI8Gd5iE8E= X-Gm-Gg: Acq92OEI4leDMtyj49IwOSBWQdIqA3euUkuPR9ZgZNE965GOxb/na3ygFNPX3+KHffe oFkyFBlTVpV9L8LtV0N7aqsw0ZONiplncrTeCJg+lyvbdvVxQZSGihcVrkvrBcWdo3Oh9pruyT7 f5ddl3JGakXrTZiN48QfOg4672Voj+2ykUUPPsA9XHgq3VfQgCgExPWF6O7ZxpKJIibdZM/Z/PT laBLpyHushYaMh2TQoFGZjGwu7dGiHP+AmwPgYbyBaXKvoexwXDgJcmyJo4DkmFvquO/HKLOuHa n9Cbc8Ccje04qaIRPtt+CUgZARUfp5EVmht1b1J8ggGDBkoWbMGo0sM3d1u9zBN/OOx2pLb4qVu GC9RdEdrY1lR1kTT3qs2UUEZs/dCLQ64G5YCBF6dXLp9KS5XXZ/YBt2RBw7xomVCqCKi3If+6aN CJAEwKfwBhjLrkny61h15sDt9ACVVpLFhOcA== X-Received: by 2002:a05:6000:481c:b0:43d:733f:aee6 with SMTP id ffacd0b85a97d-45ef13f840fmr3855159f8f.10.1780049681293; Fri, 29 May 2026 03:14:41 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , John Snow Subject: [PATCH v4 03/12] AGENTS.md: expand with information on skills, layout and style Date: Fri, 29 May 2026 11:14:28 +0100 Message-ID: <20260529101437.410181-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529101437.410181-1-alex.bennee@linaro.org> References: <20260529101437.410181-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780049751823158500 To be efficient in navigating the code base inform the agents of the basics of the repo layout, where skills can be found and a very quick overview of the source code, coding and commit styles. Signed-off-by: Alex Benn=C3=A9e --- v3 - split AGENTS.md into two commits --- .gitignore | 1 + AGENTS.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/.gitignore b/.gitignore index 61fa39967b5..4ccba871d16 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ .git-submodule-status .clang-format .gdb_history +.plan cscope.* tags TAGS diff --git a/AGENTS.md b/AGENTS.md index bd18ddfd8dc..8ceffde4ebb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -37,3 +37,64 @@ are treated as security vulnerabilities. In brief these = are: - **Common devices for Virtualization**: e.g. VirtIO and platform devices =20 If unsure read the linked `security.rst` document for further guidance. + +## Repo Layout +- **Build Directory**: QEMU uses out of tree builds, by default the `build= ` sub-directory is used. +- **Multiple Builds**: Developers might create a `builds` directory with d= ifferent configurations in subdirs (e.g. `builds/debug`, `builds/asan`). +- **Documentation**: Developer docs live in `docs/devel`. +- **Plan Files**: Plan files should be placed in `.plan`, they are not inc= luded in commits. Use them to track complex multi-step tasks. + +## Agent Skills (see `.agents/skills`) +You should use the following specialized skills for common tasks: + +## Source Code Layout (see `docs/devel/codebase.rst`) +- **`accel/`**: Hardware accelerators (KVM, TCG, HVF, Xen, etc.) and archi= tecture-agnostic acceleration code. +- **`audio/`**: Host audio backends. +- **`authz/`**: QEMU Authorization framework. +- **`backends/`**: Host resource backends (RNG, memory, crypto). +- **`block/`**: Block layer, image formats (qcow2, raw), and protocol driv= ers. +- **`chardev/`**: Character device backends (TCP, serial, mux, etc.). +- **`crypto/`**: Cryptographic algorithms and framework. +- **`disas/`**: Disassembler support for various architectures. +- **`dump/`**: Guest memory dump implementation. +- **`ebpf/`**: eBPF program support (e.g. for virtio-net RSS). +- **`fpu/`**: Software floating-point emulation. +- **`gdbstub/`**: Remote GDB protocol support. +- **`hw/`**: Hardware device emulation, organized by type (e.g., `hw/net`,= `hw/pci`) or architecture. +- **`include/`**: Global header files, mirroring the source tree layout. +- **`io/`**: I/O channels framework. +- **`linux-user/` & `bsd-user/`**: User-space process emulation. +- **`migration/`**: VM migration framework. +- **`monitor/`**: HMP and QMP monitor implementations. +- **`nbd/`**: Network Block Device server and client code. +- **`net/`**: Networking stack and host backends. +- **`plugins/`**: TCG introspection plugins core. +- **`qapi/`**: QAPI schema and code generation infrastructure. +- **`qga/`**: QEMU Guest Agent. +- **`qom/`**: QEMU Object Model implementation. +- **`replay/`**: Deterministic record/replay support. +- **`rust/`**: Rust integration and Rust-based device models. +- **`scripts/`**: Build system helpers, `checkpatch.pl`, `tracetool`, etc. +- **`system/`**: Core system-level emulation logic (replaces `softmmu`). +- **`target/`**: CPU-specific emulation (ISA translation, CPU state). +- **`tcg/`**: The Tiny Code Generator (JIT) backends. +- **`tests/`**: Test suites (qtest, unit, functional, tcg). +- **`ui/`**: User interface backends (GTK, SDL, VNC, Spice). +- **`util/`**: Low-level utility functions and data structures. + +## Code Style (see `docs/devel/style.rst`) +- **Formatting**: 4-space indents, NO tabs, 80-char line limit (max 100). +- **C Braces**: Mandatory for all blocks (if/while/for). Open brace on sam= e line (except functions). +- **C Includes**: `#include "qemu/osdep.h"` MUST be the first include in e= very `.c` file. +- **C Comments**: Use `/* ... */` only. No `//` comments. +- **Naming**: `snake_case` for variables/functions; `CamelCase` for types/= enums. +- **Memory**: Use GLib (`g_malloc`, `g_free`, `g_autofree`) or QEMU (`qemu= _memalign`). No `malloc`. +- **Errors**: Use `error_report()` or `error_setg()`. Avoid `printf` for e= rrors. +- **Lints**: Run `./scripts/checkpatch.pl` on C patches. Use `make clippy`= for Rust. + +## Commit Style +- **Small Commits**: Favour small discreet commits changing one thing. +- **Maintain Bisectability**: Each commit must compile and pass basic test= s. +- **Separate Refactoring**: Split code movement or style fixes from functi= onal changes. +- **Commit Messages**: Use a concise subject line, followed by a body expl= aining "why" (not just "what"). +- **Signed-off-by**: Every commit must have a `Signed-off-by` line. --=20 2.47.3 From nobody Sat May 30 17:44:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780049792; cv=none; d=zohomail.com; s=zohoarc; b=HdUyt5PnzgXtedxpk4/U0SaJp1kXNNUu3dLu2AeA1YSbNllAE4+z89UUH5LqR8njs+pAjI/MNBQIjumOJ1hDinm8bKOl4rTq4xG2hQlehvUtC7E8oYPWgrYaYka0AFTyOoUrOK+28dc0bUJCaiH4+izoTBGuPR6BL1kHRAZ6S/0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780049792; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kfk0lWhmTaW7RpGfBcqepKA8zjxO6Vjzoj0cpTZOs50=; b=StQ8vu4SfmBCjLLbj8qDogC81EANVMr4eWP4e3vL9kANXHRtueVNR1sWioi252Bj8AuM/hAd3hBmrjFQx5ESR+01ewsNHLTqEc9wySYXdR+VG0yq5n8NZWpZv7M+8h2Es3xtSgkRyym+wOmM5DH8HBsaA/6GWkC+z84yXiL0EOg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780049792781502.0246432626302; Fri, 29 May 2026 03:16:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSuEr-00030E-PR; Fri, 29 May 2026 06:14:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSuEo-0002yK-Hl for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:46 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSuEk-00014Q-9x for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:46 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4903f7a90d1so66352385e9.2 for ; Fri, 29 May 2026 03:14:41 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909ca6db64sm35091045e9.6.2026.05.29.03.14.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:14:39 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 163C460335; Fri, 29 May 2026 11:14:38 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780049681; x=1780654481; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kfk0lWhmTaW7RpGfBcqepKA8zjxO6Vjzoj0cpTZOs50=; b=Fjx3qdB5+6gu6CogUf6pTy3oU3Nm30pab69ahaSqmJjXWccgJ5cMVSqjmo+08nfwZA VH0t09wp7+uQAoLRp3OeQfAuv7P9u9i6lJeJZuvGPG5OZRslhVqz2o+edDCqG4ZiSwNw P+uX120EvK4UsHmW6TiYSs9goKCGdMOy+xiwich6TbJzHVdhPPQvHnDMBj6wtgJnuuz9 tqnB3o3UrKJJupYWqw4Q6+yby/py4lOlZC3r0vZSlpaQFiBO+HICrYdOtiuffcTqkQYp WzlL6D/EzNs7D5m1YJlgBvmTmuWZGtg+rq08Fs17mv8uGQowe+iXEqJh8XRqI1+LUPGY 6HiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780049681; x=1780654481; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kfk0lWhmTaW7RpGfBcqepKA8zjxO6Vjzoj0cpTZOs50=; b=cAzpkoGh99mhBxb8vjLyvqFlkHxTLUvG1lkcGZOQgxPJdbpjhS8K6bOKTV1yhzohyQ 6LdpK0w/85w1sEMiSEwZCMo1CLhLS4E4NH7i1K8vBW9742mMHH9vQzDClDfT3SAN+72K mWFJDxznXrZzpVS50RJ++Y0Tfq5rS+O9lu95uLBKNufKBT8zMdL5A77PnmVCHQaU+Ip+ 7qibSwnB0HbmUeZCo8qBGssQkNmkHPhK2kh7wtLwsUZeGJMRbFQ/UL5Eshh+WbhxyoAw 2ce5JRcUfMYuccITUxGUxtzY0ttgwnzmwX9N0XJiXL0B+8RAcUWRwbmEo2y3vvm42eyj vPcQ== X-Gm-Message-State: AOJu0YwRQTAWYKLRfQit6JZBGWJMGcviEBInCXDZcNP0zv+OhkSbbAXZ xmdvSJt6zUCF8sj6+0OjUhkJUFWb+Iarlais2zqBQA6ALxzWt9YXAPmy8e8pBN6fp74= X-Gm-Gg: Acq92OEgJykz6KvgnQrjxl1koTyxnrGP7Eiad8pYGQUbdfVRxSkfI7BvKLK5Bh/uF0k sHeXc4PtxDXZnEwo41kFQKNPfmuxu70MCRU0ZD8+tndrukwt74QbwZaCdWXvnLUGZtireL8qyAt FGyupPe5g7A9TQojuLsUyf1dZS8fpMFJ05AeeHF1sLd5M9i5+ihFhgmCPAIt1mrnbynXoQNNk+j wRXU5xXoVRMSN4r3EpRg8gYqlQ5HUzPKMp2FOYnurxGB1H5gxGpUUv00xolYBE+cEV0MZQo0NVf bwaAo687zqeZlT2R7NUMzS6cj3ZU2v+NDmTL6mtz2M4a+HzPKFEhS7q1eV03xEa6WODCvptkz7B lAhfTvpgxZUeLzz1Y0XVuFcN9vnoFYd8RPoInnxAH4VHiH+9hWu2cBoPcXChJSjc4/KNyEXQc38 G6mZEhCQNmkFpG07ner1tUQn4+UCxIzSXZsBLIiDMIatDO X-Received: by 2002:a05:600c:1798:b0:489:1f04:96c3 with SMTP id 5b1f17b1804b1-4909c0811cemr26167755e9.2.1780049680621; Fri, 29 May 2026 03:14:40 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , John Snow Subject: [PATCH v4 04/12] scripts/expand-macro.py: helper script exploding macros Date: Fri, 29 May 2026 11:14:29 +0100 Message-ID: <20260529101437.410181-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529101437.410181-1-alex.bennee@linaro.org> References: <20260529101437.410181-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780049793922158500 QEMU makes heavy use of C Macros which can be confusing to humans and seems almost impossible for AI agents to follow. In the past I've dealt with this by compiling with V=3D1 and manually copying and pasting the gcc command line and appending -E to run the pre-processor step. With the modern build system we now have a compile_commands.json so we can automate the process with a script. There is some trickiness involved in following the line markers so we know where in the source file we are. To handle this we implement a PreprocessorState object to track where in the include chain we are. This allows us to show the including location when we dump the expanded macro. Signed-off-by: Alex Benn=C3=A9e --- v3 - added missing SPDX identifier --- scripts/expand-macro.py | 274 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 274 insertions(+) create mode 100755 scripts/expand-macro.py diff --git a/scripts/expand-macro.py b/scripts/expand-macro.py new file mode 100755 index 00000000000..c0e728dfcc1 --- /dev/null +++ b/scripts/expand-macro.py @@ -0,0 +1,274 @@ +#!/usr/bin/env python3 +# +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Automate the expansion of QEMU macros based on compile_commands.json. +# +# This script runs the C preprocessor over a file to expand macros +# in a specified line range, using the compilation flags defined in +# compile_commands.json. +# +# Copyright (c) Linaro 2026 +# +import os +import sys +import json +import shlex +import subprocess +import argparse +import re + + +def find_compile_command(target_file, compile_commands): + """ + Search compile_commands to find the rule to build target_file + """ + target_abs =3D os.path.abspath(target_file) + for entry in compile_commands: + dir_path =3D entry.get('directory', '.') + file_abs =3D os.path.abspath(os.path.join(dir_path, entry['file'])) + if file_abs =3D=3D target_abs: + return entry + return None + + +def process_command(command_entry): + """ + Strip out output related options and return a command line that will + run the pre-processor only. + """ + command =3D command_entry.get('command') + if not command: + args =3D command_entry.get('arguments', []) + else: + args =3D shlex.split(command) + + if not args: + return None + + out =3D [] + it =3D iter(args) + for arg in it: + # the -M* options all deal with generating deps + if arg in ('-o', '-MF', '-MQ', '-MT', '-MD', '-MP'): + next(it, None) # Skip the option's argument + continue + if arg =3D=3D '-c': + continue + out.append(arg) + + # Enable pre-processor output, don't strip comments, trace includes + out.extend(['-E', '-CC', '-H']) + return out + + +def normalize_path(raw_path, working_dir): + """Normalize and make paths absolute.""" + if not os.path.isabs(raw_path): + return os.path.abspath(os.path.join(working_dir, raw_path)) + return os.path.normpath(raw_path) + + +class PreprocessorState: + """Tracks the state of the preprocessor as we parse its output.""" + def __init__(self): + self.stack =3D [] + self.current_path =3D None + self.current_line =3D 0 + self.current_instance_id =3D 0 + self.next_instance_id =3D 1 + self.sections =3D {} + + def update_on_marker(self, new_line, flags, path): + """Update the file stack and instance tracking based on markers.""" + # entering new file + if "1" in flags: + if self.current_path is not None: + self.stack.append((self.current_path, self.current_line, + self.current_instance_id)) + self.current_path =3D path + self.current_line =3D new_line + self.current_instance_id =3D self.next_instance_id + self.next_instance_id +=3D 1 + return + + # leaving file + if "2" in flags: + if self.stack: + _, _, popped_instance_id =3D self.stack.pop() + self.current_path =3D path + self.current_line =3D new_line + self.current_instance_id =3D popped_instance_id + else: + self.current_path =3D path + self.current_line =3D new_line + self.current_instance_id =3D self.next_instance_id + self.next_instance_id +=3D 1 + return + + # return to previous file without explicit flag 2 + if self.current_path !=3D path: + if self.stack and self.stack[-1][0] =3D=3D path: + _, _, popped_instance_id =3D self.stack.pop() + self.current_path =3D path + self.current_line =3D new_line + self.current_instance_id =3D popped_instance_id + else: + self.current_path =3D path + self.current_line =3D new_line + self.current_instance_id =3D self.next_instance_id + self.next_instance_id +=3D 1 + return + =20 + self.current_line =3D new_line + + def get_context_string(self, target_abs, working_dir): + """Generate a descriptive string showing the inclusion context.""" + if self.stack: + ctx_path, ctx_line, _ =3D self.stack[-1] + try: + rel_ctx =3D os.path.relpath(ctx_path, working_dir) + except ValueError: + rel_ctx =3D ctx_path + return f"{rel_ctx}:{ctx_line}" + + try: + rel_ctx =3D os.path.relpath(target_abs, working_dir) + except ValueError: + rel_ctx =3D target_abs + return f"{rel_ctx} (main file)" + + def add_line(self, line, line_range, target_abs, working_dir): + """Add a line to the sections if it is within the requested range.= """ + start_line, end_line =3D line_range + if self.current_path =3D=3D target_abs: + if start_line <=3D self.current_line <=3D end_line: + if self.current_instance_id not in self.sections: + ctx_str =3D self.get_context_string(target_abs, workin= g_dir) + self.sections[self.current_instance_id] =3D { + "context": ctx_str, + "lines": [] + } + self.sections[self.current_instance_id]["lines"].append(li= ne) + self.current_line +=3D 1 + + +def format_output_sections(sections, target_file, start_line, end_line): + """Format the accumulated sections into the final output string.""" + output_sections =3D [] + for _instance_id, data in sections.items(): + if not data["lines"]: + continue + header =3D f"/* Expansion from {data['context']} */" + body =3D "\n".join(data["lines"]) + output_sections.append(f"{header}\n{body}") + + if not output_sections: + return (f"/* Error: No lines found for {target_file} " + f"in range {start_line}-{end_line} */") + + return "\n/* end of expansion */\n".join(output_sections) + + +def extract_range(stdout, target_file, start_line, end_line, working_dir): + """ + Parse the output of the pre-processor while tracking where we + are in the source code from the markers so we can extract the + range asked for. + """ + state =3D PreprocessorState() + target_abs =3D os.path.abspath(target_file) + line_range =3D (start_line, end_line) + + # The format is undocumented but see: + # + # gcc/c-family/c-ppoutput.c:print_line_1 + # + # where 1 =3D entering file, 2 =3D leaving file + # and the 3 or 3 4 depends on linemap_location_in_system_header_p + line_marker_re =3D re.compile(r'^# (\d+) "(.*?)"(.*)') + + for line in stdout.splitlines(): + match =3D line_marker_re.match(line) + if match: + new_line =3D int(match.group(1)) + raw_path =3D match.group(2) + flags =3D match.group(3).split() + + path =3D normalize_path(raw_path, working_dir) + state.update_on_marker(new_line, flags, path) + continue + + state.add_line(line, line_range, target_abs, working_dir) + + return format_output_sections(state.sections, target_file, + start_line, end_line) + + +def main(): + """Main entry point for the script.""" + desc =3D 'Expand macros in a section of a file using compile_commands.= json' + parser =3D argparse.ArgumentParser(description=3Ddesc) + parser.add_argument('file', help=3D'Source file to expand macros in') + parser.add_argument('--range', help=3D'Line range (e.g. 100-120)') + + ctx_help =3D ('Context file (.c) to get compilation flags from ' + '(useful for headers)') + parser.add_argument('--context', help=3Dctx_help) + parser.add_argument('--compile-commands', default=3D'compile_commands.= json', + help=3D'Path to compile_commands.json') + parser.add_argument('--show-command', action=3D'store_true', + help=3D'Print the modified compile command and exi= t') + + args =3D parser.parse_args() + + if not os.path.exists(args.compile_commands): + print(f"Error: {args.compile_commands} not found.", file=3Dsys.std= err) + sys.exit(1) + + with open(args.compile_commands, encoding=3D"utf-8") as f: + compile_commands =3D json.load(f) + + query_file =3D args.context if args.context else args.file + entry =3D find_compile_command(query_file, compile_commands) + + if not entry: + print(f"Error: Could not find compile command for {query_file}", + file=3Dsys.stderr) + sys.exit(1) + + cmdline =3D process_command(entry) + if not cmdline: + print(f"Error: Failed to process command for {query_file}", + file=3Dsys.stderr) + sys.exit(1) + + if args.show_command: + print(shlex.join(cmdline)) + sys.exit(0) + + working_dir =3D entry.get('directory', '.') + result =3D subprocess.run(cmdline, stdout=3Dsubprocess.PIPE, + stderr=3Dsubprocess.PIPE, cwd=3Dworking_dir, + universal_newlines=3DTrue, check=3DFalse) + + if result.returncode !=3D 0: + print(f"Preprocessor failed:\n{result.stderr}", file=3Dsys.stderr) + sys.exit(result.returncode) + + content =3D result.stdout + if args.range: + try: + start, end =3D map(int, args.range.split('-')) + content =3D extract_range(content, args.file, start, end, + working_dir) + except ValueError: + print(f"Error: Invalid range format {args.range}. Use start-en= d.", + file=3Dsys.stderr) + sys.exit(1) + + print(content) + + +if __name__ =3D=3D "__main__": + main() --=20 2.47.3 From nobody Sat May 30 17:44:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780049792; cv=none; d=zohomail.com; s=zohoarc; b=XccWx1bfH4Ow8V6wKs8LYTuPfPWw00N7yfUtT4K7qnKhcfFTgv6L2GuTKoGrRRP4aFFVGutZIKwrKR8XtYP9ZLvGjfzyfuwbuUQxWAIuNjOYvQqg7whF0N8oe1khUY12O4KfzVgmm7pNx3aXkA51cAo8bJ3oDAHy2oiMOV2zDk8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780049792; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=nNYkpGUE28h/oVjSL8IZeaKshlQLE3nGLpzXET3DfcM=; b=BA5V2DksaP73FdBFuulm8L7L+6e16B38urKaMzEvOxooVhT/pEzkyFAiOe4yOM68P8+T12O49tfMnaO0JUv+g7R/MsaEV+SvjRiymA4e3DokelnvixpxrAnhcCZc4oZP8zwViAx9EYVmTRd4U3l0TjHNYSYPNGYDwYb/2atcL/s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780049792023584.4069837689725; Fri, 29 May 2026 03:16:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSuEr-0002zs-9j; Fri, 29 May 2026 06:14:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSuEq-0002yw-3v for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:48 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSuEm-00014g-Iu for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:47 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-43d76dd4ee8so8655410f8f.2 for ; Fri, 29 May 2026 03:14:44 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef34a0374sm2218905f8f.2.2026.05.29.03.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:14:41 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2EB926036E; Fri, 29 May 2026 11:14:38 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780049683; x=1780654483; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nNYkpGUE28h/oVjSL8IZeaKshlQLE3nGLpzXET3DfcM=; b=U3BQ3NfSR82UOKYx4+osrgcOrAUzcj3FYla5UIVIRckqIuL8pc/V2fmFchS/MDEuvE w2tZdANAGkCCEBAueNFsAFhqZNJFuQjAHwzgl/Bx8ZPSzau3rXuA4cwU1oyEqrNfCc28 Rdot4gI+yQmWFcJvsQshfw2+wRsZlxNJdjlGiFquz6CxwxeE86H5mPMqDCZvR5wpwCFf iQe6/aSlWeFGcljU+pCoSI5BVu29YH2Y8N7g9bE1noHB8AKdKnRxKbJFx3ou0xxM6Slh RK3lEVlpEzoJX/c2GUl3jvpsW2F3cex7XFad6lNlay0wX2Azo6byx88rWAcujhkWSPNc FdGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780049683; x=1780654483; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=nNYkpGUE28h/oVjSL8IZeaKshlQLE3nGLpzXET3DfcM=; b=RBdrrvOsel20g2gU+tlnzMJX8vXEeiDFFaW23gGdYThYXlJvhUKP9976jyzYXoGjit EDGWxZsy47JHpik0bduJPPDS5J/b8fidfQ1TWO15CeX3n+u0ouy4/Begt/EAyEnRilRn uYZmSNLsleH7ogpvI1izLXdOiJOrZRkvrubO4kP1OYrIQetFAGoE02UX6YLo+AU+G755 WA9zM8MpVmRoV71Wn9L0P2C44IzDfMVdrDNJ3BBEZQrG/miIlNgno7i2CBOv5odvB/z5 Qk16XOedx8bhZOcPATzApwBUzqR0Rxz3Cy26g6YD1vjFfckTvKKpSPcGGTJ818QJe1rZ sV6Q== X-Gm-Message-State: AOJu0YxMqQpUum/FYcg39x5683FlDSOcGyH8cRobBEgfNTqBd6lciaJu h8mazXSC7gD889yVjgqwD3hVfZ/sOYB6JpY/K+ZbRQ1zfrJ4dw7Ky68/wxmz/7ebgtg= X-Gm-Gg: Acq92OH8hqyujILUaIl2BwCTIuDJXaqk2n6NSpCT1ESrYEqNw0vWO1y5ws4cc2y+bbo 8AQJ/gEB4BmbDFSM16c4J4Tq4IinhMs1D/4LL8fBu4GCD7kmzkCJxpYCdz+QRVqrzi/AeZaXCXO 0gM/VVWjcn8ZaYAXxvWUmKTLbnRTHIiji+fsldo/iW9xbgJXrH5mSAAYgKl5s9VA4yd3TpBatXz WYBdwSa4r4juOHWU5UdWWskrXoN1M/t6lVBAEV39so8iuGX2UPmsr5xqFRpjS6JRv6PNrZR8lOv Jc48d70eqti0gKUYTgaHU2QvOaEpFruKVwZ0XwYsdqQ0LBS/iQmxmArDhddMiIv6BVSAgiQCLSI 10qJ8yfYKdG6U/hUQ2j6WGM2yoCSPNSOvZHJmXfknRRSCpW01DWyaoturNydmH7z0syzHJJIdSU FoekWVfnDCc/yolVf94whMBLlrWNh39j987lMXHqYGhDUH X-Received: by 2002:a05:6000:4690:b0:446:db72:e8ec with SMTP id ffacd0b85a97d-45ef144a66amr2682312f8f.23.1780049682675; Fri, 29 May 2026 03:14:42 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , John Snow Subject: [PATCH v4 05/12] .agents/skills: add qemu-code-explorer skill (caveman) Date: Fri, 29 May 2026 11:14:30 +0100 Message-ID: <20260529101437.410181-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529101437.410181-1-alex.bennee@linaro.org> References: <20260529101437.410181-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780049793910158500 This provides a skill detailing how to deal with some of QEMU's more idiosyncratic coding conventions. Originally I had given instructions on using tags and git grep but once I'd installed the semcode MCP (https://github.com/facebookexperimental/semcode) it was able to handle most code navigation pretty efficiently. So now this skill just focuses on the things that are tricky for indexers to handle, namely generated code and fancy macros. Signed-off-by: Alex Benn=C3=A9e --- caveman - caveman reduction v3 - rewrote with a focus on generated code and macros for when code search MCPs run into trouble. v2 - remove personal gtag skill references, add global stanzas directly - moved macro information from AGENTS.md into code explorer - more imperative language to trigger its use - add section on using scripts/expand_macro.py - remove eca reference from evals.json (maybe we should just drop this) --- .agents/skills/qemu-code-explorer/SKILL.md | 84 +++++++++++++++++++ .../qemu-code-explorer/evals/evals.json | 26 ++++++ AGENTS.md | 1 + 3 files changed, 111 insertions(+) create mode 100644 .agents/skills/qemu-code-explorer/SKILL.md create mode 100644 .agents/skills/qemu-code-explorer/evals/evals.json diff --git a/.agents/skills/qemu-code-explorer/SKILL.md b/.agents/skills/qe= mu-code-explorer/SKILL.md new file mode 100644 index 00000000000..fa8df2b0f94 --- /dev/null +++ b/.agents/skills/qemu-code-explorer/SKILL.md @@ -0,0 +1,84 @@ +--- +name: qemu-code-explorer +description: Advanced QEMU code search (generated code, complex macros, QO= M) when standard search fails. Fallback for build artifacts and hidden symb= ols. +license: GPL-2.0-or-later +--- + +# QEMU Advanced Code Explorer + +If standard search fails, symbol is likely generated at build time or hidd= en by macros. Use these strategies. + +## 1. Search Generated Code +Generated files exist in build dir, not source tree. + +### QAPI (QEMU Interface) +- **Source**: `qapi/*.json` +- **Generated**: `build/qapi/` (headers, C files) +- **Patterns**: + - `qmp_marshal_...`: Command marshallers. + - `qapi_free_...`: Type cleanup functions. + - `visit_type_...`: Visitor functions. +- **Action**: Search `build/` text. + +### Tracing +- **Source**: `trace-events` files. +- **Generated**: `build/trace/` (e.g., `trace/trace-hw_block.h`) +- **Patterns**: `trace_...` functions. +- **Action**: Search build dir/generated headers. + +### Decodetree (Instruction Decoding) +- **Source**: `target/.../*.decode` +- **Generated**: Included as `.c.inc` in build tree. +- **Patterns**: `trans_...` handwritten, decoder calling them generated. + +### Configuration +- `build/config-host.h`: Global host config. +- `build/config-target.h`: Target-specific config (e.g., `TARGET_X86_64`). + +## 2. Expand Complex Macros +QEMU uses deep macro nesting (TCG, softfloat). + +### `scripts/expand-macro.py` +Get C code after preprocessing for specific line range. + +- **Usage**: + ```bash + python3 ./scripts/expand-macro.py FILE --context CONTEXT_FILE --range ST= ART_LINE-END_LINE + ``` +- **Example** (TCG helpers, softfloat): + ```bash + python3 ./scripts/expand-macro.py fpu/softfloat-parts.c.inc --context fp= u/softfloat.c --range 191-264 + ``` + +## 3. QEMU Symbol Patterns +Hidden by boilerplate-reducing macros. + +### QOM (QEMU Object Model) +`OBJECT_DECLARE_SIMPLE_TYPE` or `OBJECT_DECLARE_TYPE` expand to multiple f= unctions/casts. +- `MY_DEVICE(obj)` likely defined via `OBJECT_DECLARE_TYPE(...)`. +- Search type name string (e.g., `"my-device"`) to find `TypeInfo` structu= re. + +### TCG Helpers +- **Pattern**: `HELPER(foo)` +- Defined in `helper.h`, implemented as `helper_foo`. +- Search `HELPER(foo)` pattern if `helper_foo` not found. + +### Error Handling +- `ERRP_GUARD()`: Starts functions for `error_propagate`. +- `error_setg(errp, ...)`: Reports errors. + +## Decision Matrix + +| Scenario | Strategy | +|------|--------| +| Standard function/struct | Use standard search tools. | +| Symbol not found in source | Search `build/` for generated code. | +| Macro expansion opaque | Use `scripts/expand-macro.py`. | +| QOM cast macro (`TYPE_...`) | Search `TypeInfo` or `OBJECT_DECLARE_...` = usage. | +| TCG helper missing | Search `HELPER(name)`. | +| Instruction decoding | Search `.decode` and `trans_...` functions. | + +## Workflow Tips +1. **Find Build Dir**: Check `build/` or other build subdirs. +2. **Combine Tools**: Try standard search first, then search build dir. +3. **Check Context**: For `.c.inc` files, find the parent `.c` file that i= ncludes it. diff --git a/.agents/skills/qemu-code-explorer/evals/evals.json b/.agents/s= kills/qemu-code-explorer/evals/evals.json new file mode 100644 index 00000000000..8eaa45b28b3 --- /dev/null +++ b/.agents/skills/qemu-code-explorer/evals/evals.json @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +{ + "skill_name": "qemu-code-explorer", + "evals": [ + { + "id": 0, + "prompt": "Where is the function 'qemu_mutex_lock' defined and where= is it used in the block layer (block/)?", + "expected_output": "The definition should be found (likely in util/q= emu-thread-posix.c or similar) and usages in block/ should be listed using = gtags." + }, + { + "id": 1, + "prompt": "I'm seeing a reference to 'qmp_marshal_query_status' in s= ome docs but I can't find it in the source tree. Can you find where it is d= efined?", + "expected_output": "The agent should identify this as QAPI generated= code and look in the build directory (e.g., build/qapi/qapi-commands-contr= ol.c)." + }, + { + "id": 2, + "prompt": "Find all implementations of trace points for 'virtio_net'= in the generated code.", + "expected_output": "The agent should search for 'trace_virtio_net_*'= in the build directory, specifically in generated trace headers/sources." + }, + { + "id": 3, + "prompt": "Find all occurrences of the string 'Could not open' in th= e 'hw/' directory.", + "expected_output": "The agent should use git grep scoped to hw/ to f= ind the string literals." + } + ] +} diff --git a/AGENTS.md b/AGENTS.md index 8ceffde4ebb..c751652babf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -46,6 +46,7 @@ If unsure read the linked `security.rst` document for fur= ther guidance. =20 ## Agent Skills (see `.agents/skills`) You should use the following specialized skills for common tasks: +- `qemu-code-explorer`: For finding where things are defined, how they're = used, or understanding a specific subsystem. =20 ## Source Code Layout (see `docs/devel/codebase.rst`) - **`accel/`**: Hardware accelerators (KVM, TCG, HVF, Xen, etc.) and archi= tecture-agnostic acceleration code. --=20 2.47.3 From nobody Sat May 30 17:44:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780049766; cv=none; d=zohomail.com; s=zohoarc; b=g3aIcoKvgoZVhH4n3JYVTQ9Z1aHdCxYjR2dL97oGG03MmN+UPyCzb3JMc7Ccq+0ynbz4t0gOtSGojm6ZUdpTtX9OP7Jyh80z2xVAJoiDjZUfgmj0ufVeGCA+V+eLTdFaSrXqe4cp2nWcNiUdF0RJMHUHKNzbFMSwR4WlcjU+mAc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780049766; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=dJbmDwD7QY2sbhCAix0thNW2SHXGqsh5Qn1ZgDCmTzU=; b=KVaA6elkGfEhNXxopJFxjLf4gZywdpxoqgPs76A7pv/BUOgvW1OZNID+0BRaBf+MxOvYF++LrYKxHLuI9z7OEFuOlKeZPU5ppKhdnWmqWR5BdP56SlfuorFw1DDsTofxcuKRjWy0/JzGPnVLP2gDM91ysu8oYUwLH27SDp67RxI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 178004976672116.67482649779174; Fri, 29 May 2026 03:16:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSuEs-00030a-Qe; Fri, 29 May 2026 06:14:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSuEq-0002zc-JV for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:48 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSuEo-000157-1H for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:48 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4891c0620bcso88685685e9.1 for ; Fri, 29 May 2026 03:14:45 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909c0ad269sm11787915e9.11.2026.05.29.03.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:14:41 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 470EB604BD; Fri, 29 May 2026 11:14:38 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780049684; x=1780654484; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dJbmDwD7QY2sbhCAix0thNW2SHXGqsh5Qn1ZgDCmTzU=; b=WfyRO/CUxhQ7t5sIHwm9y7WqF15+noqfljLyeZPNXwi2dpd2Ql/Amsnn+0EftdUEt/ s+rGUEb6aCAN56i/SYPomgZiifZQBBCyTzlb9F1NfYT2fckibTrCC6JsnzlE0ofoybgw PDotpBjl31+Y4SQac8JYG3KjpAip7ltkhWUHtp9iJLTQzAK2oVjghia6zFTah1/oZc4J sSWIvn0Z4vtjgi9+z1z+8RvtJ0kR2hnr+QfXy1cJQ5GvITdz5sPG91arB2uTPA10Zv6c kjN1+2p2PvpAjMOtGAhkwBbXHeDq88tuHLYpHxxAGloleLvR4AjpN8YRc69XLOnuaWo6 n+Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780049684; x=1780654484; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dJbmDwD7QY2sbhCAix0thNW2SHXGqsh5Qn1ZgDCmTzU=; b=rizHyWi8Q4+4I1EHsqHgR4RC3+9ScnHAvFkSe6V3liepWEdlbcgq/HYdOFIBNf9yMd Nm01smQpDB20b6c7u688kXKGa4s2uceTeIvT6flmrjqaw0Cq7k8wKqwlmwrMM8NoyfTu Xg3IlotC6yhl5hf4njFT9W5n29OSAtfSOV9vgseq+z4HibV0/Bqyf/yKrOFKPtYE64bC xa0utgn6DUEg1+qfgSlUSvdud9jZ9qWPxyxHOqbGSVfkWVadGLhoSFOPs50V4pFfPQr2 cXX0fAw3hFBqF27EIn7qS+YnO/ZRhdlSMzuYazfkzvJSVTS3bSjc/HPFljN8iRVai6TT TkGA== X-Gm-Message-State: AOJu0YyFJ9oDxIcEw0NIC0qejcw8CBS+sfvddkzKgED6G0JdTMa4l4o5 NQ7vw2vU0BEDQe30cBIDofNR8moSg0ztgQCG+zKyyG7rzLrYFEuUFgwhrshHMRiiZek= X-Gm-Gg: Acq92OE3yFoBA5z9dW4fyJtlO4dniLVi3eGg6z0SiO/U91s5ZfmQ4JUD0SVsnA7ldOk 1Htd1PkkCVrxrgLQyC99urUZ+5Ig4rj5uEtnytOiAPv71bzee7rZe/8A5sSelmlBABzNQE3OfUk OQqzQN9SGk0qmCdOX4Enm9IEj0TZDrCjRy30wC+Yh97U2Lf1Kq38uJfy06zoq0nGHS1HTfDnDRc J+HoYoNNBlvYGbU/uGGWwyLBfz5atMJm5fwlfObdo1pbgGlj0qODE3bFpsXOOSUzuZhbCLpMWT9 doo7GaL4qmaSzr5Wnh11PwamUS13hVLuDv7TEbDEzdt4hsp6Az38i3bg8GNPWzjSejn2cJGGztB /Bmlgg69xGpmwH7SKDAQ5OBkQpo+I7P4iJm0TMivMgg6Sx0//Rn2elLPJm+EcjdFD/xgr06OTfg h1SnAfHRAwaYvN95lu5l+P5BGCUqdGWaSYiQ== X-Received: by 2002:a05:600c:3212:b0:48e:5d91:cfe3 with SMTP id 5b1f17b1804b1-4909c078fd4mr25092935e9.1.1780049684008; Fri, 29 May 2026 03:14:44 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , John Snow , Chao Liu Subject: [PATCH v4 06/12] .agents/skills: add qemu-build skill (caveman) Date: Fri, 29 May 2026 11:14:31 +0100 Message-ID: <20260529101437.410181-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529101437.410181-1-alex.bennee@linaro.org> References: <20260529101437.410181-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780049768009158500 This provides basic instructions for building QEMU. Tested-by: Chao Liu Signed-off-by: Alex Benn=C3=A9e --- caveman - cavemanned v3 - add builds to gitignore v2 - drop ECA/qemu-helper-agent sub-agent language - mention configure --help - drop mention of full paths - not needed for compilation - moved earlier is series so code-reviewer can refer to it --- .agents/skills/qemu-build/SKILL.md | 49 ++++++++++++++++++++++++++++++ .gitignore | 1 + AGENTS.md | 1 + 3 files changed, 51 insertions(+) create mode 100644 .agents/skills/qemu-build/SKILL.md diff --git a/.agents/skills/qemu-build/SKILL.md b/.agents/skills/qemu-build= /SKILL.md new file mode 100644 index 00000000000..a19010d70c2 --- /dev/null +++ b/.agents/skills/qemu-build/SKILL.md @@ -0,0 +1,49 @@ +--- +name: qemu-build +description: Step-by-step configure and build QEMU. Trigger when user asks= build QEMU or debug build failures. Includes build dir reuse and spawning = sub-agents. +license: GPL-2.0-or-later +--- + +# Instructions + +## Check and Reuse Build Dirs +Check if existing build dir reusable before new one. QEMU uses out-of-tree= builds (often `build` or `builds/`). + +1. **Check configs**: Read `config.log` in existing build dir. Run `head -= n 2 builds//config.log` to get full configure command. +2. **Reuse and Reconfigure**: Reuse general-purpose dirs (like `builds/deb= ug`). Reconfigure same flags with new `--target-list` if needed: + ```bash + cd builds/debug + ../../configure --target-list=3D + ``` + +## Launch Builds via Sub-Agent +**CRITICAL**: NEVER build in main agent context. ALWAYS spawn sub-agent. +Pass exact build commands and directory in sub-agent `task` argument. Inst= ruct sub-agent what to verify and report. +Example: `task: "Go to builds/debug, run ninja. If fail, report exact comp= iler errors."` + +## Configure New Build +If no good dir exists, make new. + +1. **Make dir**: `mkdir -p builds/test-target; cd builds/test-target` +2. **Configure**: `../../configure --target-list=3D[targets]` + - Targets: `x86_64-softmmu`, `aarch64-softmmu`, `riscv64-softmmu`, `x86= _64-linux-user`. +3. **Common flags**: + - `--enable-debug-info`: Symbols. + - `--enable-debug`: Assertions. +4. **Sanitizers**: + - `--enable-asan`: Address Sanitizer. + - `--enable-tsan`: Thread Sanitizer. + - `--enable-ubsan`: Undefined Behavior Sanitizer. +5. **Help**: + - `--help`: All options. + +## Build +**Important**: Re-build after modifying source code. + +## Report Results +**CRITICAL**: Provide concise build summary to user. +1. **Summary**: Success or failure. +2. **Failures**: Include exact compiler/linker error log excerpt if fail. + +## Debug +- **Verbose**: `V=3D1` for full output. diff --git a/.gitignore b/.gitignore index 4ccba871d16..83bdf3df59c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ /GNUmakefile /build/ +/builds/ /.cache/ /.vscode/ *.pyc diff --git a/AGENTS.md b/AGENTS.md index c751652babf..207a0075ed8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -47,6 +47,7 @@ If unsure read the linked `security.rst` document for fur= ther guidance. ## Agent Skills (see `.agents/skills`) You should use the following specialized skills for common tasks: - `qemu-code-explorer`: For finding where things are defined, how they're = used, or understanding a specific subsystem. +- `qemu-build`: For configuring and building QEMU (including debug and san= itizer builds). =20 ## Source Code Layout (see `docs/devel/codebase.rst`) - **`accel/`**: Hardware accelerators (KVM, TCG, HVF, Xen, etc.) and archi= tecture-agnostic acceleration code. --=20 2.47.3 From nobody Sat May 30 17:44:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780049796; cv=none; d=zohomail.com; s=zohoarc; b=AiCGz9JKEHthVktLamdheUSTfq7Jj7JUTOWKGriYhPqVBav72Fh52ut8heuFXn42P0/DU2U3AOSKEm/X/Q8L1xWNThsNftejcImNh6/de219s2ZRKQ4K38/jLQZrlz6FEC/4Dz03HvrUunPutSYZeSjjHaw6iDLgwOaUjc/Gn6I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780049796; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=j8iZH5wMMYl2YpYU56gG8hyoUx+zCH4S+K5TbYl9f6s=; b=mBojNLlxbIqgVPbF09EP20bTZL/5QKzD0GU+EzZo3pgw5lZMY8UTTwV1PZ7VQhc/mAEDy6WKEfzivjMIXbTp69i9Ciug1sve8GRjHZokG5fX3eUW3SEACqaJt/0EY6iVYnJf4dKx3gMLPUmYlr/lMx6+ILsQ64RLfKfSrDPjmTE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17800497963681015.1130761967735; Fri, 29 May 2026 03:16:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSuEv-00032S-SF; Fri, 29 May 2026 06:14:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSuEu-00031I-20 for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:52 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSuEs-00018k-2s for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:51 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4896c22fcbaso118764135e9.0 for ; Fri, 29 May 2026 03:14:49 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909c0f74fasm15172015e9.4.2026.05.29.03.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:14:45 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 609EB60E17; Fri, 29 May 2026 11:14:38 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780049688; x=1780654488; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=j8iZH5wMMYl2YpYU56gG8hyoUx+zCH4S+K5TbYl9f6s=; b=J6WlDwlfcsfEs9+EjmU8fl5njNZiOCTehWtJBwUGBWndqTvTI5COTi+BKQ65Ckd/1G gJfI+zP+sKsv4wYLXAnxRbt6MkUxvi/X7MZElXuGqctfNVRVeSolnvqtj2cxXEgsnawX CXe7/lXBqgDTtE88vZdqEhWAMYWAWcMxvMYprO8ZpPH+435757avXwFEt+tXwR5e//c9 YupNjLijaGoCfwDG4vvfwAnu5HbXrXPvtEUwBRlgNGgA4NpznFJakX4kV7m0LmGGLoHp ayUSj61KQnkGs0yN8SORodZ4vwtlsUGZDfOUm0hRbHtx9VIS8fJsGcxiCmRBi67E/nWv 3K1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780049688; x=1780654488; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=j8iZH5wMMYl2YpYU56gG8hyoUx+zCH4S+K5TbYl9f6s=; b=HUQWqo/NbMZiiMziIFHc49I+5XoM5dmRaQndJY/AYT9z03DMuA1uTv/dbV94TAHySi rQXueyDcgLGVRyS9YhKwfsT+ofnhdGVTljpfyHPtyG0WHko4c0A3GC5ZSltyaxcYf++E O6jDrERaZnzqfSUDEle2yQkTzugQhwPu+sUYxseBIj0Un+Y5zWB0vR2opKWvt1S9/AuR T0TrnB8KEVMxDq176AskO6Lxj3EjKChQ/NO0soiJtrwlK5dBPJDcIVkQbxn8rsdHf6ry oRmhVoUSuqKhg2MPrzg8+znVeVL1N61uTBSU30PtsHNOEvtbWcDhbMYDBairu9w8w2oc EviQ== X-Gm-Message-State: AOJu0Yyl3KepLkCcG42K+1bMV/WrWO452mFz3T7cK7foI3mV1tcreS8c VZ+29SdWQ7gu6xyXvdR5KK8KlspZhT0UcUr+Ysk7zb7vKSYIRwUDg+RyQGIqtwLyiCA= X-Gm-Gg: Acq92OGQX1UJaJgCfDn35oFHk8mBGJGzsmt4hlJWIs2DlFLonOkDnTJcOzBJsSPLN8o kOS9hBunM8/FGE4yEUN1dU1S6PZSKv6JhEGkgBOPqGsKhuLJJRuu2AS5Pe8N0kM/hrLUB4QnmX2 y5k2R6rzQYOnPlFxTVzta5q9fzNXbtvgeIfc73W/Tgl4YCu9PsFsq/d5UypFeP/GCkQ/bm2Vhiy H3h41UIui1PHI/oY9/IXJtOJXtzuWYl3zjiNCwRyAHd3Sasc4fdO2Lyg1KQLQA4fIaV9SmBb2Hk yHs5AdTXcUHdk3lCf0Tm7JIutAq/Jab4ZOhCQANAVp61NrYHPLBUkG3kE/OVrs7zw/li1zIIkzh niZpnwxGUYvGsTQQ479aW9XMPNtDuiCyye0DKWltTjTe8p8jW+MNe8Y3AATV0n9jJv8TSubSUGO tzc3Dw/pJDw+aVSWb4h7zks3aKQMRzbb+moQ== X-Received: by 2002:a05:600c:5844:b0:490:7227:100 with SMTP id 5b1f17b1804b1-4909c0ba8a6mr26684995e9.18.1780049688354; Fri, 29 May 2026 03:14:48 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , John Snow Subject: [PATCH v4 07/12] .agents/skills: add qemu-testing skill (caveman) Date: Fri, 29 May 2026 11:14:32 +0100 Message-ID: <20260529101437.410181-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529101437.410181-1-alex.bennee@linaro.org> References: <20260529101437.410181-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780049797858154100 This provides basic instructions for running tests but doesn't try to exhaustively describe the whole setup. Signed-off-by: Alex Benn=C3=A9e --- v2 - add link to testing docs. --- .agents/skills/qemu-testing/SKILL.md | 70 ++++++++++++++++++++++++++++ AGENTS.md | 1 + 2 files changed, 71 insertions(+) create mode 100644 .agents/skills/qemu-testing/SKILL.md diff --git a/.agents/skills/qemu-testing/SKILL.md b/.agents/skills/qemu-tes= ting/SKILL.md new file mode 100644 index 00000000000..770aa7a457e --- /dev/null +++ b/.agents/skills/qemu-testing/SKILL.md @@ -0,0 +1,70 @@ +--- +name: qemu-testing +description: Find, list, and run QEMU tests (Unit, QTest, Functional, TCG)= . Trigger when user asks about tests, lists available tests, or runs tests = in build dir. Includes sub-agent spawning. +license: GPL-2.0-or-later +--- + +# Instructions +Need recent QEMU build before testing. See `qemu-build` skill. +Official testing docs: `docs/devel/testing/` (specifically `main.rst`). + +## Test Suite Classification Guide + +Avoid running invalid/incompatible tests. Know the suites: + +### 1. QTest (`make check-qtest` or `meson test --suite qtest`) +- **Scope**: **System Emulation Only** (needs `qemu-system-*` binary). +- **Nature**: Exercises virtual devices, registers, buses, boards. Host-si= de test communicating with guest over custom protocol. No real guest OS/BIO= S booted. +- **When to run**: Modifying virtual devices (`hw/`), PCI/USB/ISA buses, i= nterrupt controllers (`intc/`), machine/board definitions. + +### 2. Functional Tests (`make check-functional` or run specific `test_*.p= y`) +- **Scope**: **System Emulation Only** (needs system binary). +- **Nature**: Python system integration tests. Boots real guest kernels, t= ests OS images, migration, end-to-end setups. +- **When to run**: Validating board features, system-level CPU features, f= ull machine boot. + +### 3. TCG Tests (`make check-tcg`) +- **Scope**: **Mostly User Mode** (needs guest user-space translation, e.g= ., `qemu-aarch64`), some system tests. +- **Nature**: Compiles/runs real guest programs (e.g., SVE vector math, fl= oat tests) inside emulated CPU. Verifies translation, GDB stub, plugins. +- **When to run**: Modifying CPU ISA translation (`target/`), emulation he= lpers (`target/*/tcg/`), software float (`fpu/`), TCG JIT compiler (`tcg/`). + +### 4. Unit Tests (`make check-unit` or `meson test --suite unit`) +- **Scope**: **Independent/Global** (architecture/target agnostic). +- **Nature**: Standalone C unit tests for core parts (glib, QDict/QList, c= rypto, standalone float math). +- **When to run**: Modifying core utilities (`util/`), data formats (`qobj= ect/`), crypto (`crypto/`), or floating-point math (`fpu/`). + +## Launch Tests via Sub-Agent +**CRITICAL**: NEVER run tests in main agent context. ALWAYS spawn sub-agen= t. +Pass build/test commands and build directory in sub-agent `task` argument.= Direct sub-agent what to verify and report. +Example: `task: "Go to builds/debug, run meson tests touching replay, repo= rt results."` or `task: "Run make check-tcg in builds/arm, summarize fails.= "` + +### Meson from Build Directory +Use build `pyenv` for correct meson version: +- **Example**: `./pyvenv/bin/meson test --suite thorough --list` (lists th= orough suite tests). + +## Run Individual Tests + +### Meson Test Runner (Unit, QTest, Functional, softfloat) +Run single test from within pyenv in build dir: +`./pyvenv/bin/meson test [testname]` +Example: `./pyvenv/bin/meson test qtest-x86_64/boot-serial-test` + +### TCG Tests +Run single test for specific target: +1. Go to target test build dir: `cd tests/tcg/aarch64-softmmu` +2. Run test: `make run-[testname]` + Example: `make run-memory-sve` +3. Check all tests: `make help` in that dir. + +### Functional Tests +Run individual tests from source dir: +- **Example**: `./builds/all/run tests/functional/aarch64/test_virt_vbsa.p= y` + +### Env Variables +- `V=3D1`: Verbose test output. +- `SPEED=3Dslow`: Run slow tests normally skipped. + +## Report Results +**CRITICAL**: Summarize results to caller. +1. **Summary**: Success or failure. +2. **Failures**: Excerpt exact logs (compiler errors, test fails). +3. **Full Paths**: Provide **absolute file paths** to logs/results for ins= pection. diff --git a/AGENTS.md b/AGENTS.md index 207a0075ed8..0bbed8e5adb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -48,6 +48,7 @@ If unsure read the linked `security.rst` document for fur= ther guidance. You should use the following specialized skills for common tasks: - `qemu-code-explorer`: For finding where things are defined, how they're = used, or understanding a specific subsystem. - `qemu-build`: For configuring and building QEMU (including debug and san= itizer builds). +- `qemu-testing`: For finding, listing, and running individual tests (Unit= , QTest, Functional, TCG). =20 ## Source Code Layout (see `docs/devel/codebase.rst`) - **`accel/`**: Hardware accelerators (KVM, TCG, HVF, Xen, etc.) and archi= tecture-agnostic acceleration code. --=20 2.47.3 From nobody Sat May 30 17:44:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780049809; cv=none; d=zohomail.com; s=zohoarc; b=jLH7ENtkrMPl7SNzpF1+AP2EIqRxeAkGgoLgUkqWFejga4XdCzbaH1Dm8xdjr8ifJNfDA8F4vfMAsVJlwUUXJN8m6mCjmL7+k1tXa01qp40RTPAneS5xyVbSzE1JU5V/Y+ElA/oQA8IeJyuecJ34N1jHzJYGjaaSOYQPFv/ZleI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780049809; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=igO2dMJx6H27AdxL4kiaNIOERV5w0/K2gQO7LMq6ZgU=; b=SySnwh+YKLNDTpYXpd8Pfwa/F0Q7sDkxxJZvQI3QBjgTDsc2ZIC6hif5nZTdZgEWlr/Icq/9Pz+3mY/Vh1ENeeglY6+zJpzARfvMs4bVAOLxZeNXftarx/isEYLMNMW05XRbjXt6Ln2/HRa/iV8WnZ6/sQVaBK8qqnzcdpixK9U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780049809407781.273077446919; Fri, 29 May 2026 03:16:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSuEu-00031q-Rf; Fri, 29 May 2026 06:14:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSuEr-00030F-Qs for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:49 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSuEo-00016s-VL for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:49 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-45ed18d8a1bso2635887f8f.0 for ; Fri, 29 May 2026 03:14:46 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef354cf0dsm2485269f8f.17.2026.05.29.03.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:14:41 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 78DDA60E34; Fri, 29 May 2026 11:14:38 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780049685; x=1780654485; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=igO2dMJx6H27AdxL4kiaNIOERV5w0/K2gQO7LMq6ZgU=; b=H1ezXYpbRtr0P/FEjepiV/xEvoovd6GDv2RKQ+0GdY3svBV30vHvTcZtb8oeII7O2I oMJV/i0ZaFJfCKnRgFroei6kaZu6zKJeCZm4kHpvwDHCMPZSp7NLqXm5do4Mr+rkkifN 4FUCAjjul+z5KVXeKy/Yc5RKG8+kt6s7U6lccd5JUqojyqPpVZQB3xyKL/rgju6sUO9S 6n10C77sXt6fyRE6T1cb+o9NzeCYpO6+v4pKaZhxSA+YjPuy7deItW58deL96M/s7K2r Igf8JuETFIiCwKlayYQSCfOb0nL3bhGxt91yy5Av8CtmhXWr8vz+oM1JR72U0eRvO45V yFFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780049685; x=1780654485; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=igO2dMJx6H27AdxL4kiaNIOERV5w0/K2gQO7LMq6ZgU=; b=VuVjIFTDw7uLTjfkJHwiBbkLyROXl16Lb14WTrASoVTwj0wnVYC/5xgFQUFvvg7e/x XXwybfdR6rw/d4/jVqArg9+OzK9XE315SyZ3f/zvSL4zh+sncZ2Iy71Jr2ASnlMuBwk0 IYCfp5139YLMU3+xzXhRJa3Fsc30T5ueCU67kl6yjPxQGu/Q06plRPMoG7GXr2V2CrbZ IDpraqUnvLOaEc9/+dW5Xclk0Ez+Ech924ac+xfOIzw/4UBBdMqZb6uI++dMrO3ybfCo VO7eULUE2inRfjX51Jtlvf4q7nUPzUF9eKtpMR7TLbaeaWr0hjtwkaflDJ9H6/Avht47 xOYw== X-Gm-Message-State: AOJu0Yx1V/3ULHPJdG6YRAA8C/rdf3f1xFY9dzPNyvjPwnr/mb4dWmJn lFFvA6t/epi6V7Hcs4rZu1PZfxtjiZzYuSjaEERSXNbYkpwPWHDLgsxDob0WKnmkZOkeK6TNwin NMFck X-Gm-Gg: Acq92OEkvppnS/QyHKNZUbiTG01igHKUviimNNrN0Nz/29PhSKHsn1DnHbLLZll9jew 9omOKL8KzEnXuQQGe7oEPO+l4E4fkfG3DrDX5AgyKndIYjUfU2jcebUGerem2L7t0V/AKyc472i mr3tF7iS9B8itAw/MJMs5LWMbcOjQqkwdErYuuPutmdjyTTSjOcmvvWYsFnjLom52rMi9pypJxI X1xuUdXoQsBW9tvL2iuTGU1GsTaMCM3CrTwAU3udHYRaGlxg3/XgsDFmzGh6PNPgO04viQ+oWgt sZVibcQ0UEW516fxYlmEBDRxoCfCj+WFs7IqRwVp8MtNFS8cWnfw2s0NYVypP/JLJZP/IoMjGgm zyJNeGPHg2e2s1xGK/v0fsquqv5CZTwOq5cxezSJkJroeqfPlJ3LOGx9qMZo9Z+ApKby9BYdkpD kxvjsguuuMFW2aOc9a8DY7CxaFo45QfnaNLA== X-Received: by 2002:a05:6000:491d:b0:448:7049:a6c9 with SMTP id ffacd0b85a97d-45ef14197f7mr4083914f8f.5.1780049685359; Fri, 29 May 2026 03:14:45 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , John Snow Subject: [PATCH v4 08/12] .agents/skills: add qemu-code-reviewer skill (caveman) Date: Fri, 29 May 2026 11:14:33 +0100 Message-ID: <20260529101437.410181-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529101437.410181-1-alex.bennee@linaro.org> References: <20260529101437.410181-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780049810065158500 This provides basic instructions for how to download and apply a patch series from the mailing list. Currently it is only taught about checkpatch but we could consider adding common code smells and review comments that come up frequently. Signed-off-by: Alex Benn=C3=A9e --- v3 - add section on dependencies v2 - merge checkpatch skill - moved later in series to leverage build and test skills - properly reference qemu-build and qemu-tester skills - mention the qemu-code-explorer skill for navigation --- .agents/skills/qemu-code-reviewer/SKILL.md | 98 ++++++++++++++++++++++ AGENTS.md | 1 + 2 files changed, 99 insertions(+) create mode 100644 .agents/skills/qemu-code-reviewer/SKILL.md diff --git a/.agents/skills/qemu-code-reviewer/SKILL.md b/.agents/skills/qe= mu-code-reviewer/SKILL.md new file mode 100644 index 00000000000..8cda259408e --- /dev/null +++ b/.agents/skills/qemu-code-reviewer/SKILL.md @@ -0,0 +1,98 @@ +--- +name: qemu-code-reviewer +description: Pull and apply patch series from mailing lists for review and= testing in QEMU, including style and build validation. +license: GPL-2.0-or-later +--- + +# QEMU Code Reviewer Skill + +Get patch series from QEMU mailing list (`qemu-devel@nongnu.org`) using `b= 4` or manual mbox. + +## Pre-Application & Dependency Validation (CRITICAL) + +Check prerequisites/dependencies before applying patches to avoid build fa= ils or merge conflicts: + +1. **Get Cover Letter First**: + - `b4 am ` auto-generates `.cover` file or prints it. + - Or fetch raw cover letter email (suffix `-0-` or `-00-`) from lore.ke= rnel.org. +2. **Scan for "Based-on" / Prerequisite Headers**: + - Parse cover letter for `Based-on: `, `Prerequisites:`, or= "depends on" text. +3. **Handle Dependencies**: + - If dependency commits missing from branch, fetch and apply prerequisi= te series first. + - **CRITICAL**: Ask user permission (using `eca__ask_user`) before chan= ging branches or resetting git tree. + +## Use b4 (Recommended) + +`b4` is best tool for public-inbox (`lore.kernel.org`). + +### 1. Fetch series +Download series for `git am`: +```bash +b4 am +``` +Saves as `.mbx` file. + +### 2. Apply series directly +Apply to current branch: +```bash +b4 shazam +``` + +### 3. Apply with trust +```bash +b4 am -t +git am ./*.mbx +``` + +## Manual mbox Retrieval (Alternative) + +If `b4` missing, get mbox from lore.kernel.org. + +### 1. Find thread +Go to [lore.kernel.org/qemu-devel/](https://lore.kernel.org/qemu-devel/). + +### 2. Download mbox +```bash +curl -L "https://lore.kernel.org/qemu-devel//raw" -o series.mb= ox +``` + +### 3. Apply +```bash +git am series.mbox +``` + +## Post-Application Validation + +### 1. Style Check +Run QEMU checkpatch script. + +- **Applied patches**: + ```bash + ./scripts/checkpatch.pl master..HEAD + ``` +- **Specific commit**: + ```bash + ./scripts/checkpatch.pl ^.. + ``` +- **Specific file**: + ```bash + ./scripts/checkpatch.pl -f + ``` +- **Strict mode**: + ```bash + ./scripts/checkpatch.pl --strict + ``` + +### 2. Build and Test +See `qemu-build` and `qemu-testing` skills. +- Use clean build dir. +- Run `ninja` or `make` via sub-agent. +- Run tests (`make check-qtest`). + +### 3. Review Code +See `qemu-code-explorer` to trace functions. + +## Troubleshooting + +- **Apply fails**: Try `git am --3way` or resolve conflicts manually. +- **Missing deps**: Update base branch to latest `master`. diff --git a/AGENTS.md b/AGENTS.md index 0bbed8e5adb..9fb9515871f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -49,6 +49,7 @@ You should use the following specialized skills for commo= n tasks: - `qemu-code-explorer`: For finding where things are defined, how they're = used, or understanding a specific subsystem. - `qemu-build`: For configuring and building QEMU (including debug and san= itizer builds). - `qemu-testing`: For finding, listing, and running individual tests (Unit= , QTest, Functional, TCG). +- `qemu-code-reviewer`: For pulling and applying patch series from mailing= lists. =20 ## Source Code Layout (see `docs/devel/codebase.rst`) - **`accel/`**: Hardware accelerators (KVM, TCG, HVF, Xen, etc.) and archi= tecture-agnostic acceleration code. --=20 2.47.3 From nobody Sat May 30 17:44:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780049812; cv=none; d=zohomail.com; s=zohoarc; b=YyrC1DpVvYJjmD7bkKn4dNoi0j8UJcCtj36dCTlXq0dTpei8cRdSfMztk/MiJZ8QtqGxBMO7FfXbC+WBI6yzxvMZFGxBsJallM2DvKznaA4y5HgtkJM99/v3zuW7WiQuiCYEvlc87KYyew393/spQZIq0FEdYo8nBYIkjluen0Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780049812; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=phEUg5x0DXLsPnOC2onnRCPG/V+wsa5zkHJVzaJL+9g=; b=FsHfqGc6rrNh/fAmezopZ9WBPKnMpyJ7xAsuyHdUbtIN+69AqzmnuFPIM4EzxtqWKjEmi/GtAZf1BETTs+h77bcVrbTTR6mjZ5zUXD7CacZmo19+Q6Y/b+jBbjPVkw6akO8O9VjPHYf95kHW6NdGey8XIbcmnseeF9F5dIw3CYc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780049812499839.0668843341628; Fri, 29 May 2026 03:16:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSuEv-00031t-8J; Fri, 29 May 2026 06:14:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSuEr-00030H-U3 for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:49 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSuEp-00017O-Nl for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:49 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4909e3fa4b2so4077325e9.0 for ; Fri, 29 May 2026 03:14:47 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909d6eb3adsm29053365e9.11.2026.05.29.03.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:14:41 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 90B9360E87; Fri, 29 May 2026 11:14:38 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780049686; x=1780654486; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=phEUg5x0DXLsPnOC2onnRCPG/V+wsa5zkHJVzaJL+9g=; b=sg4PRRq8t94Snh8WW1nR5ludTgrhmv8Tn5fU0kDfBw5QcKmRObhGDT5ivHT4rTDtMs T8F6zr4JPe4y8gYl/qSTB8KCtWYO1VfBhSZuoFhUBzMiNd88RwwuLbwvSmNtz34M8daZ OBTh+pW9la29PUsEvVIde1DOowN+ADKCD2bvbZdU32xhqwu9Ch4H7mGlyuXigv5MXoZD sMl7bC7yHjJ8RZuAHZD0n+HLDTnk8+IoaIhMqdn4z3Xzt0SPg5Q/pSZdCYEkAZE5bXmq kTsY8kZP+6GAalktdxlyMGSVvkMeeX+L3qHGmNa4TygbO5++7z/lCVUlNmokyZef3RmK eDSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780049686; x=1780654486; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=phEUg5x0DXLsPnOC2onnRCPG/V+wsa5zkHJVzaJL+9g=; b=KrH+Ej5M3ew1MgJLPj1m3f1YB3nwshOWkml99VxCvd5iJK9Dh4oYmC9zEL/iitGavm b+3dHMPDlLcITwG+zDwrB4WLEEkCpiurDhoOW/IscPKgXizDfaPocz1RuFR0PdAP3nGo DKUbVRDQOCdDveCSGu88SiSxPW3glsySrM4+eKO9/hijRMUN5VQm6mXSZOsLHddrpULJ 4x9SN0qa2+JmimvMAjKW3UlOC8WPMZ5BuNrHjLeG7KVnWdpgqa41lw0MRuQivuPkk7oP et8G0Wx09s27Rc15CMUaXCVDB+eyLwU6mW8bq2HE4tBCKWyujgebE5jvX1S4LmDGak8R uf6A== X-Gm-Message-State: AOJu0YwIK+B2y5qow5vWUrcZurIfGbA5Z/YRYauPICmpaCyTJqr6/9SA erBYJ4b9WPFJ27/5QG3l4cFevM4eM6A/a9S2auJ69oUYu1SMzlTC2eFAGt6mIv0S46w= X-Gm-Gg: Acq92OGw1tpIPrO3PKWMnxUavfDRMmF6frZUBEWOpUu/BXjU0GK/UBw0M9p80snTlHZ w1X8PUdR1Tle1/rQt/RG9HE8OhhIKkQSx41HuKpdfEm/e+LfAEEhzdV5nbJJZRSlG8JSlmlnBhW HPEkeXS8x51CXLAJo8st24/WSni/QXvMToKli+mE3EK4btvkafsbqDZYQ0gLaYR3Mn7m+NKBHYg +IKqDS4j2mb+oRzNTQ+vjHj4sIEvoxQp/SN4aRqioszfgA0g3jaeNxW8DQjOZnt4iwd3/bXi2K5 wRd7FzAOxnwhcuQm4kEfHoRG+VnF/n2Zn+GZpuItgSb+RA8glrgeofoN8qeqrgP45eTu9zcdGEJ ZbyvnWnvL2+ld6C3tJpV2jRcKljCZQ5a8A5eDCSriVdnQURTDwR/U80LNu/gytPvOOSjDIkSsSM QbLRLGc5V0dw/0uXPXjrBrDx80Pq1scQgLwQ== X-Received: by 2002:a05:600c:b50:b0:48f:e1ac:c94f with SMTP id 5b1f17b1804b1-4909c089064mr27157125e9.10.1780049685781; Fri, 29 May 2026 03:14:45 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , John Snow Subject: [PATCH v4 09/12] .agents/skills: add qemu-mail-thread skill (caveman) Date: Fri, 29 May 2026 11:14:34 +0100 Message-ID: <20260529101437.410181-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529101437.410181-1-alex.bennee@linaro.org> References: <20260529101437.410181-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780049814071158500 Teach agents how to fetch and deal with archives of mail threads. Just YOLO'ing the entire mail thread into an LLM context is quite expensive especially if reviewing a thread against your current tree state. This skill allows the agent to extract just the comments and tags saving tokens. Signed-off-by: Alex Benn=C3=A9e --- v3 - add header. v2 - rename to qemu-mail-thread - add instructions on fetching threads via b4 - refactor the metadata handling in the script - mention in AGENTS skill list --- .agents/skills/qemu-mail-thread/SKILL.md | 37 +++++++ .../scripts/qemu_mail_parser.py | 98 +++++++++++++++++++ AGENTS.md | 1 + 3 files changed, 136 insertions(+) create mode 100644 .agents/skills/qemu-mail-thread/SKILL.md create mode 100644 .agents/skills/qemu-mail-thread/scripts/qemu_mail_parse= r.py diff --git a/.agents/skills/qemu-mail-thread/SKILL.md b/.agents/skills/qemu= -mail-thread/SKILL.md new file mode 100644 index 00000000000..6e76829e36f --- /dev/null +++ b/.agents/skills/qemu-mail-thread/SKILL.md @@ -0,0 +1,37 @@ +--- +name: qemu-mail-thread +description: Fetch and extract reviewer comments from QEMU mailing list th= reads. Handles mbox files or raw text dumps. +license: GPL-2.0-or-later +--- + +# QEMU Mail Thread + +Fetch and extract reviewer comments from QEMU mailing list threads (mbox f= iles or raw text). + +## Fetch Mail Thread + +If Message-ID exists, use `b4` to fetch thread: + +```bash +b4 mbox +``` +Saves `.mbx` file. + +## Parse Comments + +Run script to extract feedback, filtering out quotes and diffs. + +```bash +python .agents/skills/qemu-mail-thread/scripts/qemu_mail_parser.py +``` +Detects standard mbox or raw text dump automatically. + +## Output Format +Generates `parsed_comments.txt` in current dir: +``` +--- REPLY FROM Reviewer Name --- +Subject: Re: [PATCH 01/10] ... +Comment text here... +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +``` +Use output to analyze feedback and outstanding suggestions. diff --git a/.agents/skills/qemu-mail-thread/scripts/qemu_mail_parser.py b/= .agents/skills/qemu-mail-thread/scripts/qemu_mail_parser.py new file mode 100644 index 00000000000..fdaac57ac15 --- /dev/null +++ b/.agents/skills/qemu-mail-thread/scripts/qemu_mail_parser.py @@ -0,0 +1,98 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +import sys +import os +import mailbox + + +def is_metadata_line(line): + """Check if a line is metadata (quotes, diff, etc.)""" + return (line.startswith(">") or + line.startswith("---") or + line.startswith("diff ")) + + +def parse_raw_text(text, output_f): + # Split by the separator used in lore.kernel.org / b4 dumps + messages =3D text.split("----------------------------------------") + for msg in messages: + if not msg.strip(): continue + + lines =3D msg.strip().split('\n') + author =3D "" + subject =3D "" + body_start =3D 0 + for i, line in enumerate(lines): + if line.startswith("From: "): author =3D line[6:] + if line.startswith("Subject: "): subject =3D line[9:] + if not line.strip() and body_start =3D=3D 0: + body_start =3D i + 1 + break + + is_reply =3D subject and ("Re: " in subject or subject.startswith(= "Re:")) + + if is_reply and author !=3D "" and not author.startswith("qemu-dev= el"): + output_f.write(f"--- REPLY FROM {author} ---\nSubject: {subjec= t}\n") + + for line in lines[body_start:]: + if not is_metadata_line(line): + output_f.write(line + "\n") + output_f.write("=3D"*60 + "\n\n") + + +def parse_mbox(mbox_path, output_f): + mbox =3D mailbox.mbox(mbox_path) + for message in mbox: + subject =3D message['subject'] + if subject and 'Re: ' in subject: + author =3D message['from'] + output_f.write(f"--- REPLY FROM {author} ---\nSubject: {subjec= t}\n") + + payload =3D message.get_payload() + body =3D "" + if isinstance(payload, list): + # Handle multipart + for part in payload: + if part.get_content_type() =3D=3D 'text/plain': + body =3D part.get_payload(decode=3DTrue).decode('u= tf-8', errors=3D'ignore') + break + else: + body =3D message.get_payload(decode=3DTrue).decode('utf-8'= , errors=3D'ignore') + + # Simple heuristic to extract comments + for line in body.split('\n'): + if line.strip() and not is_metadata_line(line.strip()): + output_f.write(line + "\n") + output_f.write("=3D"*60 + "\n\n") + + +def main(): + if len(sys.argv) < 2: + print("Usage: python qemu_mail_parser.py ") + sys.exit(1) + + input_file =3D sys.argv[1] + output_file =3D "parsed_comments.txt" + + if not os.path.exists(input_file): + print(f"Error: File not found - {input_file}") + sys.exit(1) + + with open(output_file, "w", encoding=3D"utf-8") as out_f: + # Detect if it's an mbox or raw text + with open(input_file, 'rb') as f: + header =3D f.read(15) + is_mbox =3D header.startswith(b'From mboxrd@z ') + + if is_mbox: + print(f"Parsing {input_file} as mbox...") + parse_mbox(input_file, out_f) + else: + print(f"Parsing {input_file} as raw text dump...") + with open(input_file, "r", encoding=3D"utf-8", errors=3D'ignor= e') as f: + text =3D f.read() + parse_raw_text(text, out_f) + + print(f"Done. Extracted comments saved to {output_file}") + +if __name__ =3D=3D "__main__": + main() diff --git a/AGENTS.md b/AGENTS.md index 9fb9515871f..9e373c98573 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -50,6 +50,7 @@ You should use the following specialized skills for commo= n tasks: - `qemu-build`: For configuring and building QEMU (including debug and san= itizer builds). - `qemu-testing`: For finding, listing, and running individual tests (Unit= , QTest, Functional, TCG). - `qemu-code-reviewer`: For pulling and applying patch series from mailing= lists. +- `qemu-mail-thread`: For analyzing and parsing mailing list threads. =20 ## Source Code Layout (see `docs/devel/codebase.rst`) - **`accel/`**: Hardware accelerators (KVM, TCG, HVF, Xen, etc.) and archi= tecture-agnostic acceleration code. --=20 2.47.3 From nobody Sat May 30 17:44:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780049788; cv=none; d=zohomail.com; s=zohoarc; b=GTmfudsTCDhmVjkAzr+1G+YRm4uOjlwV/59J908vrVljNUdg4CnqxNWTtoi5pHNFCP5F5uXrU/mBTWC8od4chKT7yv+5GdwKZjc8+B3xp9aoGSMlB6Q6/r/05ZgbYw4tykY7KY5smROG/F8BOXO20IrjCrZ/og/BdlRYF0fUrqM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780049788; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=lqFcEliVLrWjG6hw+VNEfwAjIL+FibvQJbuJivKWimw=; b=UO8QFXkDukQXUtZr0CDmFShdDKKk0JEIisSNVQP46T/SSd5qM8lWPZ1HWjmlSmkJa4VwBdnf2yWQxScn4eL5ACJ3I/SrtcIXIokeH78IuLLV04ZrxizxIg3rqWhddaMzH3QSP7SS9bRBDg7DGaP9dYGmiYpcaLui33Sj529jbnE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780049788114358.651794743466; Fri, 29 May 2026 03:16:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSuEq-0002zp-Vk; Fri, 29 May 2026 06:14:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSuEp-0002ys-Us for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:47 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSuEn-00014j-4h for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:47 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-48e8132c6d0so87516955e9.1 for ; Fri, 29 May 2026 03:14:44 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909d68a925sm46590565e9.2.2026.05.29.03.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:14:41 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id AA01F60ECD; Fri, 29 May 2026 11:14:38 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780049684; x=1780654484; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lqFcEliVLrWjG6hw+VNEfwAjIL+FibvQJbuJivKWimw=; b=yesDikIP2FZUgnap1z4tYDyumo1dcifBva0GLSw30FNl7CuOdSuWKf5ZhrWZ0ZJUkP of68hiMTCGDeyYgTwa1hD97tWs38BmiAf1DtyX7uYx4bwWIO6ATET6ECn5PWy+q402RR tnR4QsyJAt33mROGbZ/9zyoZsr5ASHmsHYzZcITFuIC6Ev6PhoigbPI9bLGJK1KvuQ+3 AOmhPxajkYuFVPxyRwKXc1b2q+ftrlg7g9EuA7JoxqD1SosQyITQ8KivPscUsYx945/6 BUv3DF6pA/+JGScoL1wso3JfoLjI48ounNhhxKeG7IRu4l43okO3NzLFJe/smiGhmsGE cuPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780049684; x=1780654484; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=lqFcEliVLrWjG6hw+VNEfwAjIL+FibvQJbuJivKWimw=; b=LmTEu7RJYGk5Sa1Gh6m1/GENOAgp4CuilFHNg22nyjsNArIGNf2k10FUVqfzWgPi0y J6yIvUa0seLfWAIqPWd/EHDBZh+KE9k04oeTI6LLW95+yqjqnUX9yUOHe3I7abQiqFZi SdcbXRkTVU4vTQVdDA5Z3iLDMIkmiw3+HjkPlLT/WinOVdrpzO8ahzocMyoM07EUmF0P 40kJdbgknYc/fn2jDYiFiExPgVLOmh/6Ohj7RR/0qu8Eqp1WtAyK7WZtmFgo2kj/n0BR urzWALFlipeQkfTgDQozFSEph5kyQ8pmp1fvlB75IMvaZHWcPL1hSTXkxrFFOUYpY0Ib Pi+w== X-Gm-Message-State: AOJu0YwPjOFnKrgtpB/7T2anLz4MBFNmCmN/kGK19h/M+vyLVK9xbufH t1XFUeJtYMugqqISW9+6ay2JnQE+vJLIISj43Sv8sqWhxryx9lG947ZzVBYt04m+9Es= X-Gm-Gg: Acq92OHbsuXxB2Jp+KYCgtgitBcNthaBqctaYZLIGQVxlQt9YkxFRrMr3EDYTCmrLNJ oOzprYULOcZUpY2UjRlL00bCRp5bMnZaJMgfCQE7cS7zdLnr9ksXEvs0dsFXDJoBVrnE/naZl6o 8IeOggk0UrCO/ezJ9NbgLM5CGvuU30EIeowZkW7RulKGhsr2H16tFRQwX/hMFDQ5llVnSvEwFij ByFj5JLfL/+nsFBSI5sOi37+pzIsxbPvI6z+XvrkgkEZxaZ8V2Kf1PS3g2xqN9jUJJVxvvMazYB UxTY2j+dHCMSKIq3JDBSOcb5D2UVNYQ1BEFPW0XEKVAXuK9cRadIgRKNcjtJfCjDq/yhF9gEbc3 vAFxpdtqI3cTEBXA5QJpQpy1g98nsTFT3Y8u+vi/CVaZHh9SpZBTXecfqZsLomNeLNqwxUYoaqw lLNxvYXVfr1SKywoyZlUa/PMSKPP0GNq7f4w== X-Received: by 2002:a05:600c:42ca:b0:490:890a:da46 with SMTP id 5b1f17b1804b1-4909c091a2emr24575795e9.2.1780049683595; Fri, 29 May 2026 03:14:43 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , John Snow Subject: [PATCH v4 10/12] .agents/skills: add qemu-issue-helper skill (caveman) Date: Fri, 29 May 2026 11:14:35 +0100 Message-ID: <20260529101437.410181-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529101437.410181-1-alex.bennee@linaro.org> References: <20260529101437.410181-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x334.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780049789877158500 This provides basic instructions for fetching issue details and summarising details about the issue for other agents. Signed-off-by: Alex Benn=C3=A9e --- .agents/skills/qemu-issue-helper/SKILL.md | 47 +++++++++++++++++++++++ AGENTS.md | 1 + 2 files changed, 48 insertions(+) create mode 100644 .agents/skills/qemu-issue-helper/SKILL.md diff --git a/.agents/skills/qemu-issue-helper/SKILL.md b/.agents/skills/qem= u-issue-helper/SKILL.md new file mode 100644 index 00000000000..15ab983f083 --- /dev/null +++ b/.agents/skills/qemu-issue-helper/SKILL.md @@ -0,0 +1,47 @@ +--- +name: qemu-issue-helper +description: Summarize QEMU issue analysis. Help sub-agents report finding= s (build config, CLI, tests, GitLab issue data). Trigger when analyzing QEM= U bugs/GitLab issues. +license: GPL-2.0-or-later +--- + +# QEMU Issue Helper + +Help sub-agent summarize issue analysis for main agent. + +## Fetch Issue Data + +Use `glab` for GitLab issues. Repo: `qemu-project/qemu`. + +### Commands +- **View issue**: `glab issue view -R qemu-project/qemu` +- **View comments**: `glab issue view -R qemu-project/qemu --c= omments` +- **Search issues**: `glab issue list -R qemu-project/qemu --search ""` + +## Report Format + +Sub-agent MUST use this format for GitLab issue summary: + +### 1. Issue Context +- **Source**: GitLab URL/ID. +- **Title**: Brief description. +- **Reporter**: Username. +- **Relevant Commits**: Related commits mentioned in issue. + +### 2. Build & Reproduction (from issue) +- **Environment**: Host OS, CPU, QEMU version. +- **Build Config**: Required `configure` flags. +- **Reproduction CLI**: Exact QEMU command. + +### 3. Proposed Fixes & Series +- **Proposed Fixes**: Suggested code snippets or logic fixes. +- **Patch Series**: Linked patch series or MRs. + +### 4. Discussion Summary +- **Consensus**: Community understanding of bug. +- **Constraints**: Blockers, requirements, maintainer feedback. +- **Next Steps**: Action needed to proceed. + +## Rules +- **No Independent Analysis**: Summarize ONLY issue tracker data. No self-= made root cause analysis. +- **Terse**: Keep it brief and technical. +- **Links**: Include direct links to comments or patches. diff --git a/AGENTS.md b/AGENTS.md index 9e373c98573..d842fc62e98 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -51,6 +51,7 @@ You should use the following specialized skills for commo= n tasks: - `qemu-testing`: For finding, listing, and running individual tests (Unit= , QTest, Functional, TCG). - `qemu-code-reviewer`: For pulling and applying patch series from mailing= lists. - `qemu-mail-thread`: For analyzing and parsing mailing list threads. +- `qemu-issue-helper`: For fetching and summarising issue details from the= bug tracker. =20 ## Source Code Layout (see `docs/devel/codebase.rst`) - **`accel/`**: Hardware accelerators (KVM, TCG, HVF, Xen, etc.) and archi= tecture-agnostic acceleration code. --=20 2.47.3 From nobody Sat May 30 17:44:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780049721; cv=none; d=zohomail.com; s=zohoarc; b=a+wGkr69tVQ9d8ylQloOHjWJIm92Xk91Dx8VPxSvBJKXpx2nc7QVXkpndzw7ehFagqRs6wXwcqbyJEAwUFMGDj7Ti635AYM0/BPPvy3TDE1exKJKYvq2h399N6g6Rv1UlKHAes7kwSWkxYvWrxOIM0YidN2AMrfG24DZ5yJCRAQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780049721; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=B6JQViPoFpTlcZyCfKBQhNm2HrN7IoYtR2ZHk+x072M=; b=awL5Du0HihHf7XcnW4Bic1u8IJvEUlMCXOSPOYAub4sL84JcRpwP2RB4u2/Mu3nniZYsRkF0VVD3kuhT3k3sQDZhocugw7F137mGmYWGxiTJyc/hANb9ZF9Y7hFxkm06nd8Thq2BCTwFdCDlNQ+Jmn/WLWQ9gcGANuyY8w5EeXg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780049721386940.453985175888; Fri, 29 May 2026 03:15:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSuEw-00032U-8E; Fri, 29 May 2026 06:14:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSuEu-00031X-HM for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:52 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSuEr-00018I-C3 for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:52 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4891e5b9c1fso119389015e9.2 for ; Fri, 29 May 2026 03:14:48 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45ef34b47eesm2710550f8f.9.2026.05.29.03.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:14:41 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C536860EDF; Fri, 29 May 2026 11:14:38 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780049688; x=1780654488; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=B6JQViPoFpTlcZyCfKBQhNm2HrN7IoYtR2ZHk+x072M=; b=mMGhwKclsXpOUFGZ2RFmbovrNUNBwephMdmjTaiTywNwWE1l2Fjb7rKoNXH46Z+9yQ g/ljDll3a3FE8C6/CPY1F26FXwgmXQWtXKBgO+kfqwbm8mF/bcs1YE4CyIl099pcMvFP F9nBd3GiVgsfusc08umM+91plrW3RPJpMjyHy48v5SiSo9CCCKiN0ouP2BNWiIvwNq9l LC3jxHpnNkVHPqF1CmHciPp19QYCO7bPs/o73Mi7s7fIVBCmEZVzAtC7Q17Z3ZJacg6E l8hUBwc1XLKTrkq/C9c0MQLLfhKLknDkN/6350gaYYBFbLgU8VKSxG7KxOdQkDBFcyTw SvoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780049688; x=1780654488; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=B6JQViPoFpTlcZyCfKBQhNm2HrN7IoYtR2ZHk+x072M=; b=NsotkLHqpbha5R4oQ8bKrG8MoMvOpD5wXXgh6qdhfz+eAdeAhH7HsiLcXWYnFYahhk VwVmKlMb17yDJ64t6dyEvea7ApcidV+zynsemha88LuJIFFF2e7pwD4P4vr/VSERQGnV CfhztDS5Ude6LmIHlfA6Wn1qdpchKdTabVzxoeRouJIVrS5s3VWXIK1srVzBVeRZDwGB AwGxzYsD0RmXT+T6BB4EIHwPrb6Aya6/EIQTEH1UPwtO2VKV0FF5C4e4oMRjeoyp8fUL gRIKpARGz8tIRvXn2ULatrmF17NLIiDhrimUY1h5RmEzV6dQzyrGmdgJXe8jUO3l+yys PGkg== X-Gm-Message-State: AOJu0YwkGYWw/PH4tkFdtp1VormdqV5Y5OGQ+1Z0q9HrSsede+qTVDdH yN/G+PSMZW/bo29zfc4/xGDTlR5Nj1z5q3Q2mlwyUAqHTaJJLS5eKGsjrAdZaE8umPYlSniB8De +TA5/ X-Gm-Gg: Acq92OGO+PdpgKygDGKC6JsVh4ADP2ZPkt4lMGkP3K6ntg4x/l55f+tMXd4hMruG+jo kapL5iOEdIBbu9l0RVD2q/K9QdyyV+B4UJsO+EMkRnkDCgQYb6aUsc4gbdy8QkLfNxBzniLBxl3 3PYg6PT0UZ+LpPJoNYGdF6NAlPia1NBpfsJ9hgdo3zzMCI32hGSKZcsPiNP5zWc6PfaOj3ZPrNs XCOswWD1N/j2LkJy382bkRyVtJ6CMr3/m8JuHMGwjzhKp8qOJbQ3oxoWqUx+hQ7yJpDG0yGPpd+ 1BUFUhvgdLtumhzB0EiY7exly+r9TnZDr4Kzg4RCW0mwHmnIRc/fVnTgv4dDAPzySzcDqXoUssC UepiA6NZ4eIMgdWITCJnf3b13L867ndk4In7+vjKdWTolR067k1AQnqsCZ8c/D6mXJXs20hTxeL VmVDwW+Eb+cytOmQr8hS1RIf+GwkmnnFt5mQ== X-Received: by 2002:a05:600c:1550:b0:490:846d:e2de with SMTP id 5b1f17b1804b1-4909c0bedc5mr42360285e9.28.1780049687497; Fri, 29 May 2026 03:14:47 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , John Snow Subject: [PATCH v4 11/12] .agents/skills: add qemu-issue-triage agent skill (caveman) Date: Fri, 29 May 2026 11:14:36 +0100 Message-ID: <20260529101437.410181-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529101437.410181-1-alex.bennee@linaro.org> References: <20260529101437.410181-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780049723891158500 While triaging the issue tracker I wondered if this would be a suitable job for an AI agent. Unfortunately the OSS program doesn't give any credits to run agents in gitlab. However I do have access to models from my editor and ECA so I built one and tested it on a few issues. We might want to consider adding some common "issue smells" for common problems in issues. For example triggering asserts that have been added to the code and other such annoyances. Signed-off-by: Alex Benn=C3=A9e --- v4 (caveman): - caveman version - discourage deep code dives and running tests - teach how to find current stable versions v4 - fix a bunch of typos in SKILL - update evals - remove mentions of ECA - fix typo referencing old skill name - remove eca__spawn_agent reference - clean-up authentication handling - teach it about scoped labels - make less chatty in the comments - updated commit msg - suggest running things in parallel (use agents) - more pointers to incompleteness v3 - more imperative phrasing v2 - prefer sub-agent - mention parameters - don't be over eager to tag host or target for generic bugs - signoff comments as an agent on behalf of the user - detect patch available and apply appropriate tags --- .agents/skills/qemu-issue-triage/SKILL.md | 100 +++++++++++++ .../qemu-issue-triage/assets/labels.txt | 133 ++++++++++++++++++ .../skills/qemu-issue-triage/evals/evals.json | 18 +++ .../scripts/update_labels.sh | 16 +++ AGENTS.md | 1 + 5 files changed, 268 insertions(+) create mode 100644 .agents/skills/qemu-issue-triage/SKILL.md create mode 100644 .agents/skills/qemu-issue-triage/assets/labels.txt create mode 100644 .agents/skills/qemu-issue-triage/evals/evals.json create mode 100755 .agents/skills/qemu-issue-triage/scripts/update_labels.= sh diff --git a/.agents/skills/qemu-issue-triage/SKILL.md b/.agents/skills/qem= u-issue-triage/SKILL.md new file mode 100644 index 00000000000..814038d5e04 --- /dev/null +++ b/.agents/skills/qemu-issue-triage/SKILL.md @@ -0,0 +1,100 @@ +--- +name: qemu-issue-triage +description: Triage and label GitLab issues for QEMU project. +license: GPL-2.0-or-later +--- + +# Instructions + +Triage GitLab issues for QEMU project. + +## Parameter Handling & Execution Strategy (CRITICAL) +1. **Multi-ID**: If multiple IDs (e.g., `#3430, #3426`), treat each as ind= ependent. +2. **Sub-Agent MANDATE**: NEVER triage in main context. ALWAYS spawn sub-a= gents to avoid context pollution. + - **Parallel**: One sub-agent per issue ID in parallel. + - Do NOT run `glab` or read label cache in main context. + - Pass `` in `task` argument, instruct sub-agent to follow tr= iage workflow/asset rules. + - Report sub-agent summary back to user. + +## Goal +Automate initial triage of new bugs and feature requests in QEMU GitLab re= po. + +## Prerequisites +- `glab` CLI tool. +- Auth check: `glab auth status`. Set token via `env GITLAB_TOKEN=3D` if needed. +- Repo: `-R qemu-project/qemu`. + +## Asset Management (Label Cache) +Cache list of labels avoids API calls. +- **Cache Location:** `assets/labels.txt` relative to skill. +- **Update Cache:** If requested or outdated, run script: + ```bash + cd .agents/skills/qemu-issue-triage/scripts && ./update_labels.sh + ``` +- **Use Cache**: ALWAYS read `assets/labels.txt` (or grep) before labeling= . Do NOT guess names. Use exact casing/spelling. + +## Triage Workflow + +### 1. Information Gathering +```bash +glab issue view -R qemu-project/qemu --comments +``` + +### 2. Evaluate Completeness +Check template: Host Arch/OS, Guest Arch/OS, QEMU Version, Repro Steps, Ex= pected vs Actual. + +**workflow::Needs Info Triggers (CRITICAL):** +Request info and apply `workflow::Needs Info` label if: +- **Missing Command Line**: No full reproduction command (`qemu-system-* .= ..`). +- **Old QEMU Version**: Version older than last two major releases. + - **CRITICAL**: No guess/hardcode. Read `VERSION` + `git tag -l "v*"` fo= r real releases (e.g., `11.0.50` means `11.0.x` released, `11.1.0` in dev).= Ask to re-test with master/latest stable found. +- **Distro Version**: Version has distro-specific suffix (e.g., `.el9`, `.= fc40`, `-ubuntu`, `7.2.0-14.sc05...`). Ask to reproduce with clean upstream= source build. + +**Actions:** +- If info missing, add `workflow::Needs Info` label and comment politely a= sking for missing details. Sign comment as "Issue Agent Bot on behalf of th= e user". +- If issue is complete and on recent upstream version, proceed to categori= zation. + +### 3. Categorization & Labeling +Add labels. Consult `assets/labels.txt` for exact names. + +#### Scoped Labels (Prefix::Label) +Mutual exclusion: only one label per scope. Adding new removes old. +- **Prefixes:** `kind::`, `workflow::`, `Closed::`, `Audit Tooling::`, `GU= I::`. + +#### Kinds +- `kind::Bug`: Bad behavior. +- `kind::Feature Request`: New function. +- `kind::Task`: Research/investigations. + +#### Targets (`target: *`) and Hosts (`host: *`) +Be conservative. Only apply if bug strictly architecture- or host-dependen= t (e.g., ARM CPU emulation, macOS-specific build). Do not label target/host= if bug is in generic device (USB, PCI, block) that happens to be run on th= at target. + +#### Accelerators (`accel: *`) +E.g., `accel: KVM`, `accel: TCG`, `accel: HVF`. + +#### Subsystems +E.g., `Storage`, `Networking`, `device:virtio`, `Migration`. + +#### Testcases +- Apply `TestCase` if minimal C program, shell script, or disk image provi= ded. + +#### Patches and Fixes +- Apply `workflow::Patch available` if link to patch on mailing list (`lor= e.kernel.org`, `patchew.org`) or patch mentioned. + +#### Workflow Management +One `workflow::` label at a time. Transitioning auto-removes old (e.g., ad= ding `workflow::Patch available` removes `workflow::Triaged`). + +### 4. Update Issue +Apply labels. E.g.: +```bash +glab issue update -R qemu-project/qemu --label "workflow::Triag= ed,kind::Bug" +``` + +## Guidelines +- Comments MUST end with: "Issue Agent Bot on behalf of the user". +- Avoid comments unless info needed. No "thank you" comments. +- Apply `workflow::Triaged` once categorized. +- Do NOT assign to people unless explicitly requested or known maintainer. +- Use `scripts/get_maintainer.pl` on path to find subsystem. +- **No deep code dives**: No deep code dive. No long root-cause search. Fo= cus labels and metadata. +- **Do NOT run tests**: No build, no test. Metadata triage only. diff --git a/.agents/skills/qemu-issue-triage/assets/labels.txt b/.agents/s= kills/qemu-issue-triage/assets/labels.txt new file mode 100644 index 00000000000..12d3cc7e6f0 --- /dev/null +++ b/.agents/skills/qemu-issue-triage/assets/labels.txt @@ -0,0 +1,133 @@ +ACPI Power Management related (ACPI / SMBIOS / = HEST / GHES) +Audio Audio devices; both backend (host audio) a= nd frontend (guest audio) +Audit Tooling::AI For bugs found with AI assisted tools such= as Mythos and other similar things +Audit Tooling::Fuzzer Issues found via fuzzing. For security iss= ues, please consult https://www.qemu.org/contribute/security-process/ +Audit Tooling::Other Some unknown/unclassified type of audit to= oling. +Audit Tooling::Sanitizer For issues found using sanitizers such as = asan, lsan and tsan +Audit Tooling::Static Analysis Static analysis such as Coverity or more m= odern compilers. +Bite Sized Candidates for first contributions; see al= so https://wiki.qemu.org/Contribute/BiteSizedTasks +Build System configure, make, Meson, ninja, gcc, clang,= ccache, etc. +CI Continuous Integration; gitlab, patchew, e= tc. +CLI Command Line Interface +Chardev Character device backends and related issu= es +Closed::Duplicate There is already another ticket that is ab= out the same issue +Closed::Fixed The issue was fixed. Yay! +Closed::Invalid This issue was not really a problem +Closed::NotOurBug This is a bug, but not a bug in QEMU. Plea= se report it and/or include a link to the report. +Closed::NotReproducible This issue was not reproducible +Closed::UnbackedFeature Nobody was willing to work on this feature= request +Closed::WontFix The issue was acknowledged, but the fix wo= uld be too complex, too expensive, or would introduce other problems. +Cryptography =20 +Documentation Sphinx documentation, man pages, the wiki,= --help output, etc. +GDB Issues relating to using GDB via the gdbst= ub +GUI Graphical User Interface (gtk, SDL, curses= , VNC, spice, ...) +GUI::Cocoa Cocoa +GUI::DBus DBus +GUI::GTK GTK +GUI::SDL SDL +GUI::SPICE SPICE +GUI::VNC =20 +Guest Agent Issues related to the qemu-guest-agent bin= ary. https://wiki.qemu.org/Features/GuestAgent +Hard =20 +Launchpad Issues migrated from Launchpad +Migration =20 +Modules =20 +Networking =20 +Python Python library issues (./python/) +QAPI/QMP QEMU API / QEMU Machine Protocol, HMP and = CLI, etc. +QOM QEMU Object Model +Regression This is a regression from previously worki= ng behaviour +Security This is a security issue - see https://www= .qemu.org/docs/master/system/security.html for guidance +Semihosting Semihosting calls provide a simple ABI for= early bring-up of embedded devices, see https://www.qemu.org/docs/master/a= bout/emulation.html#semihosting +Softfloat QEMU's FPU emulation code (TCG only) +Stable::can't fix The bug was reported on a stable branch bu= t the fix is too invasive for backporting +Stable::obsolete The bug was reported on a stable branch th= at is not maintained anymore +Stable::to backport The bug was reported on a stable branch an= d needs to be backported on the next release from the branch +Storage Block subsystem, Storage devices, etc. +TCG plugins Anything related to the TCG plugins feature +TestCase The report includes a testcase +Tests qtests, iotests, acceptance tests, VM test= s, docker tests, and more. See https://www.qemu.org/docs/master/devel/testi= ng/index.html +USB =20 +VFIO =20 +accel: HAX Intel's Hardware Accelerated Execution Man= ager (HAXM) +accel: HVF Apple Hypervisor Framework +accel: KVM Linux Kernel-based Virtual Machine +accel: TCG QEMU Tiny Code Generator +accel: WHPX Microsoft Windows Hypervisor Platform (WHP= X) +accel: Xen Xen Hypervisor +block:9p The 9p network file system +block:NVMe =20 +block:curl =20 +block:nbd =20 +block:nfs Issues related to the NFS backend +block:qcow2 =20 +block:ssh =20 +block:vmdk =20 +bsd-user =20 +device: PCI =20 +device: TPM Trusted Platform Module (TPM) devices +device: iommu =20 +device: mmio mmio and other directly emulated devices +device:graphics Issues relating to display device emulatio= n, or rendering in general. See also "GUI". +device:input Keyboards, Mice, Touchscreens, HIDs, etc. +device:iommu IOMMU and SMMU +device:pflash Parallel NOR flashes emulation +device:sdmmc SD or (e)MMC cards emulation +device:virtio virtio-related issues. https://www.linux-k= vm.org/page/Virtio +device:watchdog =20 +efi EFI firmware related issues +flaky-ci For test cases that are flaky when run und= er our CI +gitlab =20 +guest: AIX =20 +guest: BSD Guest OS is BSD (NetBSD/FreeBSD/OpenBSD/et= c) +guest: Linux Guest OS is Linux/Linux-based +guest: Windows Microsoft Windows guest +guest: macOS Apple macOS / Darwin as guest OS +guest: os2 =20 +host: aarch64 Bugs reproducible on AArch64 hosts +host: arm Bugs reproducible on ARM hosts +host: loongarch64 Bugs reproducible on LoongArch64 hosts. +host: mips Bugs reproducible on MIPS hosts +host: ppc Bugs reproducible on Power hosts +host: riscv Bugs reproducible on RISC-V hosts +host: s390 Bugs reproducible on s390 hosts +host: sparc64 Bugs specific to Sparc64 hosts +host: x86 Bugs reproducible on x86 hosts +host:32bit These are mostly TCG related bugs where we= sometimes struggle with emulating larger guests, especially atomic and add= ress space issues. +hostos: BSD FreeBSD, OpenBSD, NetBSD, and derivatives = as host OSes +hostos: Linux Linux-based host operating systems (Fedora= , RHEL/CentOS, Debian, Ubuntu, openSuSE et al) +hostos: Windows Microsoft Windows host OS +hostos: macOS Apple macOS / Darwin as a host OS +icount issues relating to icount, deterministic e= xecution and record/replay functionality +kind::Bug Bug or defect in functionality. +kind::Feature Request Feature request or new functionality. +kind::Task Research, investigations, and miscellaneou= s issues. +libvfio-user =20 +linux-user issues with QEMU's lightweight user-mode e= mulator +qemu-img =20 +sysadmin Issues related to QEMU project infrastruct= ure. You should probably also check on the projects IRC channel if the issu= e is urgent - https://www.qemu.org/support/ +target: alpha DEC Alpha [alpha] +target: arm Arm AArch32 or AArch64 [arm, aarch64] +target: avr Atmel AVR [avr] +target: hexagon Qualcomm Hexagon [hexagon] +target: hppa Hewlett-Packard Precision Architecture; HP= /HP, PA-RISC [hppa] +target: i386 Intel/AMD x86 [i386, x86_64] +target: loongarch loongarch64 target architecture +target: m68k Motorola 68000 [m68k] +target: microblaze Xilinx MicroBlaze [microblaze, microblazee= l] +target: mips MIPS [mips, mipsel, mips64, mips64el] +target: nios2 Altera Nios II [nios2] +target: openrisc OpenRISC [or1k] +target: ppc IBM Power Architecture, PowerPC [ppc, ppc6= 4, ppc64le] +target: riscv RISC-V [riscv32, riscv64] +target: rx Renesas RX [rx] +target: s390x IBM Z, SystemZ, zSeries [s390x] +target: sh4 Renesas SuperH [sh4, sh4eb] +target: sparc Sun Microsystems SPARC [sparc, sparc64] +target: tricore Infineon TriCore [tricore] +target: xtensa Tensilica Xtensa [xtensa, xtensaeb] +workflow::Confirmed Bugs that have been confirmed and reproduc= ed. +workflow::In Progress Someone is working on this issue. +workflow::Needs Info Issue has insufficient information to veri= fy. +workflow::Patch available A patch is available +workflow::Triaged Issue has been triaged and given a topic l= abel. diff --git a/.agents/skills/qemu-issue-triage/evals/evals.json b/.agents/sk= ills/qemu-issue-triage/evals/evals.json new file mode 100644 index 00000000000..572c0723fd4 --- /dev/null +++ b/.agents/skills/qemu-issue-triage/evals/evals.json @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +{ + "skill_name": "qemu-issue-triage", + "evals": [ + { + "id": 1, + "prompt": "Update the cached list of GitLab labels for the QEMU proj= ect.", + "expected_output": "The skill should fetch the latest labels from Gi= tLab and save them to the skill's assets directory.", + "files": [] + }, + { + "id": 2, + "prompt": "Triage issue #1234. Assume the user provided clear steps = but no subsystem label is obvious.", + "expected_output": "The skill should read the cached label list (not= fetch from GitLab) and apply relevant kind/target labels.", + "files": [] + } + ] +} \ No newline at end of file diff --git a/.agents/skills/qemu-issue-triage/scripts/update_labels.sh b/.a= gents/skills/qemu-issue-triage/scripts/update_labels.sh new file mode 100755 index 00000000000..1605eab4de5 --- /dev/null +++ b/.agents/skills/qemu-issue-triage/scripts/update_labels.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: GPL-2.0-or-later +set -e + +if [ -z "$GITLAB_TOKEN" ]; then + echo "GITLAB_TOKEN is not set. Attempting to fetch via pass..." + export GITLAB_TOKEN=3D$(pass gitlab-api) +fi + +echo "Fetching labels from qemu-project/qemu..." +# Fetch labels using API and format as "Name Description" +glab api /projects/qemu-project%2Fqemu/labels --paginate | \ + jq -r '.[] | [ .name, .description ] | @tsv' | \ + column -t -s $'\t' > ../assets/labels.txt + +echo "Labels cached in assets/labels.txt" diff --git a/AGENTS.md b/AGENTS.md index d842fc62e98..3c108d3324b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -52,6 +52,7 @@ You should use the following specialized skills for commo= n tasks: - `qemu-code-reviewer`: For pulling and applying patch series from mailing= lists. - `qemu-mail-thread`: For analyzing and parsing mailing list threads. - `qemu-issue-helper`: For fetching and summarising issue details from the= bug tracker. +- `qemu-issue-triage`: For helping triage issues in the bug tracker. =20 ## Source Code Layout (see `docs/devel/codebase.rst`) - **`accel/`**: Hardware accelerators (KVM, TCG, HVF, Xen, etc.) and archi= tecture-agnostic acceleration code. --=20 2.47.3 From nobody Sat May 30 17:44:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1780049798; cv=none; d=zohomail.com; s=zohoarc; b=YSyonW1KnUp0Z0qUxHTxClL1rlHjhM23DY+t2hNStTFjxDH5Q96MBbQZYRYcpaflnW2S4NQeusYLZCJmjJZMiKtX7K1+qz6JWcRntaxfit2IgjwKxQG5tgEp9ymcjn8dp1ToFzo2NY0/pV34XTRWOe0LgyOwUo4DDnalqvVOthQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780049798; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=G99Anl7Q/adNL+l2LO6ngRqKlQMvv0dNrSiIC3J0XuE=; b=J8LK72lt45x7jkBMs03ao47SwfVHhGbjPI/cAYg/NSWwIs04GhtUZoy82mPbcYxIQxKLG5DJzxXpB4Foocbd2A6Xs45t/4z4fwmFrSTVVdVlo/xmwdY4QBu9HhbrEboSgEOf6D+Bw6IqQNRQmyv18bDMacsapVziQ7vFL0bpC6o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1780049798731259.7107654502688; Fri, 29 May 2026 03:16:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wSuEu-00031P-D2; Fri, 29 May 2026 06:14:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wSuEr-0002zr-7G for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:49 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wSuEo-00016K-K1 for qemu-devel@nongnu.org; Fri, 29 May 2026 06:14:48 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4896c22fcbaso118763365e9.0 for ; Fri, 29 May 2026 03:14:46 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4909c0495fcsm18799075e9.0.2026.05.29.03.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 May 2026 03:14:41 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DC55160FAB; Fri, 29 May 2026 11:14:38 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1780049685; x=1780654485; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=G99Anl7Q/adNL+l2LO6ngRqKlQMvv0dNrSiIC3J0XuE=; b=EXXF1d2KRGXquoPCD/b98c4SQO26CY+r9dLJWs7ZgUUfQzHPO1q0aW3DCIRkwTfzDJ It2gf6YQ9sFrkSdsxIKi3hMx3vwC+sdpYphMPb2xBJuQbj45MPy9NsXiGH3z2Do0wkY8 u9Sx8s2peG9K0uHAwJCrk3HaVU78G3EfuH7cTdN9Mq6KWN50zwEJxQibKA0S0Ra04Oga 8KX2ua+DkHJdk7R5CQ37RP/XxWU3S9Zkkj1MtuYezOyB9RagNpZhGOktADnS1BgsNnBg o55BTdHIMHW9SZ2BFz1ywA3o0EC4cMQLpp3U2AsUkh5M3CVGvjHyU06zlv6DYIAlCjvT Curw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780049685; x=1780654485; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=G99Anl7Q/adNL+l2LO6ngRqKlQMvv0dNrSiIC3J0XuE=; b=F2qKry6MUbEa9qgoklcyaC7obj8DQFvQ0JVg3LwHJ0P2RAUZMvktMOPHNuxvQCxpi1 C+Ge5i4g7hoQV3b2TFyav7rl3KaLFEf+PiQfgQLegr910zT1j9BudE4f+CasdGgJp9QD XdOWh6dcBKutpRjgh8TpJZMsn7+6meY5BzR3Js6L1GYfOKQ7EwJgy23Lyf+md1CiXVmL El6pTxrNzscFxVFmBeD6XLUGz77CC3sKjvxbPMNndlwLnc4WGblklivT7i1+69nn5yRE PBMwJ6NBGZyrmI2/8nE0iFRqMAbRNAMzED3RWCMKcg5e4wp516ImU9gtdk1OntIC67Ox YAug== X-Gm-Message-State: AOJu0Yy/azJmb83KzlDGuBjFUAtiJx4odn5dip59ghbs+58M808F13TY nKN9W/fDlSKj+L0SaXSwTJNoZa44/tqIDPIyWsdpJ6ejCBL6z04P2j4rY82smHkP2ks= X-Gm-Gg: Acq92OEl4auP6POYFUFJnabIWwrcjHtndyt2UBP5sPRjImBEnae88c7iAWz//XZdh0g W+XvnICcjzUeXTWtP3xfpEmtULTXXZwNhoTp5Gq244iKlXZR0RGJlTIZbHY1FCabYGYdghtzskV Hwc4ilC5VcPlBU2OktaWGviorTl37i2JKdNrg51Ms68/YJ2C+xjiktrhj4kwe2FQGxNmqHZgAJg j7lO8BqdA3fNlH+aEORW9vz7ymZjUvBLctX6ug+DWEjjKjXO/Ra3Tu1Nj3dhmcsECYJs/RvP/sD pbSvmmjD7Ugrlf+zykJHEJiNbOszONJWlDHVQXgxcidA2LRC6sOfAppUuPPLWYQHvnyexdRCEo+ jAIOGX+8LcFPZGpgiuSGNPl8bVv1UFpTaB02tM7Kz/XeoMAHO4XHicahVO3pqzdeIFpyEqstc9t lHNRb+wUJfzCZonBJn+6eqAfkiH1J+rotkTA== X-Received: by 2002:a05:600c:3b10:b0:48f:e230:1d12 with SMTP id 5b1f17b1804b1-4909c0d2195mr43594515e9.31.1780049684855; Fri, 29 May 2026 03:14:44 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , John Snow , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v4 12/12] MAINTAINERS: add a section for AI agents Date: Fri, 29 May 2026 11:14:37 +0100 Message-ID: <20260529101437.410181-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260529101437.410181-1-alex.bennee@linaro.org> References: <20260529101437.410181-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.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, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1780049799802154100 For completeness add a section to MAINTAINERS to catch changes should we decide to merge this. Reviewed-by: Daniel P. Berrang=C3=A9 Signed-off-by: Alex Benn=C3=A9e --- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7eb5823da61..0a14b0aaaa4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4561,6 +4561,12 @@ M: Pierrick Bouvier S: Maintained F: docs/ =20 +AI agents +M: Alex Benn=C3=A9e +S: Maintained +F: .agents/skills/ +F: AGENTS.md + Build System ------------ Meson --=20 2.47.3