diff options
author | Juan Quintela <quintela@redhat.com> | 2023-10-11 22:35:24 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-10-17 09:25:13 +0200 |
commit | a4832d299ddefb3bbcf8561d9444a17addb1076c (patch) | |
tree | e7c51d28db3027c94d1351bedf9b463f619bd2b9 /migration/rdma.c | |
parent | b1b383872211a80a2011313969cb26e2ec43fa24 (diff) |
migration/rdma: Check sooner if we are in postcopy for save_page()
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231011203527.9061-11-quintela@redhat.com>
Diffstat (limited to 'migration/rdma.c')
-rw-r--r-- | migration/rdma.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/migration/rdma.c b/migration/rdma.c index c147c94b08..e973579a52 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -3240,10 +3240,6 @@ static int qemu_rdma_save_page(QEMUFile *f, ram_addr_t block_offset, RDMAContext *rdma; int ret; - if (migration_in_postcopy()) { - return RAM_SAVE_CONTROL_NOT_SUPP; - } - RCU_READ_LOCK_GUARD(); rdma = qatomic_rcu_read(&rioc->rdmaout); @@ -3317,7 +3313,7 @@ err: int rdma_control_save_page(QEMUFile *f, ram_addr_t block_offset, ram_addr_t offset, size_t size) { - if (!migrate_rdma()) { + if (!migrate_rdma() || migration_in_postcopy()) { return RAM_SAVE_CONTROL_NOT_SUPP; } |