diff options
| author | Steve Sistare <steven.sistare@oracle.com> | 2025-07-02 14:58:41 -0700 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2025-07-03 13:42:28 +0200 |
| commit | ccfc6715cf54caafba4c2516af394b4ed979c615 (patch) | |
| tree | 45b3b7625aec888762666589372db0a59e0effca /include/qapi/visitor-impl.h | |
| parent | 7ed0919119b0e7a6b7db1dcaca3a2cb30c771dd1 (diff) | |
| download | focaccia-qemu-ccfc6715cf54caafba4c2516af394b4ed979c615.tar.gz focaccia-qemu-ccfc6715cf54caafba4c2516af394b4ed979c615.zip | |
migration: cpr_get_fd_param helper
Add the helper function cpr_get_fd_param, to use when preserving a file descriptor that is opened externally and passed to QEMU. cpr_get_fd_param returns a descriptor number either from a QEMU command-line parameter, from a getfd command, or from CPR state. When a descriptor is passed to new QEMU via SCM_RIGHTS, its number changes. Hence, during CPR, the command-line parameter is ignored in new QEMU, and over-ridden by the value found in CPR state. Similarly, if the descriptor was originally specified by a getfd command in old QEMU, the fd number is not known outside of QEMU, and it changes when sent to new QEMU via SCM_RIGHTS. Hence the user cannot send getfd to new QEMU, but when the user sends a hotplug command that references the fd, cpr_get_fd_param finds its value in CPR state. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/qemu-devel/1751493538-202042-5-git-send-email-steven.sistare@oracle.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include/qapi/visitor-impl.h')
0 files changed, 0 insertions, 0 deletions