mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
Return path: Open a return path on QEMUFile for sockets
Postcopy needs a method to send messages from the destination back to the source, this is the 'return path'. Wire it up for 'socket' QEMUFile's. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
c1fcf220c9
commit
adc468e9b9
3 changed files with 79 additions and 9 deletions
|
@ -88,6 +88,11 @@ typedef size_t (QEMURamSaveFunc)(QEMUFile *f, void *opaque,
|
|||
size_t size,
|
||||
uint64_t *bytes_sent);
|
||||
|
||||
/*
|
||||
* Return a QEMUFile for comms in the opposite direction
|
||||
*/
|
||||
typedef QEMUFile *(QEMURetPathFunc)(void *opaque);
|
||||
|
||||
/*
|
||||
* Stop any read or write (depending on flags) on the underlying
|
||||
* transport on the QEMUFile.
|
||||
|
@ -106,6 +111,7 @@ typedef struct QEMUFileOps {
|
|||
QEMURamHookFunc *after_ram_iterate;
|
||||
QEMURamHookFunc *hook_ram_load;
|
||||
QEMURamSaveFunc *save_page;
|
||||
QEMURetPathFunc *get_return_path;
|
||||
QEMUFileShutdownFunc *shut_down;
|
||||
} QEMUFileOps;
|
||||
|
||||
|
@ -196,6 +202,7 @@ int64_t qemu_file_get_rate_limit(QEMUFile *f);
|
|||
int qemu_file_get_error(QEMUFile *f);
|
||||
void qemu_file_set_error(QEMUFile *f, int ret);
|
||||
int qemu_file_shutdown(QEMUFile *f);
|
||||
QEMUFile *qemu_file_get_return_path(QEMUFile *f);
|
||||
void qemu_fflush(QEMUFile *f);
|
||||
void qemu_file_set_blocking(QEMUFile *f, bool block);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue