From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael S . Tsirkin" <mst@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Alistair Francis" <alistair.francis@wdc.com>,
"BALATON Zoltan" <balaton@eik.bme.hu>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Kevin Wolf" <kwolf@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Warner Losh" <imp@bsdimp.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH 1/4] docs/devel: relax policy on AI-generated contributions
Date: Tue, 17 Nov 2026 14:40:04 -0600 [thread overview]
Message-ID: <avy4mkin-orpwskO@redhat.com> (raw)
In-Reply-To: <20260930085433.830743-2-pbonzini@redhat.com>
[Chiming in late]
On Wed, Sep 30, 2026 at 10:54:30AM +0200, Paolo Bonzini wrote:
> Until now QEMU's code provenance policy declined any contribution
> believed to include or derive from AI-generated content. A blanket ban
> was easy to maintain while LLM output was rarely usable on its own, but
> as the tools improved an absolute prohibition has become harder to
> justify and enforce.
That ban is still impacting contributions today:
https://lists.gnu.org/archive/html/qemu-devel/2026-11/msg03382.html
https://lists.gnu.org/archive/html/qemu-devel/2026-11/msg03845.html
...
> Revise the policy according to the above considerations, and introduce the
> "AI-used-for:" trailer as a record of where AI was used. The standard is
> slightly different from the more usual "Assisted-by"; the intention is for
> the metadata to provide more information for reviewers to judge the result,
> and to scope areas for which Signed-off-by cannot guarantee full control
> of provenance.
>
> In any case, use of AI does not relax any other contribution requirement:
> authors still need to comply with the DCO (declaring that they have
> corporate authorization to contribute, for example) and take technical
> responsibility for their work.
>
> [Commit message largely based on discussions with Daniel Berrangé,
> Alistair Francis, Peter Maydell, Kevin Wolf and others. - Paolo]
>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Alex Bennée <alex.bennee@linaro.org>
> Cc: Alistair Francis <alistair.francis@wdc.com>
> Cc: BALATON Zoltan <balaton@eik.bme.hu>
> Cc: Daniel P. Berrangé <berrange@redhat.com>
> Cc: Fabiano Rosas <farosas@suse.de>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: Warner Losh <imp@bsdimp.com>
> Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
> Link: https://lore.kernel.org/qemu-devel/20260524083329-mutt-send-email-mst@kernel.org/T/
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> docs/devel/code-provenance.rst | 71 +----------
> docs/devel/index-process.rst | 1 +
> docs/devel/llm-usage.rst | 213 +++++++++++++++++++++++++++++++++
> AGENTS.md | 42 +++++--
> scripts/checkpatch.pl | 5 +-
> 5 files changed, 252 insertions(+), 80 deletions(-)
> create mode 100644 docs/devel/llm-usage.rst
> diff --git a/docs/devel/code-provenance.rst b/docs/devel/code-provenance.rst
> index 65b8f232a08..7403961378e 100644
> --- a/docs/devel/code-provenance.rst
> +++ b/docs/devel/code-provenance.rst
> @@ -128,6 +128,10 @@ that are commonly used during QEMU development:
> suggestions for how to change a patch, it is good practice to credit them
> by including a ``Suggested-by`` tag.
>
> + * **AI-used-for**: when AI/LLM tools were used to produce the patch, this tag
> + discloses what they were used for. See :ref:`llm-usage` for the cases in
> + which it is required.
> +
> +++ b/docs/devel/llm-usage.rst
> @@ -0,0 +1,213 @@
> +.. _llm-usage:
> +
> +Use of AI-generated content
> +===========================
> +
> +.. warning::
> +
> + Please read the below policy before using AI to contribute code or
> + documentation to QEMU. This applies to ChatGPT, Claude, Copilot,
> + Llama, and similar tools.
...
> +LLM-assisted and LLM-created contributions
> +''''''''''''''''''''''''''''''''''''''''''
> +
> +Use of generative AI can be classified in the following four buckets:
> +
> +- "background" assistance, such as completion and code review. This does
> + not need disclosure.
> +
> +- small LLM-assisted bugfixes (as a rule of thumb, below 10 lines of code)
> + are allowed with disclosure. Splitting a submission in multiple parts
> + is **not** a valid way to bypass this rule; repeated, frequent posting
> + of such fixes must follow the rule for full contributions.
> +
> +- use of LLMs to help generating parts of a larger patch---test cases,
> + adaptations of existing code, boilerplate code for a new API, a tool to
> + help performing mechanical changes, etc. These are generally allowed;
> + disclosure is highly recommended for non-trivial, functional code.
I see lots of discussion about whether to stop here (and s/four/three/
above), and leaving off the fourth bullet (or splitting it to a
separate patch for later) appeals to me personally. But I can also go
along with the final bullet if that is what the consensus lands on.
> +
> +- large, heavily LLM-assisted contributions where LLMs write large parts
> + of functional code. These are only allowed if *pre-arranged*,
> + *high-quality* and *well-tested*.
> +
> +The last case (*"LLM-created contribution"*) is the one that requires
> +a more careful approach. In particular:
> +
> +- "Pre-arranged" means that a maintainer has communicated ahead of time,
> + for example on `IRC or the QEMU mailing
> + list <https://www.qemu.org/contribute/>`__, that they are willing
> + to review an LLM-created contribution.
> +
> +- "High-quality" means that the contributor must apply the same judgment
> + that would be applied to other code changes. Contributors must invest
> + substantial time reviewing their contributions, curating them, and
> + understanding them in depth.
> +
> +- "Well-tested" means the LLM-created contributions will be held to a
> + higher standard than human-created ones, because LLMs make it easier
> + to write tests. There are no exceptions for "writing the tests seems
> + hard" or for `yak shaving <https://en.wiktionary.org/wiki/yak_shaving>`__.
My most recent contribution where LLM assistance was useful was
designing a qemu-iotest for proving that a CVE was fixed. The actual
fix is not something I was willing to trust to AI, but the tedium of
doing a write-once known-broken NBD implementation just to prove that
the former bug is no longer triggered, when the unit test itself is
not part of the final QEMU binary, hit the threshold of where I can
see the value in LLM increasing the "well-tested" nature of QEMU.
> +
> +.. note::
> + Pre-arrangement ensures maintainers have bandwidth for review before a
> + contributor invests effort in creating a large change. This is not
> + a new concept in QEMU: maintainers have always encouraged early
> + alignment on mailing lists or IRC prior to major architecture or
> + subsystem refactoring.
> +
> + Maintainers have freedom to determine what constitutes "high quality".
> + Because LLMs lower the cost of patch generation, maintainers may demand
> + significantly larger revisions than for purely human-written code.
> +
> +The QEMU project explicitly forbids using LLMs to do "clean room"
> +reimplementation of existing code whose license is not compatible
> +with the GNU General Public License, version 2 **or later**.
> +
> +.. _ai-used-for:
> +
> +Commit messages for AI-assisted changes
> +'''''''''''''''''''''''''''''''''''''''
...
Reviewed-by: Eric Blake <eblake@redhat.com>
At this point, we're too close to 11.2 to flip the policy switch any
sooner than 12.0.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org
next prev parent reply other threads:[~2026-11-17 20:41 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 8:54 [PATCH v4 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions Paolo Bonzini
2026-09-30 8:54 ` [PATCH 1/4] docs/devel: relax " Paolo Bonzini
2026-09-30 12:54 ` Philippe Mathieu-Daudé
2026-09-30 12:57 ` Philippe Mathieu-Daudé
2026-09-30 13:09 ` Daniel P. Berrangé
2026-09-30 19:01 ` Paolo Bonzini
2026-09-30 16:14 ` Kevin Wolf
2026-10-01 12:21 ` Peter Maydell
2026-10-02 9:41 ` Paolo Bonzini
2026-10-05 21:09 ` BALATON Zoltan
2026-10-06 8:41 ` Kevin Wolf
2026-10-06 9:44 ` Alex Bennée
2026-10-06 9:56 ` Daniel P. Berrangé
2026-10-06 11:49 ` Kevin Wolf
2026-10-06 13:13 ` Alex Bennée
2026-10-02 14:53 ` Daniel P. Berrangé
2026-10-07 6:00 ` Paolo Bonzini
2026-11-13 10:14 ` Markus Armbruster
2026-11-13 13:09 ` Michael S. Tsirkin
2026-10-27 18:01 ` Alex Bennée
2026-10-27 18:03 ` Paolo Bonzini
2026-10-29 9:34 ` Alex Bennée
2026-11-13 9:44 ` Markus Armbruster
2026-11-17 22:22 ` Paolo Bonzini
2026-11-17 20:40 ` Eric Blake [this message]
2026-11-17 21:13 ` Kevin Wolf
2026-11-17 21:31 ` Peter Maydell
2026-11-17 22:20 ` Paolo Bonzini
2026-11-17 21:42 ` BALATON Zoltan
2026-11-17 22:09 ` Philippe Mathieu-Daudé
2026-09-30 8:54 ` [PATCH 2/4] AGENTS.md: add final instructions Paolo Bonzini
2026-10-27 17:53 ` Alex Bennée
2026-09-30 8:54 ` [PATCH 3/4] AGENTS.md: let agents know what the participation rules are Paolo Bonzini
2026-10-13 9:33 ` Daniel P. Berrangé
2026-09-30 8:54 ` [PATCH 4/4] AGENTS.md: make the human part of the design process Paolo Bonzini
2026-10-27 17:56 ` Alex Bennée
2026-09-30 21:17 ` [PATCH v4 0/4] docs/devel, AGENTS.md: a completely new policy on AI-generated contributions Philippe Mathieu-Daudé
2026-09-30 23:42 ` Michael S. Tsirkin
2026-10-01 4:44 ` Warner Losh
2026-10-16 21:18 ` Daniel Henrique Barboza
2026-10-27 18:12 ` Paolo Bonzini
2026-10-29 11:55 ` Stefan Hajnoczi
-- strict thread matches above, loose matches on Subject: below --
2026-09-21 7:52 [RFC PATCH v3 " Paolo Bonzini
2026-09-21 7:52 ` [PATCH 1/4] docs/devel: relax " Paolo Bonzini
2026-09-21 9:22 ` Alex Bennée
2026-09-21 14:11 ` Daniel P. Berrangé
2026-09-23 15:52 ` Kevin Wolf
2026-09-21 10:46 ` BALATON Zoltan
2026-09-21 10:57 ` Daniel P. Berrangé
2026-09-21 13:20 ` Daniel P. Berrangé
2026-09-23 16:16 ` Kevin Wolf
2026-09-24 2:23 ` Michael S. Tsirkin
2026-09-24 9:41 ` Kevin Wolf
2026-09-24 16:16 ` Michael S. Tsirkin
2026-09-24 9:29 ` Alex Bennée
2026-09-24 10:46 ` Kevin Wolf
2026-09-24 11:30 ` Daniel P. Berrangé
2026-09-24 21:16 ` Warner Losh
2026-09-25 10:05 ` Kevin Wolf
2026-09-25 11:22 ` Daniel P. Berrangé
2026-09-25 12:20 ` BALATON Zoltan
2026-09-27 9:24 ` Michael S. Tsirkin
2026-09-27 10:03 ` BALATON Zoltan
2026-09-27 16:28 ` Michael S. Tsirkin
2026-09-27 18:05 ` BALATON Zoltan
2026-09-30 16:58 ` Paolo Bonzini
2026-09-24 16:06 ` Michael S. Tsirkin
2026-09-24 18:06 ` Kevin Wolf
2026-09-27 9:20 ` Michael S. Tsirkin
2026-09-28 7:58 ` Kevin Wolf
2026-09-28 8:23 ` Michael S. Tsirkin
2026-09-29 14:23 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=avy4mkin-orpwskO@redhat.com \
--to=eblake@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=alistair.francis@wdc.com \
--cc=balaton@eik.bme.hu \
--cc=berrange@redhat.com \
--cc=farosas@suse.de \
--cc=imp@bsdimp.com \
--cc=kwolf@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.