You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/migration
Eric Blake ec59a65a4d qio: Provide accessor around QIONetListener->sioc
An upcoming patch needs to pass more than just sioc as the opaque
pointer to an AioContext; but since our AioContext code in general
(and its QIO Channel wrapper code) lacks a notify callback present
with GSource, we do not have the trivial option of just g_malloc'ing a
small struct to hold all that data coupled with a notify of g_free.
Instead, the data pointer must outlive the registered handler; in
fact, having the data pointer have the same lifetime as QIONetListener
is adequate.

But the cleanest way to stick such a helper struct in QIONetListener
will be to rearrange internal struct members.  And that in turn means
that all existing code that currently directly accesses
listener->nsioc and listener->sioc[] should instead go through
accessor functions, to be immune to the upcoming struct layout
changes.  So this patch adds accessor methods qio_net_listener_nsioc()
and qio_net_listener_sioc(), and puts them to use.

While at it, notice that the pattern of grabbing an sioc from the
listener only to turn around can call
qio_channel_socket_get_local_address is common enough to also warrant
the helper of qio_net_listener_get_local_address, and fix a copy-paste
error in the corresponding documentation.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-ID: <20251113011625.878876-24-eblake@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
3 days ago
..
block-active.c migration/block-active: Remove global active flag 9 months ago
block-dirty-bitmap.c migration: Rename save_live_complete_precopy to save_complete 4 months ago
channel-block.c migration: add FEATURE_SEEKABLE to QIOChannelBlock 2 weeks ago
channel-block.h migration: introduce a QIOChannel impl for BlockDriverState VMState 3 years ago
channel.c migration: Properly wait on G_IO_IN when peeking messages 2 weeks ago
channel.h migration: check magic value for deciding the mapping of channels 3 years ago
colo-failover.c migration/colo: Improve an x-colo-lost-heartbeat error message 3 years ago
colo-stubs.c migration/colo: make colo_incoming_co() return void 2 years ago
colo.c migration: Update qemu_file_get_return_path() docs and remove dead checks 1 month ago
cpr-exec.c migration/cpr: Fix UAF in cpr_exec_cb() when execvp() fails 2 weeks ago
cpr-transfer.c migration: Support fd-based socket address in cpr_transfer_input 5 months ago
cpr.c migration/cpr: Fix coverity report in cpr_exec_persist_state() 2 weeks ago
cpu-throttle.c include: Rename sysemu/ -> system/ 11 months ago
dirtyrate.c include/system: Move exec/ramblock.h to system/ramblock.h 7 months ago
dirtyrate.h include: Rename sysemu/ -> system/ 11 months ago
exec.c migration: simplify exec migration functions 2 years ago
exec.h migration: convert exec backend to accept MigrateAddress. 2 years ago
fd.c migration: Allow pipes to keep working for fd migrations 12 months ago
fd.h migration: Revert mapped-ram multifd support to fd: URI 2 years ago
file.c include/system: Move exec/ramblock.h to system/ramblock.h 7 months ago
file.h migration/multifd: Pass in MultiFDPages_t to file_write_ramblock_iov 1 year ago
global_state.c include: Rename sysemu/ -> system/ 11 months ago
meson.build migration: cpr-exec save and load 1 month ago
migration-hmp-cmds.c migration/cpr: Document obscure usage of g_autofree when parse str 2 weeks ago
migration-stats.c migration: migration_rate_limit_reset() don't need the QEMUFile 2 years ago
migration-stats.h migration: Remove transferred atomic counter 2 years ago
migration.c migration: Introduce POSTCOPY_DEVICE state 2 weeks ago
migration.h migration: Introduce POSTCOPY_DEVICE state 2 weeks ago
multifd-device-state.c migration: Rename save_live_complete_precopy_thread to save_complete_precopy_thread 4 months ago
multifd-nocomp.c migration: enable multifd and postcopy together 6 months ago
multifd-qatzip.c include/system: Move exec/ramblock.h to system/ramblock.h 7 months ago
multifd-qpl.c include/system: Move exec/ramblock.h to system/ramblock.h 7 months ago
multifd-uadk.c include/system: Move exec/ramblock.h to system/ramblock.h 7 months ago
multifd-zero-page.c migration: write zero pages when postcopy enabled 6 months ago
multifd-zlib.c include/system: Move exec/ramblock.h to system/ramblock.h 7 months ago
multifd-zstd.c include/system: Move exec/ramblock.h to system/ramblock.h 7 months ago
multifd.c migration/multifd/tls: Cleanup BYE message processing on sender side 1 month ago
multifd.h migration/multifd: move macros to multifd header 7 months ago
options.c migration: mapped-ram: handle zero pages 2 weeks ago
options.h migration/savevm: Add a compatibility check for capabilities 2 weeks ago
page_cache.c migration: Fix cache_init()'s "Failed to allocate" error messages 5 years ago
page_cache.h migration: Clean up signed vs. unsigned XBZRLE cache-size 5 years ago
postcopy-ram.c migration: Introduce POSTCOPY_DEVICE state 2 weeks ago
postcopy-ram.h migration: Introduce postcopy incoming setup and cleanup functions 2 weeks ago
qemu-file.c io: Add qio_channel_wait_cond() helper 2 weeks ago
qemu-file.h migration: qemu_file_set_blocking(): add errp parameter 2 months ago
ram.c migration: mapped-ram: handle zero pages 2 weeks ago
ram.h migration: push Error **errp into loadvm_process_enable_colo() 1 month ago
rdma.c migration/rdma: Remove qemu_rdma_broken_ipv6_kernel 7 months ago
rdma.h migration: Unfold control_save_page() 7 months ago
savevm.c migration: Introduce POSTCOPY_DEVICE state 2 weeks ago
savevm.h migration: Introduce POSTCOPY_DEVICE state 2 weeks ago
socket.c qio: Provide accessor around QIONetListener->sioc 3 days ago
socket.h migration: Remove unused socket_send_channel_create_sync 1 year ago
threadinfo.c migration/multifd: Protect accesses to migration_threads 2 years ago
threadinfo.h migration/multifd: Protect accesses to migration_threads 2 years ago
tls.c migration: activate TLS thread safety workaround 4 months ago
tls.h migration/multifd: Terminate the TLS connection 9 months ago
trace-events migration: Introduce POSTCOPY_DEVICE state 2 weeks ago
trace.h trace: switch position of headers to what Meson requires 5 years ago
vfio-stub.c migration/vfio: compile only once 3 months ago
vfio.c migration/vfio: compile only once 3 months ago
vmstate-types.c migration: cpr-exec mode 1 month ago
vmstate.c migration: vmsd errp handlers: return bool 2 weeks ago
xbzrle.c migration/xbzrle: Use i386 host/cpuinfo.h 3 years ago
xbzrle.h migration/xbzrle: Use i386 host/cpuinfo.h 3 years ago
yank_functions.c migration/yank: Use channel features 2 years ago
yank_functions.h migration: Move the yank unregister of channel_close out 4 years ago