From: "Michael S. Tsirkin" <mst@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-devel@nongnu.org, qemu-stable@nongnu.org,
"Peter Maydell" <peter.maydell@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: [RFC PATCH] virtio: compensate for incoming migration of virtio queues from broken stable series
Date: Thu, 3 Dec 2026 09:18:39 -0500 [thread overview]
Message-ID: <20261203091800-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <7e5cbb67-ef1e-4316-b41f-73d30edd85e1@tls.msk.ru>
On Thu, Dec 03, 2026 at 05:08:29PM +0300, Michael Tokarev wrote:
> On 12/3/26 17:02, Michael S. Tsirkin wrote:
> > On Thu, Dec 03, 2026 at 04:11:37PM +0300, Michael Tokarev wrote:
> > > Commit fbb87b0d358a "virtio-mmio: fix QUEUE_NUM_MAX" (v11.1.0)
> > > increased queue sizes for virtio-mmio device for older machine
> > > types to 1024. This commit were back-ported to older stable
> > > series (v10.0.13 and v11.0.5) incorrectly, increasing queue
> > > sizes not just for virtio-mmio but for all virtio devices.
> > > The result is that for non-mmio virtio devices with queues,
> > > migration from these broken versions to curren fails, since
> > > the destination expects smaller queue than 1024.
> > >
> > > Instead of making queue size tied to type of device and
> > > machine version, we can reallocate the queue at the load
> > > time to match the source. This way, there's no need to
> > > have fbb87b0d358a to compensate for the original bug either,
> > > as the queues will be adjusted on load.
> > >
> > > Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/5042
> > > Cc: qemu-stable@nongnu.org
> > > Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> >
> > Fun times. And then people will complain that incoming
> > migration can cause dos by drinking up unlimited memory.
> > If we really have to, let's put this behind a machine
> > compat flag that will just trigger for the broken
> > machines.
>
> This is exactly why I put a check for initially empty queue.
> In 10.0.13 and 11.0.4, *all* virtio queues are allocated with
> 1024 entries at qemu startup already. And this is why I asked
> for the amount of damage - how much is that, currently?
>
> But yes, it was my first thought too, to limit this to some
> machine versions (11.1 and 10.0), or at least to <11.1. The
> only prob is that I dunno how to do this properly :)
> I have
> your example though, and can try to go from there.
>
> Thanks,
>
> /mjt
Compat property, as usual.
--
MST
next prev parent reply other threads:[~2026-12-03 14:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 13:11 [RFC PATCH] virtio: compensate for incoming migration of virtio queues from broken stable series Michael Tokarev
2026-12-03 14:02 ` Michael S. Tsirkin
2026-12-03 14:08 ` Michael Tokarev
2026-12-03 14:18 ` Michael S. Tsirkin [this message]
2026-12-03 14:40 ` Michael Tokarev
2026-12-04 19:10 ` Michael Tokarev
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=20261203091800-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=berrange@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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.