From: Kevin Wolf <kwolf@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
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>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Warner Losh" <imp@bsdimp.com>
Subject: Re: [PATCH 1/4] docs/devel: relax policy on AI-generated contributions
Date: Wed, 30 Sep 2026 18:14:00 +0200 [thread overview]
Message-ID: <ar01SG5Hstps6t0v@redhat.com> (raw)
In-Reply-To: <05ace2dc-5e44-4f4a-8254-4f9459bdef1c@oss.qualcomm.com>
Am 30.09.2026 um 14:54 hat Philippe Mathieu-Daudé geschrieben:
> Hi,
>
> On 30/9/26 10:54, 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.
> >
> > Even a simple code review task these days may result in the agent
> > suggesting code changes, or producing a useful test case to verify the
> > presence or absence of a bug. A hardline interpretation of the policy
> > makes it hard to use AI even for tasks that are explicitly allowed.
> >
> > On top of this, several maintainers have pointed out that contributions
> > that can be reasonably suspected to be AI-assisted or more have been
> > posted and included. Some of these contributions are actually of very
> > high quality; it seems that the mailing list-based contribution process
> > has mostly protected QEMU from low quality patches. A prohibition on
> > AI puts maintainers in a difficult position: on one hand the DCO process
> > lets them rely on the submitter's certification of origin, on the other
> > hand maintainers are supposed to know and implement the process policies.
> >
> > Since the policy has been written, other projects have discussed and
> > taken their stance on AI contributions. These vary from full prohibition
> > (though typically motivated by social reasons rather than legal, e.g.
> > for Zig) to limited use (e.g. GCC, allowing small contributions and
> > tests to use AI), to cautious experimentation.
> >
> > This proposed policy seeks to implement the cautious experimentation
> > approach, inspired mostly by the Rust project's policy and by Software
> > Freedom Conservancy's own recommendations on LLMs and generative AI.
> >
> > Relying on Conservancy's legal guidance allows us to focus on the
> > interaction between contributors and maintainers. Conservancy in
> > particular provides this point to alleviate the concern that motivated
> > the policy, about whether the submitter has the legal right to contribute
> > the code and about unintentional reproduction of copyrighted code:
> >
> > "Copyleft Everything" remains the best viable and safest approach
> > Certainly those who want to release FOSS under non-copyleft licenses
> > have more to worry about when using these tools.
> >
> > While we shouldn't treat copyleft as a silver bullet, it is effective
> > as part of a defense in depth strategy that includes, for example,
> > "de minimis" thresholds and `AGENTS.md` instructions that encourage user
> > participation in the design.
> >
> > Therefore, the revised policy considers QEMU's copyleft to be a viable
> > approach to any unanswered legal questions about AI-generated
> > contributions and their copyright status. This lets the policy
> > focus on the topic of what AI-assisted contributions require of
> > maintainers.
> >
> > In that respect, the Rust project's policy combines two unusual ideas.
> > One is to hold them to a higher standard, in the spirit of using AI to
> > work "better, not faster"; the other is to require "pre-arrangement" for
> > "changes that are originally created by an LLM". AI lowers the cost of
> > producing a patch but does nothing to lower the cost of understanding
> > and reviewing one; if anything it raises it, since a reviewer can
> > no longer assume that the submitter has reasoned through every line.
> > Pre-arrangement is an attempt to balance the shift of effort from the
> > developer to the maintainer, and the QEMU policy includes the same
> > provision.
> >
> > Going full circle to the reason why we might need to review the
> > policy, there is the question of how to make sure policy is applied.
> > QEMU maintainers have already experimented with using AGENTS.md files;
> > subsequent patches will also try to embody the "work better, not faster"
> > mantra into an AGENTS.md file. Nevertheless, some explicit prohibitions
> > should be included in the policy, and they are indeed. The list is short
> > and based on the Rust policy and the GStreamer AGENTS.md file.
> >
> > 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
>
>
> > +.. _ai-used-for:
> > +
> > +Commit messages for AI-assisted changes
> > +'''''''''''''''''''''''''''''''''''''''
> > +
> > +In order to disclose your usage of AI/LLM tools, add an ``AI-used-for:``
> > +line before the :ref:`Signed-off-by <code-provenance>` line. The trailer
> > +is both a reminder of your DCO obligations and a guide to reviewers. The
> > +text is one or more of ``code``, ``tests``, ``docs``, ``research``, possibly
> > +followed by an explanation in parentheses:
> > +
> > +To be able to certify the provenance of AI/LLM-generated code that you submit
> > +to QEMU, you must follow the policies outlined in this document and in
> > +QEMU's ``AGENTS.md``. **By using 'AI-used-for', a contributor both
> > +identifies areas of the patch that involved use of AI/LLM, and also
> > +attests that their usage of AI/LLMs was in compliance with the policies
> > +outlined in this document.**
> > +
> > +.. code-block:: none
> > +
> > + AI-used-for: tests, docs
> > + AI-used-for: code
> > + AI-used-for: code (refactoring)
> > + AI-used-for: code (prototype)
> > + AI-used-for: research
> > +
> > +``AI-used-for`` should not be included for "background" usage such as
> > +autocomplete or obtaining a pre-review of the patch.
> > +
> > +Do not include your prompts or summarize the conversation in the commit
> > +message or cover letter. Extract any information that is relevant to the
> > +reviewer and include it in commit messages, cover letters or code comments.
> > +
> > +QEMU does *not* use ``Assisted-by``, ``Co-authored-by`` or ``Generated-by``
> > +trailers to indicate AI usage. In particular, do not specify the exact
> > +AI model or tool used to create the commit.
> > +
> > +Deterministic tooling (sed, coccinelle, formatters) is out of scope for
> > +the trailer, but should be mentioned in the commit message.
>
> I noticed a discrepancy in a method docstring and a particular use case.
> Since the method is used distinctly in various configurations (KVM, TCG,
> RISCV, ARM) I asked a LLM "using the semcode tools only and deliberately
> ignoring the method documentation, look at all the call tree and how the
> passed arguments are used and explain what is expected of this method
> to a junior engineer" then once I understood out what was wrong I could
> update the docstring in the header. No code / comment generated by the
> LLM ends in the commit / repository. IIUC this use case is compatible
> with the new policy.
I would think that this is compatible even with the current policy:
**Current QEMU project policy is to DECLINE any contributions which are
believed to include or derive from AI generated content. This includes
ChatGPT, Claude, Copilot, Llama and similar tools.**
**This policy does not apply to other uses of AI, such as researching APIs
or algorithms, static analysis, or debugging, provided their output is not
included in contributions.**
You didn't include any AI generated content in your submission, and
"researching APIs" is quite literally what you did, so it's explicitly
out of scope for the policy.
> What trailer should I use?
>
> AI-used-for: research
> AI-used-for: code (audit)
> AI-used-for: code audit (semcode)
None, because your patch doesn't include AI generated content.
("AI-used-for: research" looks like it might be meant for such cases,
but I agree with Dan that we shouldn't have it because the project
honestly shouldn't care.)
Kevin
next prev parent reply other threads:[~2026-09-30 16:14 UTC|newest]
Thread overview: 53+ 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 [this message]
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-09-30 8:54 ` [PATCH 2/4] AGENTS.md: add final instructions Paolo Bonzini
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-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
-- 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=ar01SG5Hstps6t0v@redhat.com \
--to=kwolf@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=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@oss.qualcomm.com \
--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.