qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v9 07/14] vfio/migration: Block multiple devices migration


From: Avihai Horon
Subject: Re: [PATCH v9 07/14] vfio/migration: Block multiple devices migration
Date: Wed, 8 Feb 2023 19:16:34 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1


On 08/02/2023 18:44, Cédric Le Goater wrote:
External email: Use caution opening links or attachments


On 2/8/23 14:08, Avihai Horon wrote:

On 08/02/2023 0:34, Alex Williamson wrote:
External email: Use caution opening links or attachments


On Mon, 6 Feb 2023 14:31:30 +0200
Avihai Horon <avihaih@nvidia.com> wrote:

Currently VFIO migration doesn't implement some kind of intermediate
quiescent state in which P2P DMAs are quiesced before stopping or
running the device. This can cause problems in multi-device migration
where the devices are doing P2P DMAs, since the devices are not stopped
together at the same time.

Until such support is added, block migration of multiple devices.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
---
  include/hw/vfio/vfio-common.h |  2 ++
  hw/vfio/common.c              | 51 +++++++++++++++++++++++++++++++++++
  hw/vfio/migration.c           |  6 +++++
  3 files changed, 59 insertions(+)

diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
index e573f5a9f1..56b1683824 100644
--- a/include/hw/vfio/vfio-common.h
+++ b/include/hw/vfio/vfio-common.h
@@ -218,6 +218,8 @@ typedef QLIST_HEAD(VFIOGroupList, VFIOGroup) VFIOGroupList;
  extern VFIOGroupList vfio_group_list;

  bool vfio_mig_active(void);
+int vfio_block_multiple_devices_migration(Error **errp);
+void vfio_unblock_multiple_devices_migration(void);
  int64_t vfio_mig_bytes_transferred(void);

  #ifdef CONFIG_LINUX
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 3a35f4afad..01db41b735 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -41,6 +41,7 @@
  #include "qapi/error.h"
  #include "migration/migration.h"
  #include "migration/misc.h"
+#include "migration/blocker.h"
  #include "sysemu/tpm.h"

  VFIOGroupList vfio_group_list =
@@ -337,6 +338,56 @@ bool vfio_mig_active(void)
      return true;
  }

+Error *multiple_devices_migration_blocker;

static ?

Yes, I will add.

So we have two migration blockers, one per device and one global. I guess
it is easier that way than trying to update the per device Error*.

Yes, because this blocker is not related to a specific device but rather to how many devices we have at a specific moment.

Thanks.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]