mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
For 6.0 misc patches under my radar.
V2: - "tests: Add tests for yank with the chardev-change case" updated - drop the readthedoc theme patch -----BEGIN PGP SIGNATURE----- iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmBltIwcHG1hcmNhbmRy ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5QzCEACOWNUlT5mTylY52sB4 RXxt+vFFby6aj/M5/tXv7T4EHShWkycV5kEnGjUKiWQXfHfHRfOur6PXkbTMG5zY UBEuVAMWW50O2VQZR51W+kohZxsxNnimK2gnCTNGjDWOiofTFAcDf7Ycfxbg1TYU fsO3m/dl9cy1fBgCsm64+61T60DC5W0JRsxoRCR1qr4vbJtXjoYe9i21GMWOr548 EVZo3XQDe5WYeTRyTpf1lHU0dLPrJqZuKmF6M3IQWXG7+ns7iMA0v/STmwsBwqSr W6vygj2vPKAi1b1X1z/t/IGXP7mOtTZMUZWxhdOcxqEgYyP4rZji02U33CCd0fCi wbD8VOmwvtqPeEHXu/b/dhpacgHis1w8jyJspAcW0MIpFJ+1mn+xtWnmMUlA2cOS Vmgirinycsim9TKA+jS3vTwT+/wwzqtWUY267m09tVhJwxvGOXQH1i+mlRRLoNcs 2vf5iWanRbZgFJme8UYtqYB96pWIJjMa1FkMexJgK3VXgMA+Rjkr4MqIyuPoquyp /3PgoUU1LUmGh8F+mi8m88tpdgad6iM+UWXeRALsP7UFvP1Psjz8f6Fhh8uBeE7E wsdBsdTwwZ3zgLD4DxjpcZdLM+G7PT0nbeodnPWRuwebsYt3FymoCdmkS1CEn9ZT kbQxdeJhTa7QoacZUmQSAoXO6g== =UwXe -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/marcandre/tags/for-6.0-pull-request' into staging For 6.0 misc patches under my radar. V2: - "tests: Add tests for yank with the chardev-change case" updated - drop the readthedoc theme patch # gpg: Signature made Thu 01 Apr 2021 12:54:52 BST # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * remotes/marcandre/tags/for-6.0-pull-request: tests: Add tests for yank with the chardev-change case chardev: Fix yank with the chardev-change case chardev/char.c: Always pass id to chardev_new chardev/char.c: Move object_property_try_add_child out of chardev_new yank: Always link full yank code yank: Remove dependency on qiochannel docs: simplify each section title dbus-vmstate: Increase the size of input stream buffer used during load util: fix use-after-free in module_load_one Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
415fa2fe91
25 changed files with 417 additions and 106 deletions
|
@ -20,6 +20,7 @@
|
|||
#include "io/channel-tls.h"
|
||||
#include "io/channel-socket.h"
|
||||
#include "qemu/yank.h"
|
||||
#include "yank_functions.h"
|
||||
|
||||
/**
|
||||
* @migration_channel_process_incoming - Create new incoming migration channel
|
||||
|
@ -38,7 +39,8 @@ void migration_channel_process_incoming(QIOChannel *ioc)
|
|||
ioc, object_get_typename(OBJECT(ioc)));
|
||||
|
||||
if (object_dynamic_cast(OBJECT(ioc), TYPE_QIO_CHANNEL_SOCKET)) {
|
||||
yank_register_function(MIGRATION_YANK_INSTANCE, yank_generic_iochannel,
|
||||
yank_register_function(MIGRATION_YANK_INSTANCE,
|
||||
migration_yank_iochannel,
|
||||
QIO_CHANNEL(ioc));
|
||||
}
|
||||
|
||||
|
@ -76,7 +78,7 @@ void migration_channel_connect(MigrationState *s,
|
|||
if (!error) {
|
||||
if (object_dynamic_cast(OBJECT(ioc), TYPE_QIO_CHANNEL_SOCKET)) {
|
||||
yank_register_function(MIGRATION_YANK_INSTANCE,
|
||||
yank_generic_iochannel,
|
||||
migration_yank_iochannel,
|
||||
QIO_CHANNEL(ioc));
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ migration_files = files(
|
|||
'vmstate.c',
|
||||
'qemu-file-channel.c',
|
||||
'qemu-file.c',
|
||||
'yank_functions.c',
|
||||
)
|
||||
softmmu_ss.add(migration_files)
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "qemu/yank.h"
|
||||
#include "io/channel-socket.h"
|
||||
#include "yank_functions.h"
|
||||
|
||||
/* Multiple fd's */
|
||||
|
||||
|
@ -989,7 +990,7 @@ int multifd_load_cleanup(Error **errp)
|
|||
if (object_dynamic_cast(OBJECT(p->c), TYPE_QIO_CHANNEL_SOCKET)
|
||||
&& OBJECT(p->c)->ref == 1) {
|
||||
yank_unregister_function(MIGRATION_YANK_INSTANCE,
|
||||
yank_generic_iochannel,
|
||||
migration_yank_iochannel,
|
||||
QIO_CHANNEL(p->c));
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "io/channel-socket.h"
|
||||
#include "qemu/iov.h"
|
||||
#include "qemu/yank.h"
|
||||
#include "yank_functions.h"
|
||||
|
||||
|
||||
static ssize_t channel_writev_buffer(void *opaque,
|
||||
|
@ -108,7 +109,7 @@ static int channel_close(void *opaque, Error **errp)
|
|||
if (object_dynamic_cast(OBJECT(ioc), TYPE_QIO_CHANNEL_SOCKET)
|
||||
&& OBJECT(ioc)->ref == 1) {
|
||||
yank_unregister_function(MIGRATION_YANK_INSTANCE,
|
||||
yank_generic_iochannel,
|
||||
migration_yank_iochannel,
|
||||
QIO_CHANNEL(ioc));
|
||||
}
|
||||
object_unref(OBJECT(ioc));
|
||||
|
|
20
migration/yank_functions.c
Normal file
20
migration/yank_functions.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* migration yank functions
|
||||
*
|
||||
* Copyright (c) Lukas Straub <lukasstraub2@web.de>
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
||||
* See the COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "io/channel.h"
|
||||
#include "yank_functions.h"
|
||||
|
||||
void migration_yank_iochannel(void *opaque)
|
||||
{
|
||||
QIOChannel *ioc = QIO_CHANNEL(opaque);
|
||||
|
||||
qio_channel_shutdown(ioc, QIO_CHANNEL_SHUTDOWN_BOTH, NULL);
|
||||
}
|
17
migration/yank_functions.h
Normal file
17
migration/yank_functions.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* migration yank functions
|
||||
*
|
||||
* Copyright (c) Lukas Straub <lukasstraub2@web.de>
|
||||
*
|
||||
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
||||
* See the COPYING file in the top-level directory.
|
||||
*/
|
||||
|
||||
/**
|
||||
* migration_yank_iochannel: yank function for iochannel
|
||||
*
|
||||
* This yank function will call qio_channel_shutdown on the provided QIOChannel.
|
||||
*
|
||||
* @opaque: QIOChannel to shutdown
|
||||
*/
|
||||
void migration_yank_iochannel(void *opaque);
|
Loading…
Add table
Add a link
Reference in a new issue