Am 17.11.2026 um 21:40 hat Eric Blake geschrieben: > [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
And at least those of Christian's patches that I merged are a good example of how AI-assisted doesn't automatically mean bad quality. These patches were great, some of them better than the average human-only patch. I assume that he still spent significant time on these patches and didn't just send out the first thing AI gave him - which is how AI should be used. I also have two or three local tests that I created with AI because I had a use for them, but never sent them upstream because of the policy. > > 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 <[email protected]> > > Cc: Alex Bennée <[email protected]> > > Cc: Alistair Francis <[email protected]> > > Cc: BALATON Zoltan <[email protected]> > > Cc: Daniel P. Berrangé <[email protected]> > > Cc: Fabiano Rosas <[email protected]> > > Cc: Kevin Wolf <[email protected]> > > Cc: Peter Maydell <[email protected]> > > Cc: Warner Losh <[email protected]> > > Cc: Philippe Mathieu-Daudé <[email protected]> > > Link: > > https://lore.kernel.org/qemu-devel/[email protected]/T/ > > Signed-off-by: Paolo Bonzini <[email protected]> > > --- > > 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. If the consensus is that the legal arguments for the current policy aren't relevant any more, I'd like to have some policy update merged rather sooner than later. Without this concern, I think I'm mostly in the "it's just a tool" camp. I don't mind the fourth point and don't expect practical problems from it, but if some people do have concerns that would take months to resolve, I'd prefer to do without it for now and allow at least the uncontentious cases without waiting. > > + > > +- 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*. Kevin
