This patch introduces a buffered QEMUFile wrapper. This allows QEMUFile's to be
rate limited. It also makes it easier to implement a QEMUFile that is
asynchronous since the current QEMUFile API requires that all reads and writes
The only real non-obvious part of the API is the "frozen" concept. If the
backend returns EAGAIN, the QEMUFile is said to be "frozen". This means no
additional output will be sent to the backend until the file is unfrozen.
qemu_file_put_notify can be used to unfreeze a frozen file.
A synchronous interface is also provided to wait for an unfreeze event. This is
used during the final part of live migration when the VM is no longer running.
Signed-off-by: Anthony Liguori <email@example.com>