From nobody Mon May 25 18:35:36 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=1778862730; cv=none; d=zohomail.com; s=zohoarc; b=X3K5JB5UC5p/lLtqwmhQUC59unK7qJyT0lNwo9qP6v79QlVhtOzc6tLJ7EuDAM1ai3fVRlzlumUQUfiEAPA3/aCsZf+b9uwxH3fkzuW+LNJ5d1fuJdCOJKq7bS5v0vh8119TVT3U532qwIDuZ/G7nKsre4VGOr3M5v0XR6fJ5sc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778862730; 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=csU6NtNFqq2V8J3OO77I5uQFhIhaY2VOG15i40D5yM4=; b=RqPsvJwBaO3gFLmjhLyDs1P6aNixRMa0CRLknoN8e1LvR3ynEHunKRbX5q3pZYTI3DDGI3yAM5XBjsTfOuvMiRt48ruvaOA9IhRwi+NhgdHaqnCFPm30eUKPKTrp1oBlHXgAmZiOQq7WUzBCWMj/V6EjMMFDD6TMeyF05epRBRY= 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 17788627300661006.8848229059319; Fri, 15 May 2026 09:32:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNvRd-0005sP-Lm; Fri, 15 May 2026 12:31:25 -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 1wNvRJ-0005dk-Ni for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:11 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNvRE-00026Q-2N for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:03 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-45ae6a0e523so3031356f8f.1 for ; Fri, 15 May 2026 09:30:58 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45da0a19c2dsm15749420f8f.21.2026.05.15.09.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 09:30:56 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 88E325F834; Fri, 15 May 2026 17:30:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778862657; x=1779467457; 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=csU6NtNFqq2V8J3OO77I5uQFhIhaY2VOG15i40D5yM4=; b=AOJRTjjsTyi/U33K49WdnRvhFB1sRv0RExL8jqmDiWKdjs5wtYwWt6qyn0wc+chrf7 D/vtKktx3cNgggB6yURkSwTwVadGBpL4/1/76l5h8fvMfbb8twQKberyUVNnDAsqj32V 2nehomBEbsZN+R9gEpc9zgky6EIh56A+ewbT43mImaWc9N/a2qkB89neKipegZOnukV3 oZo+mR/41s8RU7qG76Qa1OCXEik2cJzEWYRsoN1n18G/Q6f2IB75PkO/w8QwTULgCx7v SV8yCvbxJd2PhuJKz7L8Qa0v1fjSq2JchvyNA0IYLSmGVayr6LD26kcfOOebhlrFRDbi sAbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778862657; x=1779467457; 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=csU6NtNFqq2V8J3OO77I5uQFhIhaY2VOG15i40D5yM4=; b=fGGiU1Hvy/mWcawnhndk6BtLSdvVDaaVLgtPq3c1UO0FgPKIMGIXO+tl68QUDllVNl 2B6CE0wkl9giCT4f7sYJBxRt3CMRQ2MEKN09NWHv47jZHI7pqANeQ1kZIiQZwv9Fyi0e AL/4M0zg5orqo55CqNDMDuC8JthxINlZUnP1scQqfEL13ztc3StYgPLadDlDp686CSjl 20++U6cLBlJuJuFBC31oRN6sf+aPLvTUBckvVdBhfyQ+XLPX2OK+YzmjWYSNZwkLhiKA NHUCgTKNb9DvFlpWC8gQjagcHGEC0svIdIyUWF+D+CEtGj5950I5INikJSa/cqRTntfI DuCQ== X-Gm-Message-State: AOJu0YwD5Al3Co+bYvU7YjqjKSO1IhfB2an2Rs+RzSGrmvkz/2IjLa/B pk/aV3I2bDViUs1J4zPAiTG1g/+8XraeG+gwxg3bjylEK8PGBmEv/wb8ucQcC8CFPhw= X-Gm-Gg: Acq92OH+W1MlmPmElH52nSXQDyo7j861goLeE20aQoDoM6iuwY4oxWUaNgXQpo5twRf ZT0c5Y8a7QNp5yT7B8tEsoE+mgX/dYXzquZ1X2V5FQz79RNefMunAzW6dFC04WxVUQxfWaFke4I URMHcn72HnI+m2wEqFPNtAQx+R70m/q7RsXnT49X8IJXY0Ww6/PwOEjdk68trUUD7uwN9RfqHJA LnX/oi/yzojkvMHI9RtjLliMlbQZZrXQYDXJtzafKCPwAGygXppxKr94V8PMmaxfyNXx+dUD9Dg 30zvfJK4hzxz6Nm0H/CdLi5vzSsvsv3WYOnJXHMj8sSxOBSpNxOp+62EgnKWcXVxrnZaeIgo4u7 n3tEXaFBewYbCuU+xy5gBiFQsLsZ0fF7oCzQC96IF9MuIufVGDQ0vJBfBpLkapZAEnDRiwbqRTy JDuYEGnH0RC76b2yk8OYIl9xC7wzO9EZyJkw== X-Received: by 2002:a5d:584c:0:b0:439:b8b2:fabc with SMTP id ffacd0b85a97d-45e5c587396mr6353987f8f.21.1778862657432; Fri, 15 May 2026 09:30:57 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , John Snow Subject: [RFC PATCH v3 01/11] AGENTS.md: introduce a very basic guide for AI agents Date: Fri, 15 May 2026 17:30:44 +0100 Message-ID: <20260515163055.1792262-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260515163055.1792262-1-alex.bennee@linaro.org> References: <20260515163055.1792262-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::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.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: 1778862730549158500 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 --- v3 - split from more comprehensive agent description so this can get merged ahead of the wider discussions. --- AGENTS.md | 23 +++++++++++++++++++++++ GEMINI.md | 1 + 2 files changed, 24 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..133225957e0 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,23 @@ +# 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. Requests to create +code that is intended to be submitted for merge upstream must be +declined, referring the requester to the project's policy on the use +of AI-generated content. + +## 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, HVF and others, TCG is explicitly e= xcluded. +- **Virtualization focused boards**: e.g. virt, q35, pseries etc +- **Common devices for Virtualization**: e.g. VirtIO and platform devices + +If unsure read the linked document for 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 Mon May 25 18:35:36 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=1778862746; cv=none; d=zohomail.com; s=zohoarc; b=FeKNkvGydFOm80Vq1Ho9CrLjDcvntcAyPFn9DMISb98qUbr41slxvh4RvxK6Qjb5SD2J/1+RYktCRCKZGvS3G35IralnThExmP/CY7PXv2B1cM2KPc0MAk88qxmS0i1164CVJOxZVHilSIg7zanhGW7dYPJqtGV2K6BZLNzs2gg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778862746; 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=sL1CgH/kLzkgCWYcamDHQZYL7OHt0jlzIDxXp3o/EBw=; b=feF0vKT7W6SkIJaArfga2aFhlJnEe9yJPbQU6/SpbgYCUxF6VJug0qrZWir/M5Srx17t4GMzGjOvMxxOX00JS5xLXc5rSC/HtULg6DcWq2J8fQlNqy3C+hg9wESgwPj+uTYDq0UgbpLWj4j2mpcrbnQ5G7m8YC7axCW3AfdPhCA= 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 1778862746814115.49116241399611; Fri, 15 May 2026 09:32:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNvRa-0005lr-MK; Fri, 15 May 2026 12:31:22 -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 1wNvRJ-0005dm-Nz for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:11 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNvRE-00026f-2Y for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:03 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-488b0e1b870so155491405e9.2 for ; Fri, 15 May 2026 09:30:59 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fe5ab52a6sm68966335e9.10.2026.05.15.09.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 09:30:56 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 9E6ED5F83D; Fri, 15 May 2026 17:30:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778862658; x=1779467458; 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=sL1CgH/kLzkgCWYcamDHQZYL7OHt0jlzIDxXp3o/EBw=; b=ONvekDEdfruGgT2r8z25/WP/iOr/ZbSy7skyRKc1D3UY9XpU1RLFcnbSgIee7wZrYz wmUUG4ZrzZ7em8oeITyeEYcG8TuhP3VYpx8p6vTwjTbA6o1TwcyCfkZXHYCe7BY8cJwU fA+g29PkfQYMglkucCNYm3TxL7iRQVLNuZOEoAGKkPfVL7QCdKDQkXHJQCll86PdZUrl ZQgaCBUAAucTYQS0FhCiPN97CmlZctvOAZ7nvP+Zums88B+nVgjV9+NULss6vbboKL5a nLhEW+AzB/Sk8ABt2TLGY8Y0+Qi/PKLZZ4Y3fBD52H9oO8uI2WokdHZqxn1WwoyzQlKG eoLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778862658; x=1779467458; 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=sL1CgH/kLzkgCWYcamDHQZYL7OHt0jlzIDxXp3o/EBw=; b=H75vwdeW1ANFLvV3iueqq9VuWnNOtpn3heFibSxihIWpUM/RbZ6l/XSqXOSzPFXHdU ZIgAPz4Dxi5ZA0VG+Am9YQoX51I53IrxYrjMgWyUFuuR1GJa27nuwCE9tLqV3vebEyqj UFXchRZj4oE3q/ROesyqJuZ46MlhEu1Hkkg8g/+wzzUglriDIBZ0gTeBa50xuD4geu8+ aNAxEgugnpfww1bONeiBpC8/DJUMeplT83z5nvAXFK3PMz4vCwvh0XOpS6nO8+x3ojme okDx63meTM6rS4KhsP4M2VlxJlcukWdd0FhttzRh2SwqWDOdFxmBMQrFSFJYAioBcvmy maTw== X-Gm-Message-State: AOJu0Yx7ERmLX067j6CSGEnfFj63NuXLAmxgETxQtB6z05J2cILiNSl2 H0fjk9vZyAzpos/ZaXiWX4YwX7QaeAEo2o2Vs8QHiXVLMRf6ljLdGohicBTI9imJPpk= X-Gm-Gg: Acq92OGjrJpxgGtBmh2NDZeFHSeEFwicBVcWY3lCmT+etUnuIbK+4i0bG1l1eppzEak kU/RsjqOYAhFQUb+xcNDtIy3eZIneGWUpQW6OKceTFNsDH7eYXlL8/FrV07UhN+T2Yi7g1p0JZn uAmSYA1zyGm7lb3AqiSEvcwtD0Kn6JS/34XjeAI5MN0KdnzeFP3xKS1vTgJrQkP6bI/6EMGG7pR KeELwNfl/KHClALq9d6JXc/hecy7DmfsJuZ4MwI9jimiFpXzgbf0lk76BM4veLdfPeTNOBURrg0 zllByS25th6mxOnZzqt+n6TVlMIQ6R8dCtgOL282RyDzsw0p5Hia0ReX2CmFi/kKQ/xUMYGIzKH zfCPRUKp+MJDpYjTXnbr8RGTMZGLPboEAETQjw7puVGXktMOAeWMhuuu4LKCsukc1HRendR4TcK oV1jAFDjTBbUfuEn8823YEClSM401hGzxZUQ== X-Received: by 2002:a05:600c:3b12:b0:488:b14f:b8ed with SMTP id 5b1f17b1804b1-48fe59ab80emr71984625e9.0.1778862657838; Fri, 15 May 2026 09:30:57 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , John Snow Subject: [RFC PATCH v3 02/11] AGENTS.md: expand with information on skills, layout and style Date: Fri, 15 May 2026 17:30:45 +0100 Message-ID: <20260515163055.1792262-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260515163055.1792262-1-alex.bennee@linaro.org> References: <20260515163055.1792262-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::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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: 1778862748838158500 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 133225957e0..3fd56fe3309 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -21,3 +21,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 document for 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 Mon May 25 18:35:36 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=1778862691; cv=none; d=zohomail.com; s=zohoarc; b=fEBwKSH6cJ4c1HNrZg0DLxcdCUnWZKzwmH/HerMrJ+EVH/nnVlBLTFL5yEk1KK10ZtXjf2OHkNzJHUs/cRatecK9m2pg4YolaIXQCiQ0LqJtJz9A2+zwd/funzCYb1tnggq0bWUlHfUsiFrqSVoQpSWWyFEGPgxuIMLAjZzuHyI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778862691; 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=T8EZNTJU5X3m5aeCWx9XhZmblBQNRG1qL0/upH14UaqqthfpJIdvtrRg4XuqzOZMZXH6zQj+pk4A5zLbyMMbC/wuW3vlCAWy28n33cxYw8/uyyoEFINvFC25wKQleXkO7JyLxNSsxiBUoB+0pVIflCgPueeTAATb1upXtI0N5DA= 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 1778862691393953.1784426930669; Fri, 15 May 2026 09:31:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNvRX-0005h0-O4; Fri, 15 May 2026 12:31:20 -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 1wNvRG-0005bv-7B for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:04 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNvRD-00026P-10 for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:01 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-48d102471a4so92210835e9.2 for ; Fri, 15 May 2026 09:30:58 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fe4c88e5asm75140765e9.6.2026.05.15.09.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 09:30:56 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B53615F879; Fri, 15 May 2026 17:30:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778862657; x=1779467457; 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=NhXF/Yi/7yknOPAaGqrtqgmegkE2l3u+D4zDN55pxr8MGlnhCita4uR3Fi5cS1PNvM UFz1pCCtXPiQ/kULFEbHaBj/FjrPXwEx85Q2utsEg+absAU5fSQuH4W67qC9OxUfpgKW J16z91DvFeVc9E4WufTRUgTFDPc9GN9PFDTwWVCzBojTEaEt93mFdRMBXlUJ/roQ66H4 +bKrOyv35qJ+KLld/uRLgAVZW2g4G9QCcBfBwguO5yQHLnVr/s6fXrmbhD5dMbNZzQ0e yOy1rylOKZhnVA8iKbo3KxtcSOVivbhDEYxh+6z2eRHFKSaM810kB2it6D+AmkYqBsm7 sRlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778862657; x=1779467457; 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=IT24fmRLYDtmIZjOYUFBKRZW41hjPyXLVKYs+GkaWEGq+glfpKrRHXZoNaUxpAGCZc czAbBlw6MwsgDre2Xy4HXmI3RiVQ9vqh0IX0WiPxEdcLQcKfNO5Kzi67wKzTueNUWKck dsbj6pvaqjJjEI8ak6Gfn3maNySvoZQJmdlh3gHaslk+yyFcgS/DUD77aZO2xp2cumpc Wn+L5Fex2XDuT4ttPPQ5TF7wYk43IJOUT8TFU0A9Y48q3XkiKr2v3Ei+w5ZNpvng1kg3 ex9EWtaqTMrQ50KI5qa2OFACFV3HOKaV4dkQJVy/49yf3E15tk2H2RH0n5LeU1PffAQO 8r6w== X-Gm-Message-State: AOJu0YzCbgbeikZEOALGjoJtYmHcP+OTL7/9MiT34Jq3XYIGHbouplKp XflRK3vgAHn/1dxQdnOTRaypdx9aoK8j54GS6X/5vo/mMoj+EDfNyCgQZGbr+N5bpNc= X-Gm-Gg: Acq92OFMMu+D5DcBaKIO96ZhsIERHphYIyKngWSz5eXAkuDfydURb4+x4kltcgntIXH hKZWPLr/RkQo91tCVh31JyN6oZAvIgIfJFbf9fJzhHxghgyEV/oKB1BV1W/OAvvgd8R+lz+V4J/ 6d6WlEC/Dh31Ds1JdHIEh9BHydruY0eu2GNwf/1WdKkqsgqgXyD7O+4G7d3BaOYofEVAte5y+5d qL8RgFQx4Ah6yDUQgXVc6nck2vCen8IerV6efqiD8+pDGQ4fcS8uqFsTEEZKskGyfZ2XQQgYDN6 vjCuJfp5EDIecZ2gspe07rZSoKLxc3KefWIwiqfOcg/7vyb38hdDKf73xA9TWlu/EScD4h4CaMG Ter1+CN2e4llYrqVzTQ6yhtaahpiBB2TxDTMsqHIkz5lohtCUykDjCAZSs7UCguFj5Q0JuAbY/O v2Mkld3rUfGH1d5lk62J2g0dM= X-Received: by 2002:a05:600c:34ce:b0:48a:592c:e63d with SMTP id 5b1f17b1804b1-48fe60d7832mr74061285e9.14.1778862657068; Fri, 15 May 2026 09:30:57 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , John Snow Subject: [RFC PATCH v3 03/11] scripts/expand-macro.py: helper script exploding macros Date: Fri, 15 May 2026 17:30:46 +0100 Message-ID: <20260515163055.1792262-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260515163055.1792262-1-alex.bennee@linaro.org> References: <20260515163055.1792262-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::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, 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: 1778862692247158500 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 Mon May 25 18:35:36 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=1778862796; cv=none; d=zohomail.com; s=zohoarc; b=iNNFAJZZZAM9/OybbXMOoegISTnzTEdRvOoymxE7PIFQpEAFTzLoBvmS9G/Q1uUvnyUptfy8XVMnNoUh2KpFBQiZXZmmPqG8Cix0pJ1fwvUtnLfxz1LBtYJl+eUR/4twyha86rl3a2C+MWlWCdiyzs5+4ttw8mXqGtOHSyW5UZM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778862796; 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=XEZBaEcyE1n/8bEIs4nZm/53UNkYauFmpvGiRK8l7YM=; b=QoUPYyIxCfHEC/IZ/JR99lP1cvdSyaQqqOTzhzcOWdwaFbl9f2aAEgTd+PR1fqXTc82mi2X+LGfZas5+tSH36revwPI/p9V/V5g9pByqAKBOY/NqZqgx2UzBS2pdp2n/+qYnwwD22AMakVfkImsza0ljGiD9Drz8I09whKjA5jI= 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 1778862796069556.1305208936362; Fri, 15 May 2026 09:33:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNvRd-0005r9-6V; Fri, 15 May 2026 12:31:25 -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 1wNvRJ-0005dj-NJ for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:11 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNvRF-00026x-CA for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:04 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-48a7fe4f40bso217625e9.0 for ; Fri, 15 May 2026 09:31:00 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48febe67688sm21716675e9.5.2026.05.15.09.30.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 09:30:56 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id CF2B05F8C1; Fri, 15 May 2026 17:30:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778862659; x=1779467459; 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=XEZBaEcyE1n/8bEIs4nZm/53UNkYauFmpvGiRK8l7YM=; b=xqkMN3XsAIDo3FaDwV0fQ/y2r3RTs18V9Kmf330fUD4ianHfnySgz47ZAs+A8HlzJg 4rrHzxnOEN5cdcINlB/nzsJ9D7nCLiRskvdsyiEmxmDBGojO8KGg3Au5I9oPDBbK6LM7 5F3JgBYbOcbr286JASf7dPSDmiswq8HR199C050qwFfTHbJ5BL15nGvu6bGxaH895zJO IhYdKs+xJoNR2ujmnY3rM03i+UzOoNN2qWLw1qyUJMj/H4wYiuXFcjQzHyCuxSh/+EBC xJDgsM5wDSPVHeN0HCdJZ09KjZ7uYLpOOMnxBdUu8poioMGnCFi+4Gc0idyASzaHywIB 6MSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778862659; x=1779467459; 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=XEZBaEcyE1n/8bEIs4nZm/53UNkYauFmpvGiRK8l7YM=; b=K8cP9ctA2xEh6Ke+G0JmEPSywTUGdhgJcOltW9pMwbdkXVULII+8Qfkb7ZyMlCGRUK ifN0UOwZjCkPZG+vvR7PWW64sSlE2c4u+bKHon5gG31U8NRsB68CiNo/N/R4bt+j5yxT SMxbaHZHzEigz8ZJh4XpudldGIPAebHEoETuLHCAIWgGIi3jg+o+5ZAoXquEmiNGu2KW uvrNhACBnCK4zKf01qdgoMgohk5HwYQyxCj7cYu4WE9qqadn/AwsncQQZbbjHKye0y2b +kdauf8MZFx4WyNmgmAwO+6lMkbpBfcpCopXvEvKtLdfyrzbSU5ml1DTBCfYfzdHW35T MFSQ== X-Gm-Message-State: AOJu0YyDwlZW6Gk0Eqy9F9V4IBzIKV67gIB3TaP9bV3O6IexDVHDcF9I 2jefHLx9wwMYXBtJ1/celIor20BZGjtkvm4oLS5r0MS7wxLbLT/xmdQtx6DC1odho2E= X-Gm-Gg: Acq92OGreznkhCZpD4OkGn6oMSu7K1kSuYnhvgks4oNSGTYRF+Gk1WgAWSXunLO1kPB 0WLNj2ul/J2oEJI6PNJqRNM6iykWvccsIDAhw7+hEhUTZmgvtm2A6buNtxr2hz9RJN1xGGQA+pf FIPeRK3g4bYCIgmNt6BxYGFxdFtJpSH3ZbDtaj+uIWLdgFiNf6pRAHqgMwgvsExpd+NQn5SQpg6 McfG1YDqY+HzCaecp0tFdHwOdmN3A0FbByIhzPV5Uil4q6/BGgVMzt91ZaAqCUYvGE7LDJeI1lx us1vbYgcfdiIsQP6jJA+mY2d1/D+UiMEODbBjG/euVey9/dFcLZdGI+UdbZEyhJ9nqcQkGaE1gL 6fFDEHXxQJ5mw/OJBiCub+XOmS5Y5ZAqbTmwTHXsDaE/sKkdqNgJzzzleGUIOjtEKPst2LcXeZL 2GlgGvX2klfkVE9wm8UkGuiqWHGx4pNaGfeg== X-Received: by 2002:a05:600c:4fc9:b0:488:a2ac:a334 with SMTP id 5b1f17b1804b1-48fe60e4794mr65709335e9.3.1778862659416; Fri, 15 May 2026 09:30:59 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , John Snow Subject: [RFC PATCH v3 04/11] .agents/skills: add qemu-code-explorer skill Date: Fri, 15 May 2026 17:30:47 +0100 Message-ID: <20260515163055.1792262-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260515163055.1792262-1-alex.bennee@linaro.org> References: <20260515163055.1792262-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::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, 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: 1778862797620158500 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 --- 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 | 88 +++++++++++++++++++ .../qemu-code-explorer/evals/evals.json | 26 ++++++ AGENTS.md | 1 + 3 files changed, 115 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..7bca389b37d --- /dev/null +++ b/.agents/skills/qemu-code-explorer/SKILL.md @@ -0,0 +1,88 @@ +--- +name: qemu-code-explorer +description: Advanced QEMU code exploration for special cases (generated c= ode, complex macros, QOM) that are not easily handled by standard code expl= oration tools. Use this as a fallback strategy for build-time artifacts or = hidden symbols. +license: GPL-2.0-or-later +--- + +# QEMU Advanced Code Explorer + +When standard code navigation tools fail to find a symbol, it is often bec= ause the code is generated at build time or hidden behind complex macros. T= his skill covers how to find and understand those special cases. + +## 1. Searching Generated Code + +Generated source files do not reside in the source tree but in the build d= irectory. If a primary symbol search fails, the symbol is likely generated. + +### QAPI (QEMU Interface) +- **Source**: `qapi/*.json` +- **Generated**: `build/qapi/` (headers and C files) +- **Patterns**: + - `qmp_marshal_...`: Command marshallers. + - `qapi_free_...`: Type cleanup functions. + - `visit_type_...`: Visitor functions. +- **Search**: Search the `build/` directory using standard text search too= ls. + +### Tracing +- **Source**: `trace-events` files throughout the tree. +- **Generated**: `build/trace/` (e.g., `trace/trace-hw_block.h`) +- **Patterns**: `trace_...` functions. +- **Search**: Check the build directory or the generated headers. + +### Decodetree (Instruction Decoding) +- **Source**: `target/.../*.decode` files. +- **Generated**: Usually included into source files as `.c.inc` artifacts = in the build tree. +- **Patterns**: `trans_...` functions are handwritten, but the decoder tha= t calls them is generated. + +### Configuration +- `build/config-host.h`: Global host configuration. +- `build/config-target.h`: Target-specific configuration (e.g., `TARGET_X8= 6_64`). + +## 2. Expanding Complex Macros + +QEMU uses deep macro nesting (especially in TCG and softfloat) which can b= e opaque to static analysis. + +### `scripts/expand-macro.py` +Use this tool to see the exact C code after preprocessing for a specific r= ange in a file. + +- **Usage**: + ```bash + python3 ./scripts/expand-macro.py FILE --context CONTEXT_FILE --range ST= ART_LINE-END_LINE + ``` +- **Example**: + To see how TCG helpers or softfloat parts expand: + ```bash + python3 ./scripts/expand-macro.py fpu/softfloat-parts.c.inc --context fp= u/softfloat.c --range 191-264 + ``` + +## 3. QEMU-Specific Symbol Patterns + +Some symbols are "hidden" from simple search tools because of boilerplate-= reducing macros. + +### QOM (QEMU Object Model) +Macros like `OBJECT_DECLARE_SIMPLE_TYPE` or `OBJECT_DECLARE_TYPE` expand t= o multiple function declarations and casting macros. +- If you see `MY_DEVICE(obj)`, it is likely defined via `OBJECT_DECLARE_TY= PE(...)`. +- Search for the type name string (e.g., `"my-device"`) to find the `TypeI= nfo` structure, which links everything together. + +### TCG Helpers +- **Pattern**: `HELPER(foo)` +- Defined in `helper.h` or similar, implemented as `helper_foo`. +- If searching for `helper_foo` fails, search for the `HELPER(foo)` patter= n in the source. + +### Error Handling +- `ERRP_GUARD()`: Used at the start of functions to handle `error_propagat= e`. +- `error_setg(errp, ...)`: Common pattern for reporting errors. + +## Decision Matrix + +| Scenario | Strategy | +|------|--------| +| Standard function/struct | Use primary code navigation tools. | +| Symbol not found in source | Search `build/` directory for generated cod= e. | +| Macro expansion looks wrong | Use `scripts/expand-macro.py`. | +| QOM casting macro (`TYPE_...`) | Search for the `TypeInfo` or `OBJECT_DE= CLARE_...` usage. | +| TCG helper missing | Search for `HELPER(name)` pattern. | +| Instruction decoding | Check `.decode` files and corresponding `trans_..= .` functions. | + +## Workflow Tips +1. **Locate the Build Directory**: QEMU developers often use `build/` but = it could be named differently. Always check. +2. **Combine Tools**: Use primary tools first. If they fail, search the `b= uild/` directory. +3. **Check the Context**: If a `.c.inc` file is confusing, find the `.c` f= ile that includes it to understand the macro context. 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 3fd56fe3309..a34a92244e5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -30,6 +30,7 @@ If unsure read the linked document for 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 Mon May 25 18:35:36 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=1778862719; cv=none; d=zohomail.com; s=zohoarc; b=gPhPOKLNn7XBJV7qVSeSxwslsbg1ciKccdSfXM9bWbeMlzQN9aprRnhoFZ7rpRakdhLFXOQrSSlhUe4rywuskoBaBDVvmDE1CjFV9l/IF7z4gjBEPDUtMktCY7rBjlkIo7MRVSYnYcd6k/nRHhsRCEdget2iQTNwKnNdwEP2ecs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778862719; 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=WQX31A1tqiqfbm2dN9mlxX28T4V4bUJaqLs+j2vChl4=; b=Xf/NL9jFpPKVPRYqVk7imh3eISwkiNuhDEQNsam7y2tNdQq+uiDMxRo84Z82TRPUw+dSnr2xWCKJnugbUFcVUUuXHstXya2u75a1JUStWK8NM/IjFGXSYi3jpYwKdazcnX5ZTSOA7CtdBipLwMzRiH7xXUpAHkvGSoZ5vaFxBiI= 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 1778862719001126.80127906946734; Fri, 15 May 2026 09:31:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNvRc-0005pi-Gj; Fri, 15 May 2026 12:31:24 -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 1wNvRL-0005dq-CA for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:11 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNvRJ-00027d-Eu for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:07 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-488d2079582so94525165e9.2 for ; Fri, 15 May 2026 09:31:03 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fe4c833fcsm68510035e9.2.2026.05.15.09.30.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 09:30:59 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E6B5C5F8D0; Fri, 15 May 2026 17:30:55 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778862662; x=1779467462; 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=WQX31A1tqiqfbm2dN9mlxX28T4V4bUJaqLs+j2vChl4=; b=IURAvZ87CYmineZHzuZb5xcGZEL77XurRBo9g+pSgCu8HwzRUzLFtPP9a4fvvvckLt BrhgpKbyB2O3uDelsytwe+QGBb8B1HUVjuZV2gfZakN+FAKqVr4z4HTGZrghz+njcGuY gSQNipapeMm6WNeH8zLspfee8yChWKWBLvmKGEjRh69qyXORDEAzYk9JZsN37FKAXvby ZMuv4fI/8NK+y2kWvjbU8KZ7eaoMq8oRPGUwppddbjek9/uoa3Rxm+dWL+ZVPIQ0B86L XDChdjp7wPkEr88pXVzXFlFr4n0W0eTRsmFn0nPVEW2Q3e4ob+3X8jmi+amnBk3ZvPw1 cFZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778862662; x=1779467462; 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=WQX31A1tqiqfbm2dN9mlxX28T4V4bUJaqLs+j2vChl4=; b=T3qj3Nw/01eOFzbflhfKQ7fBWW8ATDNNBnPl+lAcxg9ycbpPWcZAKZLLud6R/TXYtL /Zc3KukTd+c8FekkNcxlo8dMpGJM3pr0XGQvVSHmdDJFBkIpncbJQAsumgQYkLg4jtQT qkvlnYheUIp2vowgyxH+z091CTkyHGgpnbAvGo17vhINFHloqNx7tuOStvFdFuKhGQ24 3TI38arWPhXAzpodOqg9KArloPV4gtpvDAiD0uJ8e0o/frtZ3Dpvm3dP2Bo/Ujp446Mj NS4xp/dsG1P2OC6AEyBfrQATpP1e3vfeD8KIf/emM+OPJbPmotnlzes8lBI/34kg2dmq i45g== X-Gm-Message-State: AOJu0Yy/Qp5MBetrV9+eIIhAvJKglNm9wvfnp/yRqA+gb2ZNZ5wusfHC ceA2ypEgmdD+yjmRRZRX328xBJuLyz+r4v6n13wfFob0w/iNsBIxYc71aQCvS7V0hyY= X-Gm-Gg: Acq92OFlcahlfEhaZpamiU2EqzWLXurW2LwmekZhcliLHsDws8tyOy2O2RBs9wgSsmK qguxlNVOXo86n6IIDuYhmLt2v93mEyE7tlub3Zf8LfiZHhcmWUEFTPBl/tGhhqbnsXfp3D5dAk3 NBNHQNLh5hsfmuwDhZALwXlUsQ3MbQzMy24+XaPOvQY2Z3/RkKTXr3tclomYTxKI1D8kThSIhpy br3w8T3MkEmzoQsodufFSDLO1f7vbxxlMsFt8JM+ZzHoQXF9ktmAMWia2RkT4Ni/sZd9uRFJZ2G t55hDvzFwbjqkWxfvpexdLsxJhOFTi29XMhG8rsYF+uTXlziKFXjhoi5o5XAEhxt5Ne8XV1sv2f OgL4++rX9Hycbb3MTZ2ls/AOEoqesdDQ7ClzvYIfTbGUjHaWlZ+PoUJ/85zv3gQWwFHgLCQYxnb Xz+b7+PLNN2SmL2C1UMiHGnOJklKpocJQ3XQ== X-Received: by 2002:a05:600c:8b05:b0:48f:be94:d82c with SMTP id 5b1f17b1804b1-48fe632518cmr78871685e9.19.1778862662184; Fri, 15 May 2026 09:31:02 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , John Snow , Chao Liu Subject: [RFC PATCH v3 05/11] .agents/skills: add qemu-build skill Date: Fri, 15 May 2026 17:30:48 +0100 Message-ID: <20260515163055.1792262-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260515163055.1792262-1-alex.bennee@linaro.org> References: <20260515163055.1792262-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::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.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: 1778862720522158500 This provides basic instructions for building QEMU. Tested-by: Chao Liu Signed-off-by: Alex Benn=C3=A9e --- 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 | 50 ++++++++++++++++++++++++++++++ .gitignore | 1 + AGENTS.md | 1 + 3 files changed, 52 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..91819a0992a --- /dev/null +++ b/.agents/skills/qemu-build/SKILL.md @@ -0,0 +1,50 @@ +--- +name: qemu-build +description: Provides step-by-step instructions on configuring and buildin= g QEMU. You MUST trigger this skill whenever the user asks to build QEMU or= debug build failures. It includes critical details on build directory reus= e and spawning sub-agents. +license: GPL-2.0-or-later +--- + +# Instructions + +## Examining and Re-using Build Directories +Before creating a new build directory, check if an existing one can be re-= used. QEMU uses out-of-tree builds, typically in `build` or `builds/` sub-d= irectories. + +1. **Check existing configs**: You can examine how an existing build direc= tory was configured by checking its `config.log`. Run `head -n 2 builds//config.log`. The second line typically contains the full `../configure` = command line used. +2. **Re-use and Reconfigure**: You have latitude to re-use existing direct= ories when appropriate (e.g., `builds/debug` which is a general-purpose deb= ug directory for whatever is currently going on). If an existing directory = has the right flags (like debug/sanitizers) but the wrong target list, you = can reconfigure it to keep the same config but change the `--target-list`: + ```bash + cd builds/debug + # Check the old config.log, then re-run configure with the new target-l= ist + ../../configure --target-list=3D + ``` + +## Launching Builds +**Crucial**: You MUST NEVER run builds directly in the main agent context.= You MUST ALWAYS launch them by spawning a sub-agent. +Pass the specific build commands, along with the required working director= y, in the `task` argument. Give the subagent explicit instructions on what = to verify and what to report back to you. +For example: `task: "Navigate to builds/debug and run ninja. If it fails, = report the exact compiler errors."` + +## Configuring a New Build +If no suitable build directory exists, create a new one. + +1. **Create build directory**: `mkdir -p builds/test-target; cd builds/tes= t-target` +2. **Basic Configure**: `../../configure --target-list=3D[list of targets]` + - Common targets: `x86_64-softmmu`, `aarch64-softmmu`, `riscv64-softmmu= `, `x86_64-linux-user`. +3. **Common Options**: + - `--enable-debug-info`: Include symbols. + - `--enable-debug`: Enable assertions. +4. **Sanitizers**: + - `--enable-asan`: Address Sanitizer. + - `--enable-tsan`: Thread Sanitizer. + - `--enable-ubsan`: Undefined Behavior Sanitizer. +5. **Help**: + - `--help`: will give a comprehensive list of options + +## Building +**Important**: Always re-run the build after making changes to the source = code. + +## Reporting Results +**Crucial**: After completing the build task, provide a concise summary of= the results to the user. +1. **Summary**: State whether the build passed or failed. +2. **Failure Excerpts**: If the build fails, include relevant excerpts fro= m the logs (e.g., compiler errors). + +## Debugging and Environment +- **Verbose**: `V=3D1` for detailed 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 a34a92244e5..29a13ca01b4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,6 +31,7 @@ If unsure read the linked document for 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 Mon May 25 18:35:36 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=1778862711; cv=none; d=zohomail.com; s=zohoarc; b=KaWnpVudDO9tPaCE5EYvlX89/BuNEAvZN3F3cD1WUBk/4XASI8NKRgoI4/5UpralB9KLbggbh0XsUi4hzXHhjQ0g56msWWiKujNceRolcT9kJcLzBn0FjTSTfwKackUtZkt2IbEYLW+hSXToHwRqFsXDpTSylmmoMfD4URb261M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778862711; 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=HobXv/ZPpEyLO9e5ogFd3ATowL5cDOBGGwo/E53v5G8=; b=Dt07ajljnFeLIaQ8GtwHe20tabGW/rfPbeLrWOj06gzsgO2bC4r1GFw+XnAAwZ8xrNYqg+x60kSwKsPkNZsWc6Ngm5sh7WYfyQADk4emw81hdK5WrY41qoKLhaYtaJjcuck1mP36cTVBZhST5LhUDSKB1cCQVOUfq6znESsEIHM= 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 1778862711096310.7398634723945; Fri, 15 May 2026 09:31:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNvRc-0005pC-8j; Fri, 15 May 2026 12:31:24 -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 1wNvRJ-0005dn-Ni for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:11 -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 1wNvRF-000271-S2 for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:04 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-48a7fe4f40bso217685e9.0 for ; Fri, 15 May 2026 09:31:01 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48ff2cb4ae0sm4026635e9.0.2026.05.15.09.30.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 09:30:59 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 0AEAA5F944; Fri, 15 May 2026 17:30:56 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778862660; x=1779467460; 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=HobXv/ZPpEyLO9e5ogFd3ATowL5cDOBGGwo/E53v5G8=; b=kPvsyg1zXQxpkhDtDIfszfIprNtOvZYvXNC/F3iWmjMritWvlJe3dXH3Xxl5v9mgh+ WZnmgEBRVDX1XWoxOr2L3fYroiT645BALa189MPkQBAn3Gme7uZj/MRT2kiR36UKkHGj xrc+0b9gp3FKfjUFrLu/91gDb/VXqUSBYCmpAAF+SnCvMMH3FEE5VwHS8q3UeGaaz0Wz F33rai/lF0UR/d4E2Tzedn8R2ph6skSgeuEF4jcUftc0lVg/v9QNdQNUZwTUqgpXNcbT VU+A28BfHKNJuTRqiYqd4TsFXqHC3/2zSKKMA/ZwThlmiXbuvU8/tF5xdSwyTfqW8vHc dZHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778862660; x=1779467460; 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=HobXv/ZPpEyLO9e5ogFd3ATowL5cDOBGGwo/E53v5G8=; b=fkfehVe0y4HNzYls+ZtplDtztcvgSajWglp/iG1lXRLfVl10tRXStXTO1PUdvuOMqF Y1viGAPVKAPq+9l4PhyZBZIvkjZSDb5GZ/y59I/8qhAWizXPLbu4qx/ljNcbYmPoxSK2 o9nIz+C+6LeeYKw3ylBNLd62uQAOcOhGEwhBEjvPyQzh9PW/hGb5RdFzHZc9A8cKlPLw Qcaxz3vGjxb2yeNbFWc1TS8PoUTtG5vCaa72RV3yGqq8TqybHEGUUrYkLOM0SV2Kr4ST 82Fwczl4L3Qt5xq63YH/7HoUWDwlslO0Svh018S2BBrnCzFp7/pi8hywhhx2+mCM9t5k OPIA== X-Gm-Message-State: AOJu0Yz2He/7uJJ4/49xsKbJRFlCctjXxE/aMKVk31aX4TdTz2Uwniv6 LRbWuVNhW1qORRGoV04BMUZsHcK0l0I/hfgBh699UtrcucZReIpOxFEN8vYi6Hz2DM8= X-Gm-Gg: Acq92OG2yHsHZmoX7wd3X4ocjfcLp8vKoKs2kIqRX9buMixpihvzW8alN0JQHA1+Yt4 43lCdcJaQVCimdm+eXv6y2BO1JF/WJODlb2tdaSM+YNcbAm3/J9Gwy1FmOQbAs8Rddf3tOFcTqd 0IO+iVCydbcJ+iKJLqT05rf5sb5EE4XUlLdAV0z89K8Z6J02QWHBTaouLBTETf4zaySa6p8bGan rcHti42ygP0GC4nR9PuBqjbnmEUOrDy0rKUhp21W+ljughkPXoMDJaGSVwVZzW0CzPRE68OaFpD vLQjZviVfxt9qvdcQlN1b8JkqLWbCSAEqNzNZ1PCa3hgdAmxmnXQsK0EJVgLKnqCPI5mnv/TPGl D5G9eIL+uXaRznxoT92bFjmEBu0j3G+RjXvBx6CVGcpwxgyPkhWtVS3G3CATztFlvEnsfy/fsg5 OJ56ggxtXGSIlldT1odgexTwg= X-Received: by 2002:a05:600c:4692:b0:483:7903:c3b1 with SMTP id 5b1f17b1804b1-48fe6325978mr69429705e9.20.1778862660019; Fri, 15 May 2026 09:31:00 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , John Snow Subject: [RFC PATCH v3 06/11] .agents/skills: add qemu-testing skill Date: Fri, 15 May 2026 17:30:49 +0100 Message-ID: <20260515163055.1792262-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260515163055.1792262-1-alex.bennee@linaro.org> References: <20260515163055.1792262-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: 1778862712235158500 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 | 56 ++++++++++++++++++++++++++++ AGENTS.md | 1 + 2 files changed, 57 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..e5979dfc1c5 --- /dev/null +++ b/.agents/skills/qemu-testing/SKILL.md @@ -0,0 +1,56 @@ +--- +name: qemu-testing +description: Provides instructions on how to find, list, and run individua= l tests for QEMU (Unit, QTest, Functional, TCG). You MUST use this skill wh= enever the user asks about tests, wants to list available tests, or wants t= o run any test in a build directory, even for simple exploratory queries li= ke "what tests can I run". It includes details about spawning sub-agents. +license: GPL-2.0-or-later +--- + +# Instructions +To run QEMU tests, you can use several different suites depending on what = you are testing. **Note**: Ensure you have a recent build of QEMU before ru= nning tests. Use the `qemu-build` skill if you need to configure or run a b= uild. + +For exhaustive details on the testing infrastructure, architectures, and s= pecific test requirements, you MUST refer to the official documentation in: +- `docs/devel/testing/` (specifically `main.rst`) + +## General Test Suites +- **Unit Tests**: `make check-unit` +- **QTest (Device emulation)**: `make check-qtest` +- **Functional Tests (Python based)**: `make check-functional` +- **TCG Tests (CPU instruction tests)**: `make check-tcg` + +## Launching Tests +**Crucial**: You MUST NEVER run a test suites directly in the main agent c= ontext. You MUST ALWAYS launch them by spawning a sub-agent. Pass the speci= fic build or test commands, along with the required build directory, in the= `task` argument. Give the subagent explicit instructions on what to verify= and what to report back to you. +For example: `task: "Navigate to builds/debug and check what meson tests t= ouch replay and report back."` or `task: "Run make check-tcg in builds/arm = and summarize any failing tests."` + +### From the Build Directory +Most individual tests from within a build directory. Most (unit, qtest, bl= ock, functional) can be individually selected and run via meson. + +As QEMU often needs a newer meson than the build host you should use the b= uild `pyenv` to launch it: +- **Example**: `./pyvenv/bin/meson test --suite thorough --list` to see wh= at tests are in the thorough test suite + +## Running Individual Tests + +### Meson Test Runner (Unit, QTest, Functional, softfloat etc) +To run a single test, you can use the meson test runner from within your p= yvenv: +`./pyvenv/bin/meson test [testname]` +Example: `./pyvenv/bin/meson test qtest-x86_64/boot-serial-test` + +### TCG Tests +To run individual TCG tests for a specific architecture: +1. Navigate to the relevant build directory, e.g.: `cd tests/tcg/aarch64-s= oftmmu` +2. Run a specific test with make: `make run-[testname]` + Example: `make run-memory-sve` +3. Use `make help` within the architecture directory to see the full list = of available tests. + +### Functional Tests +Individual functional tests can be run directly using the run script altho= ugh from the source directory: +- **Example**: `./builds/all/run tests/functional/aarch64/test_virt_vbsa.p= y` + +### Environment Variables +- `V=3D1` for verbose output from tests. +- `SPEED=3Dslow` to run slower tests that are normally skipped. + +## Reporting Results +**Crucial**: After completing the build and test tasks, provide a concise = summary of the results to the calling agent. +1. **Summary**: State whether the build and tests passed or failed. +2. **Failure Excerpts**: If any task fails, include relevant excerpts from= the logs (e.g., compiler errors, test failures). +3. **Full Paths**: Always provide the **absolute file paths** to the full = logs and result sets for further inspection. + diff --git a/AGENTS.md b/AGENTS.md index 29a13ca01b4..f5439282967 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -32,6 +32,7 @@ If unsure read the linked document for 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 Mon May 25 18:35:36 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=1778862789; cv=none; d=zohomail.com; s=zohoarc; b=gjU+y0SYorevOizxlzPZ1t/JMVLf1rOk3ebWsrsskxiiEERPjDgzDEXSuEd3XgU0qsPnX8PNj3Osj5A6D/Xj21t+YHNrk/is85KNz4UiOChXXBjIWjfwwjP4yZswUUm9D3s/4TMjTXFlgUovnvwF5pBqDG1ftsz6VCVGTmPcGhM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778862789; 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=TZ2iWX33HeoG0R/fQ++7Hb1Satx2YRpoKwe+JWxXPCk=; b=O1gpDLJwMRoE/hY1jxgbThzw2NsqPx4TucMO+aZu7XIILonJzTRcBbCX6F/vXcbRRi19+PIKSBs5ayt+4v94MoUrXNQyFf5Z0EMp+drxvrtwsuN191k4IOdbTR250kA0qPwQorydWmg3vmXm44Rc10SgpgC9luzYO3KIs0mEyps= 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 1778862789502474.12786401307267; Fri, 15 May 2026 09:33:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNvRb-0005n9-5S; Fri, 15 May 2026 12:31:23 -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 1wNvRL-0005dr-D1 for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:12 -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 1wNvRJ-00027r-Ev for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:07 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4891e5b9c1fso6015e9.2 for ; Fri, 15 May 2026 09:31:03 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fe5cab818sm73873195e9.14.2026.05.15.09.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 09:30:59 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 249585F954; Fri, 15 May 2026 17:30:56 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778862663; x=1779467463; 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=TZ2iWX33HeoG0R/fQ++7Hb1Satx2YRpoKwe+JWxXPCk=; b=nBcI+K37ZXDQ1ayVX2NANdsQAHIcMj/wsNU7fR/suUBIK0QDX6FBNOJxUgv7GgOL4j 7i+rbUMVMevcm1wgpObsuLF2mjw2mHsXBADdl3GRgU4n60LSDpFtkVLgzah1rEyIt1cp Pfm0wf7pw+q4rkj5oOLtuiFN7Mp6HMlzI57Rm2HJgwakknhbISHHKGJ838JkRSfIS7Eo fCPJIXesGh4f4c0ibCr1xDcYPals/WmezR671mxptDIFNhx+s3udZ6KabJ0CGpG//PbG zDZwcSv4pZkKv6HEek09cJNfahZA3al1NKWXD2XfkGQNSX1+S1536A8D3BBrklYlmv0w 1u9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778862663; x=1779467463; 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=TZ2iWX33HeoG0R/fQ++7Hb1Satx2YRpoKwe+JWxXPCk=; b=F/uwQ+ZX8lk6Wq/OtTIuTK4dCyKscqZlN9agecwdArq0NbhyrC2Nt+9UYf0kY1vyOP 5oDerTxMPMnZMd6WnRq3wESZCXgCgEeebkeektwu8VGE8W5KhpcD8JefUeoF2sMrr2Vk AMYMWc1Uh5P3bFyuAlNQlZmNeqgGHotyBfpRmFljGWuyYWScRifhSk9DcQEw9JyB9Rw2 wM/QoD/vkytAEzvZO/rrnkGIWb2EcsRYOVzOUr40nb8LTm5LQ2PAicRQ2AP4fuZM68rN 5eBC/C0+0PKgKb2kdlfyfgJ0D0SUJ3b/aiTPAPsS8UMGRhKdP/pR2Al5la+Yu0Xvbc9z sP/g== X-Gm-Message-State: AOJu0YyQFe/88c2Dk8qCoL+ZAVXroe237RhjKKPJo30i/+LalHhNG70C +sKhzXeHyzxGVt24PiNgbU/+VV3S8QHNBDCdux8oDox1KPRGOmqR7bdhSepHh4raSlM= X-Gm-Gg: Acq92OEukLRF7fOePsOp6E5logFZxsRM96+G0MwC/31NJ84Skb1G8vl+C4XUcbNbnFU Jeb91RyxN4KDv9ZMTymt1SNB4y0Byo8EV0d70WoIWnOKo1Fplwn3M+UROaKW+jZBNVsnI9wmwfY wkdDM39fDkTXQQinUAu0r9a6n7Zq2aehhq1/efQhIttkYfrYn8yQNptJpJBoFpDGAqTOWtG/ti1 6CZ2Nu9YgRdzmaWm0n+O4REAfi4DUd/wFB+sgcz6wkxMYDc8b0UmB8P4B95xCWdFmcNYNM1Rgeu uPoK7NzS00zrM/jN9nR/NpCaEWTNaStoN40Oq1K2B3fQV6nmMS0w3htSEZiLWLqOQxFKFgLUvVA E+n2lPiS1JOCyJxYkr/peffMBHs4swlCWZ5hhE2ZIlKi0EBw5C/w21hHrehpMBhf5sWuWCAX9U9 Hmor+PAzZuzNLcuajPW+DhI4U= X-Received: by 2002:a05:600c:8b6e:b0:485:9a50:3370 with SMTP id 5b1f17b1804b1-48fe60ecc24mr74608155e9.8.1778862662802; Fri, 15 May 2026 09:31:02 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , John Snow Subject: [RFC PATCH v3 07/11] .agents/skills: add qemu-code-reviewer skill Date: Fri, 15 May 2026 17:30:50 +0100 Message-ID: <20260515163055.1792262-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260515163055.1792262-1-alex.bennee@linaro.org> References: <20260515163055.1792262-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: 1778862791446158500 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 --- 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 | 93 ++++++++++++++++++++++ AGENTS.md | 1 + 2 files changed, 94 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..48ec6b07520 --- /dev/null +++ b/.agents/skills/qemu-code-reviewer/SKILL.md @@ -0,0 +1,93 @@ +--- +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 + +This skill provides instructions on how to retrieve patch series submitted= to the QEMU mailing list (`qemu-devel@nongnu.org`) using `b4` or manual me= thods. + +## Using b4 (Recommended) + +`b4` is the preferred tool for working with patch series from public-inbox= instances like `lore.kernel.org`. + +### 1. Fetching a series +To download a series and prepare it for `git am`: +```bash +b4 am +``` +This creates a `.mbx` file containing the entire series, properly ordered. + +### 2. Applying a series directly +To apply a series directly to your current branch: +```bash +b4 shazam +``` +This is often the fastest way to get a series ready for testing. + +### 3. Creating a local branch for the series +```bash +b4 am -t +git am ./*.mbx +``` +The `-t` flag (or `--trust-all`) can be useful if you know the source. + +## Manual mbox Retrieval (Alternative) + +If `b4` is unavailable, you can fetch the mbox manually from `lore.kernel.= org`. + +### 1. Locate the thread +Find the patch series on [lore.kernel.org/qemu-devel/](https://lore.kernel= .org/qemu-devel/). + +### 2. Download the mbox +Every thread on lore has an `mbox.gz` link. You can use `curl` or `wget`: +```bash +curl -L "https://lore.kernel.org/qemu-devel//raw" -o series.mb= ox +``` +*Note: Appending `/raw` to the message URL usually provides the mbox forma= t.* + +### 3. Apply with git am +```bash +git am series.mbox +``` + +## Post-Application Steps + +Once the patches are applied, you should perform initial validation: + +### 1. Style Check +Run the QEMU checkpatch script to ensure the patches follow the project's = coding style. + +- **Check applied patches**: + ```bash + ./scripts/checkpatch.pl master..HEAD + ``` +- **Check a specific commit**: + ```bash + ./scripts/checkpatch.pl ^.. + ``` +- **Check a specific file**: + ```bash + ./scripts/checkpatch.pl -f + ``` +- **Strict mode** (often required for new code or specific subsystems): + ```bash + ./scripts/checkpatch.pl --strict + ``` + +### 2. Build and Test +Refer to the `AGENTS.md` or the `qemu-build` and `qemu-testing` skills for= build and test instructions. +- Ensure you are in a clean build directory. +- Run `ninja` or `make`. +- Run relevant tests (e.g., `make check-qtest`). + +### 3. Reviewing Patches +Refer to the `qemu-code-explorer` skill for navigating the code base and r= esolving functions and where they are called from. + + + +## Common Troubleshooting + +- **Applying fails**: If `git am` fails due to conflicts, you may need to = use `git am --3way` or manually resolve conflicts. +- **Missing dependencies**: Ensure your tree is up to date with the base b= ranch the patches were intended for (usually `master`). diff --git a/AGENTS.md b/AGENTS.md index f5439282967..fe50057cef7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -33,6 +33,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 Mon May 25 18:35:36 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=1778862703; cv=none; d=zohomail.com; s=zohoarc; b=QckMRWHTefx58MxxVCj+VuquIrkjHhodKb/dPM0hyAJXTNZ8r+bTJKtT8UkABq/RqM3WxBWa3Vxl8zV5Rwa92fVvP7QHkbtULy0+MWJ/IyjHRZurFqFydR24nEbGi5eteg6CnIbiYIo/SgBFpPqZyBO7y/iO34EllBViDkGBr10= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778862703; 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=+ZoXmsx9fuy3KvKUwXq6IG9tmVKPqlhjKrQaqjqUgFM=; b=EyLfjnnesOvgK8XsRcPZyekTOD1IZ1Abw3NyFtO4HfVtvzm8DXPLcgeSeJCrn2Q1pz7pJH8Vipsgl1CKdKcropPeDWvDT5XXeEyWN7zLX+XgNs/aDrhc3A2zVTwi1RCOBx7TYn0YhX1HgVP5Z86XvgGMtG4MqqMfOYnPZmQgfuA= 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 1778862703306778.109694062966; Fri, 15 May 2026 09:31:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNvRa-0005l3-CM; Fri, 15 May 2026 12:31:22 -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 1wNvRJ-0005do-Nr for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:11 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNvRG-00027E-Ll for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:05 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-48984d29fe3so209615e9.0 for ; Fri, 15 May 2026 09:31:02 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fe5e9d5d9sm78863725e9.15.2026.05.15.09.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 09:30:59 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3EA0A5FA02; Fri, 15 May 2026 17:30:56 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778862661; x=1779467461; 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=+ZoXmsx9fuy3KvKUwXq6IG9tmVKPqlhjKrQaqjqUgFM=; b=M8hRYF2bCsIp5ekbKcCmLXgzCBrH9CftJ5/T01F/sEiAPUWLKFu00yHC44SYnXMfCh IcyHj5ZCokt5HieqfD5UGAHg71+Srx3TbVz+UkaACfgT9ZwDorvfIv6xpw2KE2YKLZlE LeRs655+stOh1hdurzgMF6rcLYSIBnJoMAZtzsybkQ/MpXIW0bk34CvoLIqwAM0vVy2a ZaaR1Ky4wlujf6N1TA6xLrAmeyTdSIYmDiTdZljLg4oFi76dfH6drkEbbkWC/jIqaXaE X31GyAJCGAZwavbhVgh+HXyXQLfF7wYaTIHzVaLBFBjMPy7cl9dVHnUGCppUoIkz3WD8 8dvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778862661; x=1779467461; 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=+ZoXmsx9fuy3KvKUwXq6IG9tmVKPqlhjKrQaqjqUgFM=; b=U9YM1fJlPvmTKxbtQlz+AsuHXtU9iszJ8TT0z1Okun9hiuwGbKGa82Ywy3Xi5RrJmJ GPVv1YcYa1IWM2GZNHxoVgVBMN7CRrf9l87z8V1Kw+W+Boo6+DtH/Cy2yzXpsaXkm5qm ONZVX0ymyPzgvFPXkFulELshJ/pu0l0SqlWa0acDmAc1zDKg+8QIWWCv/ycdvZ4pGk6q p0tO60hoeTpaWUsnWLcrs79/gPFBCVJedIV0C14Dk6rb88UlGR+DBsjXnWI9cLKm0VBf gsywX6C0Xdu0fwYjyhA5pv0ra/sFdAKMQ/aegYAsIsXiuMiom3g1CAuSZJMAPGOJlzfC KXjA== X-Gm-Message-State: AOJu0YyMUz99vAo9PqIV/N0uYLBf3QB+5257P5gDD7An3rScWGOqyMDu ENjVlnrj1/GYNv00Q6IixaFhPNKlkD7X39bixMJiA2VTwNW8kvCshqzrNCi+ipHk6Gg= X-Gm-Gg: Acq92OFrVLao3gSgYciGnGhUZ4I2jjuEnf4+V+D+1i6ZDr/Au5QApvis3nVfSaSuh77 LaKN9lMk6rcKSmFC74T2UUxYOE7BzPcwkE4W4A05yFCD7ckPEKYjKpCbLKWheL2OeMG1UWgR1Yk OdaT7wDx1sBheii7qSqVq38dRIeBK4SpiaUaGqoBZCrH8NAP9y29Dwi+8//Tm3P9CCN0Pj+Ou5B bIfcuDzDENskbReExYVtDegTTv69vz2cnD0vJ7cvRW15lUd9U/M2by9tEaJDl32t++iNV4Nds7F wac8rwfOFiOUnbPhxJZ6RN/c3SbQ/wEGOLi3WZ/9ab6PRMjjyYxYzOZCdxI7zhzfDuBfi+dEMw1 0Or0Z68UWtMQJ+1Kp5PxdeLU5VtSAp3Z8AbVFzOClSkRL79b/Lyr3Q83vW/+QBdWC4ayq49uV+9 CPmk1p8Z+eKTOxV0EaF3V57zU= X-Received: by 2002:a05:600c:37ca:b0:489:1a63:509c with SMTP id 5b1f17b1804b1-48fe59b05b2mr72699765e9.0.1778862661147; Fri, 15 May 2026 09:31:01 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , John Snow Subject: [RFC PATCH v3 08/11] .agents/skills: add qemu-mail-thread skill Date: Fri, 15 May 2026 17:30:51 +0100 Message-ID: <20260515163055.1792262-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260515163055.1792262-1-alex.bennee@linaro.org> References: <20260515163055.1792262-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::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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: 1778862704286158500 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 | 40 ++++++++ .../scripts/qemu_mail_parser.py | 98 +++++++++++++++++++ AGENTS.md | 1 + 3 files changed, 139 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..a3257dabc2f --- /dev/null +++ b/.agents/skills/qemu-mail-thread/SKILL.md @@ -0,0 +1,40 @@ +--- +name: qemu-mail-thread +description: Fetch and extract reviewer comments from QEMU mailing list th= reads, handling mbox files or raw text dumps. +license: GPL-2.0-or-later +--- + +# QEMU Mail Thread + +This skill helps you fetch and extract reviewer comments from QEMU mailing= list threads. It can handle standard `mbox` files (e.g., from `b4 mbox`) o= r raw text dumps from the user. + +## How to fetch a mail thread + +If you have a Message-ID (e.g., from a patch series), use `b4` to fetch th= e entire thread: + +```bash +b4 mbox +``` + +This will typically save an `.mbx` file in your current directory. + +## How to parse comments + +Use the included Python script to extract feedback, filtering out quoted t= ext and diffs. + +```bash +python .agents/skills/qemu-mail-thread/scripts/qemu_mail_parser.py +``` + +The script automatically detects whether the input is a standard mbox or a= raw text dump. + +## Expected Output +The script generates `parsed_comments.txt` in the current working director= y: +``` +--- 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 this structured text to efficiently analyze the feedback and identify = 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 fe50057cef7..26a9c93007b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -34,6 +34,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 Mon May 25 18:35:36 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=1778862749; cv=none; d=zohomail.com; s=zohoarc; b=kU5agblBSxtZX1hOzAVc/3Jjir0B6sfB1hTW7EvHL6JdDZc/XaJ95qQ5HZV8qG/neNDJnjqjx6bjy1yufng5tRf7I9ny2kU0nI0GPOC5c41gIahIBWgVsraR43rn6HUwuGWrLmtKoD5PaqVMzOMQL6tckMic8ZhciomjsZc9Bck= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778862749; 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=n8toGhl6HNFSdtVND/yM1sQU/Jwuqjo1Ew04f+H6Atk=; b=KYBa9M6uuqSzUDb+OHfRFHomF1WtoJ/WK0pLtkpE3i5f+c3XfaxZ2I0ehXiJRypiUaz1TcmqSjdWVzV37CGu2IuZzkpz+QWPG0Jzi/Bo063jxfV2OCDAPxwCbXuDoD8YEqdyAySeC9asLenxTEGGsUAvVoCHB3wmvmrbD+Yl8nc= 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 1778862749189380.260058538933; Fri, 15 May 2026 09:32:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNvRe-0005uY-I2; Fri, 15 May 2026 12:31:26 -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 1wNvRJ-0005dl-Nq for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:11 -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 1wNvRG-000277-2G for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:04 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-48a7fe4f40bso217805e9.0 for ; Fri, 15 May 2026 09:31:01 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2a878sm30983345e9.1.2026.05.15.09.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 09:30:59 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 54C2D5FA65; Fri, 15 May 2026 17:30:56 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778862660; x=1779467460; 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=n8toGhl6HNFSdtVND/yM1sQU/Jwuqjo1Ew04f+H6Atk=; b=dwrK5A7T2Qptp3R4UxPEktb06V+mxmUHb+qHyCONj1zqLt/mr1vwaa7ypOLcwICzlW wBWOli3dVrmdwBEMzRh4CCqa9wA+2+8Xqak6rXYbwQNBuCnOHqKGoBz8hXT5adE0TpZ8 XQbqgDhYYD/+W6BatT2hqFKo5PptULy10pxRPpnXFVRW24NuTDr5ziTMG20+rvWv3k5G Ij6yHZw25ObsKvB8Z6PENGv+7PRHCN0qKaDUAHCLPrqp+3WXRU8oOp15gi5apURROXwk uCoBIPf1P3QKgSRWxK9MMyYr/D97oq81h4+A+A0Zr9EDp4/gwlv33lfhklrId9N/xxRu oEDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778862660; x=1779467460; 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=n8toGhl6HNFSdtVND/yM1sQU/Jwuqjo1Ew04f+H6Atk=; b=kYP0LyR3MIoWDXrrJIohSj+9l90cihbb9Ncia8iFvah4cTn4fk3wDT4Fi1ra9gC+38 4kLAq6lNERRPFyCak8TNtp63QaZEYRRs/nWm9FD89o+2voKsBP6ut7JtdXmX0Uh1Wm9G vjcFYQk2zGCSQAHEn547CkScl2lZXGoOXiOUDiMM6FnHbn2N8NZadVgzW9TuxX3aFrKP PwwAOr9gXiW3Ht4gM22YtoGWlxBsf+ePBkrszGwxS6/sp7c0s1xspAQNiiKpsAekTxsI uuQP117k3ZkPpQrHPlfT114ClCoWxVu0Gb69AhYdmrpm1RAnpQZH2PpZzJD1REgFFUJA K3PQ== X-Gm-Message-State: AOJu0YxzaAYDZEuMcGfxndrnP9rQI/Mb5KX6Sh/L64MIA2n14+Q7FiDX WbQ++6TDl6PVqSFw3AN247BceZuwkhOaJLjc3LhVDJ8HZ65K41yWeYt77SxTSpME1K7w87xKG40 7iOtnDOs= X-Gm-Gg: Acq92OFNhJyJ9/+DQ6nxS1sblZa/7dW7lp+mgtNfket473Z9eNSchJwKKD8xTxAg6Qk SmwOGHZn2D8w0FGbrNuwq2F68GsfuC1yvtn5bmTWSu1BIJ4g1o2fRMnrfLOjansUOCD3lzN0WmV ylrQIJEiy+b2YujztluXbPsghEsK8BBCCRLUWCC40k96xOvhHfsZLMJoe15ChjHoz8vqMaDcq59 C40RJElwi1zvDVAf8N0WVxFoELLsaKWbXAXaGxiOhJedVDcyG1jOO+mVyO3O7i/9lwm0N0f5oAD xjMhdt5MptOn8sOGptvZ9U0AzJgUyEUGjWVbyiU+YaXj/8hjmR4URfLdii7gme7r6ncNQG5pLXH OgRqY4undSot3fHLDtelLmAm0EAIUh7ywfDcwLVzQo8DxwAIF0HKVIcPU5ecnBqwomMH7Dr6CN4 LMaZGy+9Mq1OjiU5tEmpi+8LU= X-Received: by 2002:a05:600c:48a8:b0:48f:e230:d5ab with SMTP id 5b1f17b1804b1-48fe651e11cmr40956605e9.31.1778862660456; Fri, 15 May 2026 09:31:00 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , John Snow Subject: [RFC PATCH v3 09/11] .agents/skills: add qemu-issue-helper skill Date: Fri, 15 May 2026 17:30:52 +0100 Message-ID: <20260515163055.1792262-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260515163055.1792262-1-alex.bennee@linaro.org> References: <20260515163055.1792262-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: 1778862750807158500 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..725097bac36 --- /dev/null +++ b/.agents/skills/qemu-issue-helper/SKILL.md @@ -0,0 +1,47 @@ +--- +name: qemu-issue-helper +description: Summarize QEMU issue analysis for main agent. Helps sub-agent= s report findings including build config, CLI, tests, and GitLab issue data= . Trigger when analyzing QEMU bugs or issues reported on GitLab. +license: GPL-2.0-or-later +--- + +# QEMU Issue Helper + +Assist sub-agent in summarizing issue analysis for main agent. + +## Fetching Issue Data + +Use `glab` to retrieve issue details from GitLab. QEMU primary 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 provide a summary of the GitLab issue discussion and findin= gs in this format: + +### 1. Issue Context +- **Source**: GitLab URL/ID. +- **Title**: Short issue description. +- **Reporter**: User who found it. +- **Relevant Commits**: List any commits mentioned in the issue that are r= elated to the bug or previous attempts to fix it. + +### 2. Build & Reproduction (from issue) +- **Reported Environment**: Host OS, CPU, QEMU version. +- **Build Configuration**: Required `configure` flags mentioned in the iss= ue. +- **Reproduction CLI**: Exact QEMU command used to reproduce. + +### 3. Proposed Fixes & Series +- **Proposed Fixes**: Flag any specific code snippets or logic fixes sugge= sted in the comments. +- **Patch Series**: Note if any patch series or Merge Requests have been l= inked. + +### 4. Discussion Summary +- **Current Consensus**: What is the community's current understanding of = the bug? +- **Key Constraints**: Note any blockers, requirements, or specific feedba= ck from maintainers. +- **Next Steps**: What is needed to move the issue forward? + +## Rules +- **No Independent Analysis**: Do not perform your own root cause analysis= . Summarize ONLY what is present in the issue tracker. +- **Terse**: Use brief technical English. +- **Links**: Provide direct links to relevant comments or patches if avail= able. diff --git a/AGENTS.md b/AGENTS.md index 26a9c93007b..6a91c39638e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -35,6 +35,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 Mon May 25 18:35:36 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=1778862800; cv=none; d=zohomail.com; s=zohoarc; b=GbbdqxDGyzqsd1k2C0/IJGvnKE8kXGKIC/ZgN0ddsLt4lefUOj0Rn066B4bsvazTDQXGb8O8/9slqf72B3KGPIQK0vCKNjVuxrMNE3Tth7ryxeboLmJgycP0MMS92+7XSXB8u16nGSPizmeNL8VvJUByJ+ZBxFx/JEGKgSqK16s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778862800; 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=N/op9aBootCAGyOm5tNOz6YSFQ1I3Itu+6bFcS4ha8Y=; b=n681rYZFLUKHJkTF4gOqxYIhwJyBFFuXPoFlEN7eSs5Ig33syrGAVm094pnYKDuzSTyx+8rLh3n4sEo57Vmx0tv+oKUnedbDNBnxs3QVPam4BMuZdJeMTptIYdceYezZ2m+GwrLkZ6e72lriSppgtqwhoVlK3NGk2symkEVXtx0= 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 177886280038094.08944139661867; Fri, 15 May 2026 09:33:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNvRb-0005nR-80; Fri, 15 May 2026 12:31:23 -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 1wNvRO-0005eN-5L for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:13 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNvRJ-000283-FW for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:09 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4891e86fabeso72215e9.1 for ; Fri, 15 May 2026 09:31:04 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fe5694fcasm63467715e9.5.2026.05.15.09.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 09:30:59 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 72E905FA6C; Fri, 15 May 2026 17:30:56 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778862663; x=1779467463; 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=N/op9aBootCAGyOm5tNOz6YSFQ1I3Itu+6bFcS4ha8Y=; b=IKsCLlGBWSjrZd5qVZEOaqoaGbg96cM72n7BnKmx6rIinThIYIF1YHpJAASgjTEJpL 83Ba+g/drzXYMnWh8l692pp0O4QNndqUG1QLi5L609ew9P5vgmy9lFi1h0N7ZITc52wW sEFWGsTujEP4ZWRMFwTQfa56L4msFUHCZeCzX8TYkJKTA92nowTl2PEAo9NyQYEpUOH1 TfBrxWek65JPv9bJlB7wnJKp9MiEC8EANepV8aMaRUkhQycG9fGLkT5+Fw2AB5MCYNGk hymefTYWiKswH7MLd946F5ixAMPqpBVSqTjXPO/OpCiftLf7rNU3nAuDhj3xNmovWo+C H0fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778862663; x=1779467463; 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=N/op9aBootCAGyOm5tNOz6YSFQ1I3Itu+6bFcS4ha8Y=; b=DZiJezloK2DnV9Do1OwFsq8ybeWHp2DmMXfSzVlfvuhhzwkYPRv2cqQfB/d7Oj12qB A1sJUdLSUhn8cp9PyvBbvvi0b6YNuAoHEnPZw0Ry3ZLZ7G2CkSFNfGOULmNUD1GYHsvk wrkHM0DzWlSjICYasUDHy4q7H417OZsJqh5kt9g538TlJzGf5ao5cogVtrluyltG2YiI g3/bkiDcUuxoGiGo1HZzcmtl7SiGJ1gFcc6sU3JorFe8bqjYDZ/AFDDSLm0fRGp0IpQh X3E2KTdE8DPFJeSNDfGFAxGiKNqTfVy/1dhUiMQ7ICMHUQCQ4HA5FtPzo/1M9txOp6pi 1+KA== X-Gm-Message-State: AOJu0Yzrh0xmvNzsOlp7DKCmKKZPdOEb+23WmPyA3Y5ZBp7rS+unCCPN Rsr5oZXca7K9hzJAURbfUvK7CwLGIGEWUC7UF9m9KTpbUJeMMQZ+W+TwFTx5fuccsM4= X-Gm-Gg: Acq92OHz40y29LO6l0wIqFDABBJs52oXQ/sGvIHKDy/dnp9V0gxo/jsW6eQey/5P8eG jQj5r51NENxHwF5xVhNiFDDpWihsR77QQPUj150tsWGUlB3eTheDxunOxgN1q/v2Nc6ozX4vmym lqu8LkuHuG4yGb8lzA3+raRLM4A14dc6055slVVhPsNFev4Dr7nz+htirw3W9JvN2nJIWU1pNGr RHuZJGxeCGnTtoUvee6cHmGAtWxArQ+PKvk1jKlzcSMzXiOa3pgtOdVhVCj/x4jz6wSKhtL7T7Z Eyl1L0TAsDaTM4p48UioSFzb/HQV3eXZDoRfrzBYM1obbILvyLoEHYkoi/JDoMCjAv8l6i1dHIs 80Cfz4qSwO7tTO33jMhbQQ7zNHgdePtd0k4AuVvhbJFSEwynLbzEXQr7T+kTN61EIK9jj6jl/GW ao3xEofduyLNXwyW3PgWg1ivLfXnlh0UKUAg== X-Received: by 2002:a05:600c:49a8:b0:48f:e230:d5ad with SMTP id 5b1f17b1804b1-48fe6617012mr40477415e9.33.1778862663215; Fri, 15 May 2026 09:31:03 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , John Snow Subject: [RFC PATCH v3 10/11] .agents/skills: add qemu-issue-triage agent skill Date: Fri, 15 May 2026 17:30:53 +0100 Message-ID: <20260515163055.1792262-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260515163055.1792262-1-alex.bennee@linaro.org> References: <20260515163055.1792262-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::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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: 1778862801633158500 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 - 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 | 112 +++++++++++++++ .../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, 280 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..a0802e24dd3 --- /dev/null +++ b/.agents/skills/qemu-issue-triage/SKILL.md @@ -0,0 +1,112 @@ +--- +name: qemu-issue-triage +description: Use this skill to triage and label GitLab issues for the QEMU= project +license: GPL-2.0-or-later +--- + +# Instructions + +This skill provides specialized instructions for triaging GitLab issues fo= r the QEMU project. + +## Parameter Handling & Execution Strategy (CRITICAL) +1. **Parameters**: If the user invokes this skill with multiple arguments = or a list of IDs (e.g., `#3430, #3426`), treat each as an independent targe= t. +2. **Sub-Agent Mandate**: To prevent polluting the main conversation conte= xt, **you MUST ALWAYS spawn a sub-agent** to perform the actual triage. + - **Parallelization**: When multiple IDs are provided, spawn one sub-ag= ent per issue in parallel to improve efficiency. + - Do NOT run `glab` commands or read the label cache directly in the ma= in context. + - In the `task` parameter for the sub-agent, provide the target `` and explicitly instruct the sub-agent to follow the "Triage Workflow"= and "Asset Management" rules defined below. + - Wait for the sub-agent to finish and simply report its summary to the= user. + +## Goal +Automate the initial triage of new bug reports and feature requests in the= QEMU GitLab repository. + +## Prerequisites +- `glab` CLI tool installed. +- An authentication method: Use `glab auth status` to check. You can pass = a token by using `env GITLAB_TOKEN=3D` in front of commands if you h= ave it. +- Target Repo: Use `-R qemu-project/qemu` if not in a clone, or ensure the= remote is set correctly. + +## Asset Management (Label Cache) +This skill uses a cached list of labels to avoid unnecessary API calls and= ensure consistent labeling. +- **Cache Location:** `assets/labels.txt` relative to this skill. +- **Updating the Cache:** If the user asks to update the labels, or if you= suspect a label is missing, run the provided script: + ```bash + cd .agents/skills/qemu-issue-triage/scripts && ./update_labels.sh + ``` +- **Using the Cache:** Before applying labels, ALWAYS read `assets/labels.= txt` (or use `grep` on it) to review the available labels and their descrip= tions. This ensures you use the exact spelling and understand the intent be= hind the label (e.g., `kind::Bug`, `Storage`). Do NOT guess label names. + +## Triage Workflow + +### 1. Information Gathering +Fetch the issue details: +```bash +glab issue view -R qemu-project/qemu --comments +``` + +### 2. Evaluate Completeness +Analyze the issue against the bug template requirements: +- **Host Arch/OS**: Is the host environment specified? +- **Guest Arch/OS**: Is the guest environment specified? +- **QEMU Version**: Is the version mentioned? +- **Reproduction Steps**: Are there clear steps to reproduce? +- **Expected vs Actual**: Is the bug clearly described? + +**Workflow::Needs Info Triggers (CRITICAL):** +Request more information and apply the `workflow::Needs Info` label if any= of the following are true: +- **Missing Command Line**: The full QEMU command line (`qemu-system-* ...= `) used to reproduce the issue is missing. +- **Old QEMU Version**: The reported version is older than the last two ma= jor releases. Ask the reporter to re-test with the current upstream master = or the latest stable release. +- **Distro Version**: The version string suggests a downstream/distro-spec= ific package (e.g., contains suffixes like `.el9`, `.fc40`, `-ubuntu`, or l= ong strings like `7.2.0-14.sc05...`). Ask the reporter to reproduce the iss= ue using a clean build from the current upstream source to rule out distro-= specific patches. + +**Actions:** +- If information is missing based on the triggers above, add the `workflow= ::Needs Info` label and post a polite comment asking for the specific missi= ng details. (Remember to sign the comment as "Issue Agent Bot on behalf of = the user" per the Guidelines). +- If the issue is well-defined and uses a recent upstream version, proceed= to categorization. + +### 3. Categorization & Labelling +Apply labels based on the issue content. **Crucially, consult `assets/labe= ls.txt` to find the exact matching labels for the categories below.** + +#### Scoped Labels (Prefix::Label) +QEMU uses scoped labels (e.g., `kind::Bug`, `workflow::Triaged`) to group = related categories. +- **Prefixes:** Common prefixes include `kind::`, `workflow::`, `Closed::`= , `Audit Tooling::`, `GUI::`. +- **Constraint:** Only one label from that scope can be active at a time. = Applying a new scoped label of the same type (e.g `workflow::`) will remove= the other. + +#### Kinds +- `kind::Bug`: For unexpected behavior. +- `kind::Feature Request`: For new functionality. +- `kind::Task`: For research, investigations, and miscellaneous issues. + +#### Targets (target: *) and Hosts (host: *) +Detect the guest architecture (`target: *`) or host environment (`host: *`= ). +**IMPORTANT:** Be conservative when applying `target:` and `host:` labels.= Many bugs (e.g., in generic devices like USB, PCI, or block controllers) a= pply to ANY guest that includes the device. The reproducer (like a `qtest` = invocation) might just use a convenient target (e.g., `i386`) as an example= . ONLY apply `target:` or `host:` labels if the bug is strictly architectur= e- or host-dependent (e.g., a bug in ARM CPU emulation, or a macOS-specific= build failure). + +#### Accelerators (accel: *) +Detect the accelerator mentioned (e.g., `accel: KVM`, `accel: TCG`, `accel= : HVF`). + +#### Subsystems +Identify the relevant subsystem (e.g., `Storage`, `Networking`, `device:vi= rtio`, `Migration`). + +#### Testcases +- If the issue provides a minimal C program, a shell script, or a specific= disk image to reproduce the bug, apply the `TestCase` label. + +#### Patches and Fixes +- If the issue description or comments contain a link to a patch on the ma= iling list (e.g., `lore.kernel.org`, `patchew.org`), or explicitly mention = that a patch/fix has been submitted, apply the `workflow::Patch available` = label. + +#### Workflow Management +The `workflow::` labels track the lifecycle of an issue. +- **Single Workflow Label:** An issue can only have one `workflow::` label= at a time. +- **Transitioning:** Adding a new workflow label will automatically remove= the old one (e.g., adding `workflow::Patch available` will remove `workflo= w::Triaged`). + +#### Other comments +- If other developers have commented see if those comments imply additiona= l tags should be applied. + +### 4. Updating the Issue +Apply the labels and optionally assign a priority if clear. +**Transitioning Workflow Example:** +```bash +glab issue update -R qemu-project/qemu --label "workflow::Triag= ed,kind::Bug" +``` + +## Guidelines +- Be polite and professional in comments. +- **IMPORTANT:** Any comments added to the issue MUST include the phrase: = "Issue Agent Bot on behalf of the user" (e.g., as a sign-off at the end of = the message). +- Avoid commenting unless additional information is needed, specifically a= comment to acknowledge the report is superfluous. +- Use `workflow::Triaged` once categorization is complete. +- Avoid assigning issues to specific people unless they are explicitly men= tioned or are the known maintainer for a very specific subsystem. +- Use the `scripts/get_maintainer.pl` logic (via file paths mentioned in t= he issue) to identify potential subsystems. 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 6a91c39638e..97774176425 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,6 +36,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 Mon May 25 18:35:36 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=1778862730; cv=none; d=zohomail.com; s=zohoarc; b=BxH85uyJad/cgtpRotJVvb8KRD6XjbNMQ6LFEVLzpLTIjbFtYVF2X3nCq9764dN9DUU+psZSNULsFs1XqEkI++kn86ZIvNL9NMPjLuVPa9bGPrympiVF52qLH5JaBIMX52qL4Wpw/rIgBVcMIVYX1iFJ2/H+eTcqsE43+4wEoqs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778862730; 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=9qZPpYES+4gSkEIJyytMALF3WWjAAhWFsBoc9tpHp+A=; b=PTBBqidLnDDe5zUBUM1WZCeeXK/EeTblR/APy/Yv0wgSyn50dqxrK6Zs536U/ntrCtHDhJQRjxxqNRvIH//wdzLx7/j/SubRGMLmTKuFqO8yThGBPkvVhNDRh08ZKfANpUYAOrXO/al+8d4T+ii2uBe8/QgCWWVg7PCsgCHEbEc= 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 1778862730225425.0657406116901; Fri, 15 May 2026 09:32:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNvRd-0005sz-Vz; Fri, 15 May 2026 12:31:26 -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 1wNvRM-0005e8-Ia for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:12 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNvRJ-000287-Io for qemu-devel@nongnu.org; Fri, 15 May 2026 12:31:08 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-48984d29fe3so210335e9.0 for ; Fri, 15 May 2026 09:31:05 -0700 (PDT) Received: from draig.lan ([185.124.0.195]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fe4c8d39esm71940775e9.7.2026.05.15.09.30.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 09:31:01 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 893315FA91; Fri, 15 May 2026 17:30:56 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778862664; x=1779467464; 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=9qZPpYES+4gSkEIJyytMALF3WWjAAhWFsBoc9tpHp+A=; b=auHrsPyPiJDEJ8vMBkt8bwpBCOQuZB1m/evVE5cip1SnYGu4uhWNtiiitXHk4yRhmp RbLfxBHA9/qs0Tfy+6jFiq+bzVLiHEAmsWTAknyr2usbPuRLBIpS/qpO35tywyFlvB+d Q/NRECYrNpZlk9NTbF2+X76tLBEeFCqqI5p4kbBSqtJPqkd5LnS36XqkeDguKSPjwQ+9 738ITVoMGeRCXW/HCwIGHfAnSJVmPDRllOvnByDg9QpUiqxzJgY+vUabCoMfSX73O6HG kOmVgzIEYW9Ty7Kv0BvcACIlItg4llDVPwSG4fsncASDi0L6pwIqAV9SGdEQKusuqpIr uV8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778862664; x=1779467464; 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=9qZPpYES+4gSkEIJyytMALF3WWjAAhWFsBoc9tpHp+A=; b=lGnAtuB71//LcT2F3oVyVQ7ubjeT6YuyCkwVA2kFvw2sOhc8I3rPr2DESPQ44SRuf0 SGfUVaeZb2IH3gujRNFacPwTZi+YMKBS9oX4hOhCf7Kc7GlegZz9+F3CvjJZmBEoYVlD CFZb02CFh5/BOq9mKKgwDHIASckIJWiauYZw886RmnN8eowvVm9IpH3H0S8nG1mFsdwx KdOM/+F9xZM1hg1ac+VbqyYuN1q7kWaM9aPven5EDhbi7Gw6xOMfmE3tW6BWQQ7x85CO mhk+WK9uHmJ8anj7rpcbJLKe12Bx+Lnr1/flTayxG4j34KX57jki6L9RzM8fernKrXC9 iPyw== X-Gm-Message-State: AOJu0YxnM9hFRxhYa0+vs3AcRzbo8kJRHFmJbIPfqSApQ/r7Qu1ZZbLp lK6A0y3y7/S2JdCgZSif8n8PnRYi9GkYdkKo+flMRdJzoz1sv1b4CJkdgaWOfCKEEcI= X-Gm-Gg: Acq92OEvJghbknyJET/101YyBfHLQzbViPCKgWT9VCQs4fuMBZuBy66EWN0QvXfjpp4 LgsMnV0VxOegR0+aSZRvWBL+uTk2VfLMGD4l5F5TyB260NzcHcksgOiB7DEH/4Z29gZoQw8yw+L mro4+2tPwo3a1aV7v4jFYGOi218bzEpyEMlQC9NeRLtYtgpRybUx0JRB3yGR4fMB63gv9YsK+6Q X+Z25IW9xBCxFuANNvMf+p25ufvSc76KYLvyPEP4LeTj6fPORf+9ysA3kPqZu/61OakUSZQxP8s 4PzO7rZhKURGKZhtBIo8E/2PE4PadkwYJYTpUNKJueOdHCX6vOKrUeQrwfjuEae9m4K04UqrHwO gT8jVkZIwNMrILwKS93TbTFxsgFbVi72dq7xyka+qwYHfqRE3hnK/6L87RdVBmdNH3ZCn1+Ela9 vORaIOjjUtD/FebOBzs4qt5ms= X-Received: by 2002:a05:600c:858d:b0:48a:66a8:9981 with SMTP id 5b1f17b1804b1-48fe66129efmr43946625e9.27.1778862664226; Fri, 15 May 2026 09:31:04 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= , John Snow , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [RFC PATCH v3 11/11] MAINTAINERS: add a section for AI agents Date: Fri, 15 May 2026 17:30:54 +0100 Message-ID: <20260515163055.1792262-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260515163055.1792262-1-alex.bennee@linaro.org> References: <20260515163055.1792262-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::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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: 1778862730522158500 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 93a1e4e4822..70789044d30 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4570,6 +4570,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