All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: "Cédric Le Goater" <clg@redhat.com>
Cc: Avihai Horon <avihaih@nvidia.com>,
	qemu-devel@nongnu.org,
	Alex Williamson <alex.williamson@redhat.com>,
	Fabiano Rosas <farosas@suse.de>
Subject: Re: [PATCH 2/3] vfio/migration: Refactor vfio_vmstate_change/_prepare() error reporting
Date: Mon, 21 Oct 2024 12:54:22 -0400	[thread overview]
Message-ID: <ZxaHPo7GRPuby5ky@x1n> (raw)
In-Reply-To: <68d60abe-32b6-49b3-bc60-6c92909252f0@redhat.com>

On Mon, Oct 21, 2024 at 06:43:13PM +0200, Cédric Le Goater wrote:
> Hello,
> 
> > IIUC the migration thread should always see valid migration object, as it
> > takes one refcount at the entrance of migration_thread():
> > 
> >      object_ref(OBJECT(s));
> 
> Could the migration have failed before ? in migrate_fd_connect()

I just noticed it's a vm state change notifier..

If so, maybe VFIO could refer to its internal states showing that it's
during a migration first (so as to guarantee the migration object is valid;
e.g., only after save_setup() but before save_cleanup() hooks are invoked).

Then migration_file_set_error() is only needed when it's during a migration
already.  Otherwise it's only a vm state change event, so nothing relevant
to migration.

-- 
Peter Xu



  reply	other threads:[~2024-10-21 16:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-20 13:01 [PATCH 0/3] vfio/migration: Some bug fixes and cleanups Avihai Horon
2024-10-20 13:01 ` [PATCH 1/3] vfio/migration: Report only stop-copy size in vfio_state_pending_exact() Avihai Horon
2024-10-21  6:48   ` Cédric Le Goater
2024-10-23 10:06   ` Cédric Le Goater
2024-10-25 15:18   ` Michael Tokarev
2024-10-25 16:09     ` Cédric Le Goater
2024-10-20 13:01 ` [PATCH 2/3] vfio/migration: Refactor vfio_vmstate_change/_prepare() error reporting Avihai Horon
2024-10-21 15:14   ` Cédric Le Goater
2024-10-21 15:50     ` Peter Xu
2024-10-21 16:43       ` Cédric Le Goater
2024-10-21 16:54         ` Peter Xu [this message]
2024-10-22  9:38           ` Avihai Horon via
2024-10-22 13:24             ` Cédric Le Goater
2024-10-22 14:21               ` Avihai Horon
2024-10-22 14:29               ` Peter Xu
2024-10-22 14:42                 ` Cédric Le Goater
2024-10-22 16:10                   ` Peter Xu
2024-10-20 13:01 ` [PATCH 3/3] vfio/migration: Change trace formats from hex to decimal Avihai Horon
2024-10-21 15:17   ` Cédric Le Goater
2024-10-23 15:08 ` [PATCH 0/3] vfio/migration: Some bug fixes and cleanups Cédric Le Goater

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=ZxaHPo7GRPuby5ky@x1n \
    --to=peterx@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=avihaih@nvidia.com \
    --cc=clg@redhat.com \
    --cc=farosas@suse.de \
    --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.