This provides basic instructions for how to download and apply a patch series from the mailing list. It currently doesn't outline any details about how to do the review.
Signed-off-by: Alex Bennée <[email protected]> --- .agents/skills/qemu-code-explorer/SKILL.md | 3 +- .../qemu-code-explorer/evals/evals.json | 1 + .agents/skills/qemu-code-reviewer/SKILL.md | 74 +++++++++++++++++++ 3 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 .agents/skills/qemu-code-reviewer/SKILL.md diff --git a/.agents/skills/qemu-code-explorer/SKILL.md b/.agents/skills/qemu-code-explorer/SKILL.md index d41b21179c1..13cb71dd55c 100644 --- a/.agents/skills/qemu-code-explorer/SKILL.md +++ b/.agents/skills/qemu-code-explorer/SKILL.md @@ -1,6 +1,7 @@ --- name: qemu-code-explorer description: Comprehensive guide for exploring the QEMU codebase using tagging systems (gtags, ctags, cscope), git grep, and build-directory grep for generated files. Use this skill when the user asks to find where something is defined, how it's used, or wants to understand a specific subsystem. +license: GPL-2.0-or-later --- # QEMU Code Base Explorer @@ -26,7 +27,7 @@ make gtags # or make ctags, make cscope, make TAGS `git grep` is the preferred tool for general text searches within the source tree. -- **Best for**: +- **Best for**: - Searching for local variables within a function. - Searching for string literals or comments. - Finding occurrences of symbols defined in system headers (e.g., `optarg`). diff --git a/.agents/skills/qemu-code-explorer/evals/evals.json b/.agents/skills/qemu-code-explorer/evals/evals.json index dff7afa52fa..131cf46e1cc 100644 --- a/.agents/skills/qemu-code-explorer/evals/evals.json +++ b/.agents/skills/qemu-code-explorer/evals/evals.json @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-or-later { "skill_name": "qemu-code-explorer", "evals": [ diff --git a/.agents/skills/qemu-code-reviewer/SKILL.md b/.agents/skills/qemu-code-reviewer/SKILL.md new file mode 100644 index 00000000000..0c088fdda04 --- /dev/null +++ b/.agents/skills/qemu-code-reviewer/SKILL.md @@ -0,0 +1,74 @@ +--- +name: qemu-code-reviewer +description: Pull and apply patch series from mailing lists for review and testing in QEMU. +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 (`[email protected]`) 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 <message-id-or-url> +``` +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 <message-id-or-url> +``` +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 <message-id-or-url> +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/<message-id>/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: +```bash +./scripts/checkpatch.pl master..HEAD +``` + +### 2. Build and Test +Refer to the `AGENTS.md` or the `qemu-code-explorer` skill 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`). + +## 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`). -- 2.47.3
