qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>,
	eduardo@habkost.net, marcel.apfelbaum@gmail.com,
	philmd@linaro.org, wangyanan55@huawei.com, zhao1.liu@intel.com,
	mst@redhat.com, qemu-devel@nongnu.org, farosas@suse.de,
	jinpu.wang@ionos.com, thuth@redhat.com
Subject: Re: [RFC PATCH] virtio-net: introduce strict peer feature check
Date: Thu, 13 Nov 2025 10:58:05 -0500	[thread overview]
Message-ID: <aRYADVaYZ-IprJwt@x1.local> (raw)
In-Reply-To: <aRWcimmBN23VzH55@redhat.com>

On Thu, Nov 13, 2025 at 08:53:30AM +0000, Daniel P. Berrangé wrote:
> On Wed, Nov 12, 2025 at 04:55:42PM -0500, Peter Xu wrote:
> > On Fri, Nov 07, 2025 at 10:01:49AM +0800, Jason Wang wrote:
> > > We used to clear features silently in virtio_net_get_features() even
> > > if it is required. This complicates the live migration compatibility
> > > as the management layer may think the feature is enabled but in fact
> > > not.
> > > 
> > > Let's add a strict feature check to make sure if there's a mismatch
> > > between the required feature and peer, fail the get_features()
> > > immediately instead of waiting until the migration to fail. This
> > > offload the migration compatibility completely to the management
> > > layer.
> > > 
> > > Signed-off-by: Jason Wang <jasowang@redhat.com>
> > 
> > Jason, thanks for help looking into the problem!
> > 
> > Am I right that after this patch applied, whenever a new QEMU boots with
> > the new machine types (e.g. having USO* by default ON), will fail to boot
> > on an old kernel that doesn't support USO*, but ask the users to turn off
> > USO* features explicitly in the virtio-net devices?
> 
> What kernel version are we talking about where there will be
> incompatibility ?  Is it old enough that it pre-dates our
> platform support matrix requirements ?  Ubuntu 22.04 and
> RHEL-9 are currently our targets with the oldest kernels
> that we need to retain compatibility with as the bare min.
> I would expect machine types to work on these old platforms
> without users to having to manually disable default set
> features.

Jason's proposal should have kept the behavior for old machine types so the
strict checks are bypassed, so at least existing running VMs with old
machine types should not be affected on booting.

New machine types may suffer from this indeed, that when running on old
kernels it may needs some tweak on cmdlines.

There's another alternative, which we can introduce an option to allow QEMU
boot but forbidding migration (or at least show a warning to user that
migration may not work properly).  Then everything can be auto-probed like
before, because migration ABI is not necessary.

Personally, I think Jason's proposal is a good trade-off we can consider,
if we think migration should by default supported on any QEMUs that would
boot up properly.

Thanks,

-- 
Peter Xu



  reply	other threads:[~2025-11-13 15:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07  2:01 [RFC PATCH] virtio-net: introduce strict peer feature check Jason Wang
2025-11-12 21:55 ` Peter Xu
2025-11-13  0:31   ` Jason Wang
2025-11-13 15:51     ` Peter Xu
2025-11-13  8:53   ` Daniel P. Berrangé
2025-11-13 15:58     ` Peter Xu [this message]
2025-11-13 16:09 ` Michael S. Tsirkin
2025-11-13 16:37   ` Peter Xu
2025-11-13 16:47     ` Michael S. Tsirkin
2025-11-13 17:12       ` Peter Xu
2025-11-13 17:46         ` Michael S. Tsirkin
2025-11-13 19:32           ` Peter Xu
2025-11-14  1:51             ` Jason Wang
2025-11-16  6:45               ` Michael S. Tsirkin
2025-11-19  2:06                 ` Jason Wang
2025-11-19  6:31                   ` Michael S. Tsirkin
2025-11-14  5:48             ` Thomas Huth
2025-11-14  9:53               ` Jinpu Wang
2025-11-14 15:47               ` Peter Xu
2025-11-14  1:32           ` Jason Wang
2025-11-16  6:52             ` Michael S. Tsirkin
2025-11-17  4:31               ` Jason Wang
2025-11-17  8:57                 ` Michael S. Tsirkin
2025-11-19  2:49                   ` Jason Wang
2025-11-19  8:07                     ` Michael S. Tsirkin
2025-11-20  1:45                       ` Jason Wang

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=aRYADVaYZ-IprJwt@x1.local \
    --to=peterx@redhat.com \
    --cc=berrange@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=farosas@suse.de \
    --cc=jasowang@redhat.com \
    --cc=jinpu.wang@ionos.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).