[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 07/22] migration: Add an ability to ignore shared
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PULL 07/22] migration: Add an ability to ignore shared RAM blocks |
Date: |
Fri, 8 Mar 2019 17:12:41 +0000 |
On Wed, 6 Mar 2019 at 11:55, Dr. David Alan Gilbert (git)
<address@hidden> wrote:
>
> From: Yury Kotov <address@hidden>
>
> If ignore-shared capability is set then skip shared RAMBlocks during the
> RAM migration.
> Also, move qemu_ram_foreach_migratable_block (and rename) to the
> migration code, because it requires access to the migration capabilities.
>
> --- a/migration/rdma.c
> +++ b/migration/rdma.c
> @@ -644,7 +644,7 @@ static int qemu_rdma_init_ram_blocks(RDMAContext *rdma)
>
> assert(rdma->blockmap == NULL);
> memset(local, 0, sizeof *local);
> - qemu_ram_foreach_migratable_block(qemu_rdma_init_one_block, rdma);
> + foreach_not_ignored_block(qemu_rdma_init_one_block, rdma);
> trace_qemu_rdma_init_ram_blocks(local->nb_blocks);
> rdma->dest_blocks = g_new0(RDMADestBlock,
> rdma->local_ram_blocks.nb_blocks);
Hi. This change causes Coverity to gripe (CID 1399413) because
the return value from foreach_not_ignored_block() is ignored
here but it is checked on every other use of the function.
This is one of those Coverity errors where it's just using a
sometimes-wrong heuristic, so we could just mark it as a false
positive (AFAICT qemu_rdma_init_one_block() always returns 0),
but OTOH rdma_add_block() and qemu_rdma_init_one_block()
carefully pipe through a return value, so maybe it's worth assert()ing
in case somebody changes rdma_add_block() to maybe fail later?
I don't think there's much in it -- let me know if you just want
me to mark the issue as a false positive.
thanks
-- PMM
- [Qemu-devel] [PULL 00/22] migration queue, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 01/22] migration: Fix cancel state, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 02/22] migration/rdma: Fix qemu_rdma_cleanup null check, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 03/22] migration: Cleanup during exit, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 04/22] migration/rdma: clang compilation fix, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 05/22] exec: Change RAMBlockIterFunc definition, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 06/22] migration: Introduce ignore-shared capability, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 07/22] migration: Add an ability to ignore shared RAM blocks, Dr. David Alan Gilbert (git), 2019/03/06
- Re: [Qemu-devel] [PULL 07/22] migration: Add an ability to ignore shared RAM blocks,
Peter Maydell <=
- [Qemu-devel] [PULL 08/22] tests/migration-test: Add a test for ignore-shared capability, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 09/22] migration: Add capabilities validation, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 10/22] tests: Add migration xbzrle test, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 11/22] migration: Create socket-address parameter, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 12/22] tests: Add basic migration precopy tcp test, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 13/22] bitmap: fix bitmap_count_one, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 15/22] migration: use bitmap_mutex in migration_bitmap_clear_dirty, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 16/22] migration: API to clear bits of guest free pages from the dirty bitmap, Dr. David Alan Gilbert (git), 2019/03/06
- [Qemu-devel] [PULL 14/22] bitmap: bitmap_count_one_with_offset, Dr. David Alan Gilbert (git), 2019/03/06