From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 91C64CD4F24 for ; Tue, 12 May 2026 14:44:13 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wMoKt-0002gO-Lt; Tue, 12 May 2026 10:43:55 -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 1wMoKe-0002fP-UT for qemu-devel@nongnu.org; Tue, 12 May 2026 10:43:37 -0400 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wMoKS-0006ta-Gr for qemu-devel@nongnu.org; Tue, 12 May 2026 10:43:29 -0400 Received: by mail-qk1-x743.google.com with SMTP id af79cd13be357-8d560ede296so615932685a.0 for ; Tue, 12 May 2026 07:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778597000; x=1779201800; darn=nongnu.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=HwtUNakYE28znt01Rid3P59f+R0AxanON/UBL0pqjMM=; b=YNkL9UNwbnJIdxLBBBDCVQELIc285QtUu1YuoStaHQ0k7mRWHiCmrjSvcIGGc7yTTf JVf+G6McT3pIUgvSkdWisLG4FQQ/FjsgwH0O+O2xf/Ml4Gvme7TNA3Vh2xvPV8Oh8zgj hc7yyGbFVY7jQmwJQNmCFeck8h2xTa4Qzh+69CZrP/8u7XHpZbJ4ht9qiYYTLvt+tlgW 7og/9DQl+VIChKfyp3Tc+4rmxlsTVqZvd2Q3sa116ji3mMHTff6tftL1ltJJ/9StEtcp ynI/Ge63zSdpDzAJGT8ImJil8Dt3bcsqISKk02iX+xbJJaM3ZyCnPrvTWt+CCG8neQoD rOdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778597000; x=1779201800; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=HwtUNakYE28znt01Rid3P59f+R0AxanON/UBL0pqjMM=; b=ipuycyjic62ZLleuCB7dI3u3Sw9CKQaxEkcJtwnEXQUZrOB/ue1x/sxh6Z8sB84gjq tynZzniu3mZ9DybaaviLCcGcSInLfrC/eEIbHTp597397ymtg4voG+6oILbrvGAVAlJF AUwPbf313F0YS5j0fI9Ifi0HBVdUjimSlO/K9TeH/ceN2dQ2gDY5bQU1afZU5sE5qclT tSHgO9RBct/NNlIVexNYBe1lmL98mWXc35hfL2ifzv+nBodQrW6seDA7Q/QbvqiSlQ5j Knw+c4kC6VkFrYXvQmghzqYb2HP3APb1Lf9nTKF2qqNqPwrHe9//p922iJdevg5fBrEc qb9A== X-Gm-Message-State: AOJu0YySyLVzRbyYiSKbXqK9hA9Cb2F9Rv+VYrhdIUiH1epTn+vczAxq GJ/KIWMci373R7uC9JngaU8hWAMOy4m98A20MtTAaNGB70DkdGZSJYKT X-Gm-Gg: Acq92OErue/wik0sJkxjwbjlXZHrdah4EkZ/hlvFgqYZNPlwciPXEG2XKZHJh5BtzBb rc6CpZtCqPMNsERDc7kJLw+ZU1T8oEmWA1m4aVP/2SOEz8t3GaGlq/2nDlEC3X7FtVWN+FB0ru0 oc8KnIVNPQjM9/IpWaLHLXsx5QYiFd6AzDyFDi3mKejKzS8uihyI3/NyQYRY345XP4Lkj5VKfTx QX/Raoch6cDxz0A4ufnsFLBgiizVinl2gOIcFY2bWZP8bx4biDxUENMyRao51KuQ2Q9nMM5HYoz /ekOI5DhiEYpTEiAFOpMFVwUSVAfJ0ggXJO9BMq3TDrEiBvQ/DtrWhRY0udRMENx+k/gGstjVOx 6GCBM3j2B5pYLhB4wpn73V5LglEnvzvl52/z7lITlD+gRv4i3sPsiCY78RkV1oQERmsgLjfyb/W 1fB4s0rvxGRwj9gz65hLnTbPyCeMwhxniNwZMD1ym/Xd8N5j9FwfoitPF4OtclRSK1YEOvV1oHg uLdgm7nDCk= X-Received: by 2002:a0c:e017:0:b0:8be:3c37:5e6a with SMTP id 6a1803df08f44-8bf42951790mr250354086d6.21.1778597000263; Tue, 12 May 2026 07:43:20 -0700 (PDT) Received: from ZEVORN-PC.localdomain ([162.244.208.119]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8b53d0702aasm364022836d6.43.2026.05.12.07.43.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2026 07:43:19 -0700 (PDT) Date: Tue, 12 May 2026 22:43:10 +0800 From: Chao Liu To: Alex =?utf-8?Q?Benn=C3=A9e?= Cc: qemu-devel@nongnu.org, John Snow , Cleber Rosa Subject: Re: [RFC PATCH v2 06/10] .agents/skills: add qemu-code-reviewer skill Message-ID: References: <20260511170500.124211-1-alex.bennee@linaro.org> <20260511170500.124211-7-alex.bennee@linaro.org> <87h5odc7eh.fsf@draig.linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87h5odc7eh.fsf@draig.linaro.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::743; envelope-from=chao.liu.zevorn@gmail.com; helo=mail-qk1-x743.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Tue, May 12, 2026 at 10:19:02AM +0100, Alex Bennée wrote: > Chao Liu writes: > > > On Mon, May 11, 2026 at 06:04:55PM +0100, Alex Bennée wrote: > >> 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ée > >> > >> --- > >> 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/qemu-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 methods. > >> + > >> +## 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. > > I suggest using the git worktree command for workspace isolation before > > applying patches. > > I don't know if this gets too much into the weeds of per-developer > preference. Everyone has slightly different ways of working but they do > want confidence that when they hand the wheel to their agent it isn't go > to mess up their nice flow. > You’re right. It looks like keeping it as it is now is good enough. Thanks, Chao > > > >> + > >> +## 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.mbox > >> +``` > >> +*Note: Appending `/raw` to the message URL usually provides the mbox format.* > >> + > >> +### 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 resolving functions and where they are called from. > >> + > > If the patches have multiple versions, should we ask the agent to summarize > > the review history of the previous versions, as well as briefly summarize > > the discussion across the current patch thread? This can be easy to miss > > during manual review, but an agent can handle it well. > > That's a good idea. I've had good success in getting agents to review > threads and summarise what was asked for. I have even had them apply the > changes for me to review before committing. > > > > > However, this seems better suited as a new skill. > > The qemu-mail-thread skill is a general purpose thread handling skill we > could teach about versioning? > > > > > Thanks, > > Chao > >> + > >> + > >> +## 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 branch the patches were intended for (usually `master`). > >> diff --git a/AGENTS.md b/AGENTS.md > >> index d9d1964d45a..fbbc3b65ed0 100644 > >> --- a/AGENTS.md > >> +++ b/AGENTS.md > >> @@ -27,6 +27,7 @@ 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 sanitizer 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. > >> > >> ## Source Code Layout (see `docs/devel/codebase.rst`) > >> - **`accel/`**: Hardware accelerators (KVM, TCG, HVF, Xen, etc.) and architecture-agnostic acceleration code. > >> -- > >> 2.47.3 > >> > >> > > -- > Alex Bennée > Virtualisation Tech Lead @ Linaro