qemu/migration
Leonardo Bras 90eb69e4f1 migration: Avoid false-positive on non-supported scenarios for zero-copy-send
Migration with zero-copy-send currently has it's limitations, as it can't
be used with TLS nor any kind of compression. In such scenarios, it should
output errors during parameter / capability setting.

But currently there are some ways of setting this not-supported scenarios
without printing the error message:

!) For 'compression' capability, it works by enabling it together with
zero-copy-send. This happens because the validity test for zero-copy uses
the helper unction migrate_use_compression(), which check for compression
presence in s->enabled_capabilities[MIGRATION_CAPABILITY_COMPRESS].

The point here is: the validity test happens before the capability gets
enabled. If all of them get enabled together, this test will not return
error.

In order to fix that, replace migrate_use_compression() by directly testing
the cap_list parameter migrate_caps_check().

2) For features enabled by parameters such as TLS & 'multifd_compression',
there was also a possibility of setting non-supported scenarios: setting
zero-copy-send first, then setting the unsupported parameter.

In order to fix that, also add a check for parameters conflicting with
zero-copy-send on migrate_params_check().

3) XBZRLE is also a compression capability, so it makes sense to also add
it to the list of capabilities which are not supported with zero-copy-send.

Fixes: 1abaec9a1b ("migration: Change zero_copy_send from migration parameter to migration capability")
Signed-off-by: Leonardo Bras <leobras@redhat.com>
Message-Id: <20220719122345.253713-1-leobras@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2022-07-20 12:15:09 +01:00
..
block-dirty-bitmap.c
block.c block: Change blk_{pread,pwrite}() param order 2022-07-12 12:14:56 +02:00
block.h
channel-block.c
channel-block.h
channel.c migration: Add helpers to detect TLS capability 2022-07-20 12:15:08 +01:00
channel.h
colo-failover.c
colo.c
dirtyrate.c migration/dirtyrate: Refactor dirty page rate calculation 2022-07-20 12:15:08 +01:00
dirtyrate.h migration/dirtyrate: Refactor dirty page rate calculation 2022-07-20 12:15:08 +01:00
exec.c
exec.h
fd.c
fd.h
global_state.c
meson.build
migration.c migration: Avoid false-positive on non-supported scenarios for zero-copy-send 2022-07-20 12:15:09 +01:00
migration.h migration: Add property x-postcopy-preempt-break-huge 2022-07-20 12:15:08 +01:00
multifd-zlib.c multifd: Copy pages before compressing them with zlib 2022-07-20 12:15:08 +01:00
multifd-zstd.c
multifd.c migration/multifd: Report to user when zerocopy not working 2022-07-20 12:15:09 +01:00
multifd.h multifd: Document the locking of MultiFD{Send/Recv}Params 2022-07-20 12:15:09 +01:00
page_cache.c
page_cache.h
postcopy-ram.c migration: Enable TLS for preempt channel 2022-07-20 12:15:09 +01:00
postcopy-ram.h migration: Create the postcopy preempt channel asynchronously 2022-07-20 12:15:08 +01:00
qemu-file.c migration: remove unreachable code after reading data 2022-07-20 12:15:09 +01:00
qemu-file.h migration: Postcopy recover with preempt enabled 2022-07-20 12:15:08 +01:00
ram.c migration/multifd: Report to user when zerocopy not working 2022-07-20 12:15:09 +01:00
ram.h migration/multifd: Report to user when zerocopy not working 2022-07-20 12:15:09 +01:00
rdma.c
rdma.h
savevm.c migration: Postcopy recover with preempt enabled 2022-07-20 12:15:08 +01:00
savevm.h
socket.c migration: Postcopy preemption preparation on channel creation 2022-07-20 12:15:08 +01:00
socket.h migration: Postcopy preemption preparation on channel creation 2022-07-20 12:15:08 +01:00
target.c
tls.c migration: Add helpers to detect TLS capability 2022-07-20 12:15:08 +01:00
tls.h migration: Add helpers to detect TLS capability 2022-07-20 12:15:08 +01:00
trace-events migration: Enable TLS for preempt channel 2022-07-20 12:15:09 +01:00
trace.h
vmstate-types.c
vmstate.c
xbzrle.c
xbzrle.h
yank_functions.c
yank_functions.h