All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	"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>, "Warner Losh" <imp@bsdimp.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Paolo Bonzini" <bonzini@gnu.org>
Subject: Re: [PATCH v2] docs/devel: relax policy on AI-generated contributions
Date: Fri, 29 May 2026 13:47:11 -0400	[thread overview]
Message-ID: <20260529124753-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CABgObfZ5OUOih=pSrmpCKaAWqWnKgNZ2yZvRUoctYr=tEunoXA@mail.gmail.com>

On Fri, May 29, 2026 at 06:17:29PM +0200, Paolo Bonzini wrote:
> 
> 
> Il ven 29 mag 2026, 17:46 Michael S. Tsirkin <mst@redhat.com> ha scritto:
> 
>     > If as a project we want to limit the
>     > blast-radius if we find we have to rip out a hypothetical tainted
>     > contribution, shouldn't that mean that we hold that as a project-wide
>     > line, rather than leaving it up to the opinion of the individual
>     > maintainer ?
> 
>     I guess, the maintainer can judge that the code is unique and qemu
>     specific enough, and follows from what it is doing automatically enough,
>     that the chances it is accidentally copying something are nil?
> 
> 
> One thing that I had in mind was using AI to adjust QEMU code as the kernel
> side goes through review and APIs change. The changes at that point may be not
> entirely mechanical and, more importantly for traceability, it probably will
> not make sense to separate them from the original code; but the code still has
> fundamentally a shape and design that was provided by the human.
> 
> Another, which is Rust-specific, is procedural macro code, which is often
> boring, or very much tied to the shape of the generated code and human-written
> traits, or both. See https://github.com/qemu/qemu/blob/master/rust/qemu-macros/
> src/migration_state.rs for an example, contrasting the block starting with
> "self.conversion = match" with the rest.
> 
> I don't think it makes sense to have a wholesale permission for procedural
> macros because that is not *always* true, or true for a whole file. But say a
> contributor wrote the overall specification/documentation first, and mostly
> one-shotted a skeleton with a prompt like "based on the documentation, generate
> basic attribute parsing code for the MigrationState derive macro, together with
> a code generator that provides empty methods for an implementation of the trait
> ::migration::MigrationState from rust/hw/migration/". Then I would absolutely
> not reject it. This is also the intention of the suggestion around prompts—to
> favor quick generation of boilerplate code over full "agentic" (blargh)
> implementation.


Agreed.

> 
>     > > +**Documentation and code comments**
>     > > +  While AI can help draft text, it still requires significant human
>     > > +  oversight.  Pay attention to the organization and flow of the
>     generated
>     > > +  text, and strictly fact-check all technical details as LLMs are
>     prone
>     > > +  to being confidently wrong.
>     >
>     > I think the application to documentation and comments is the part
>     > I'm least enthusiastic about here.
> 
>     But I am very enthusiastic about less agrammatical english in both.
>     AI is super helpful for non native speakers.
> 
> 
> I am also not enthusiastic for documentation; the review I gave for Philippe's
> unedited experiment was rather scathing. The main challenge for documentation
> is the structure of the work, which is really complicated to establish because
> the LLM doesn't have a clue about the underlying design.
> 
> But there can be interesting uses nevertheless, such as integrating knowledge
> from functional tests into documentation, that are worth exploring. Also for
> Rust I am really trying to have *all* functions commented (and tested through
> so tests) and AI can produce good results more often than not, especially when
> the model has access to a human-written file-level blurb.
> 
> 
>     > For changes to code, we have at
>     > least some guardrails on the AI output, in the fact that it has to
>     > compile and to pass tests. For changes to documentation, the
>     > only guardrails are human eyeballs.
>     >
>     > Also both comments and documentation ideally are a record of
>     > what we intended the behaviour to be. If an LLM is effectively
>     > autogenerating something documentation-shaped from the code we
>     > lose that.
> 
> 
> I agree with both of these observations, for what it's worth.
> 
> Paolo
> 
> 
>     >
>     > -- PMM
> 
> 



  reply	other threads:[~2026-05-29 17:48 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29  9:46 [PATCH v2] docs/devel: relax policy on AI-generated contributions Paolo Bonzini
2026-05-29 11:52 ` Alex Bennée
2026-05-29 13:06   ` Paolo Bonzini
2026-05-29 13:10     ` Michael S. Tsirkin
2026-05-29 11:59 ` BALATON Zoltan
2026-05-29 15:34 ` Peter Maydell
2026-05-29 15:46   ` Michael S. Tsirkin
2026-05-29 15:55     ` Peter Maydell
2026-05-29 16:17     ` Paolo Bonzini
2026-05-29 17:47       ` Michael S. Tsirkin [this message]
2026-06-02  7:38   ` Michael S. Tsirkin
2026-06-02  8:09     ` Paolo Bonzini
2026-06-02 15:53 ` Stefan Hajnoczi
2026-06-03 11:35   ` Paolo Bonzini
2026-06-03 14:55     ` Stefan Hajnoczi
2026-06-03 14:59 ` Daniel P. Berrangé
2026-06-03 15:06   ` Michael S. Tsirkin
2026-06-03 15:35   ` Paolo Bonzini
2026-06-03 17:54     ` Daniel P. Berrangé
2026-06-04 10:37       ` Paolo Bonzini
2026-06-05  9:17         ` Daniel P. Berrangé
2026-06-05  9:25           ` Michael S. Tsirkin
2026-06-05  9:39             ` Daniel P. Berrangé
2026-06-05  9:48               ` Michael S. Tsirkin
2026-06-05 10:23                 ` Daniel P. Berrangé
2026-06-05 10:28                   ` Michael S. Tsirkin
2026-06-05 10:34                     ` Daniel P. Berrangé
2026-06-05 11:26                   ` Paolo Bonzini
2026-06-05 12:39                   ` BALATON Zoltan
2026-06-05 13:00                     ` Daniel P. Berrangé
2026-06-03 18:14     ` Alex Bennée
2026-06-03 18:20       ` Daniel P. Berrangé
2026-06-04 10:04         ` Alex Bennée
2026-06-04  6:08       ` Michael S. Tsirkin
2026-06-05 10:12     ` Kevin Wolf
2026-06-05 10:23       ` Michael S. Tsirkin

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=20260529124753-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=balaton@eik.bme.hu \
    --cc=berrange@redhat.com \
    --cc=bonzini@gnu.org \
    --cc=farosas@suse.de \
    --cc=imp@bsdimp.com \
    --cc=kwolf@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.