[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 05/13] migration: Use VMSTATE_INSTANCE_ID_ANY for slirp
From: |
Juan Quintela |
Subject: |
[PATCH v2 05/13] migration: Use VMSTATE_INSTANCE_ID_ANY for slirp |
Date: |
Fri, 20 Oct 2023 11:07:23 +0200 |
Each user network conection create a new slirp instance. We register
more than one slirp instance for number 0.
qemu-system-x86_64: -netdev user,id=hs1: savevm_state_handler_insert: Detected
duplicate SaveStateEntry: id=slirp, instance_id=0x0
Broken pipe
../../../../../mnt/code/qemu/full/tests/qtest/libqtest.c:195: kill_qemu() tried
to terminate QEMU process but encountered exit status 1 (expected 0)
Aborted (core dumped)
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
net/slirp.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/slirp.c b/net/slirp.c
index c33b3e02e7..25b49c4526 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -46,6 +46,7 @@
#include "qapi/qmp/qdict.h"
#include "util.h"
#include "migration/register.h"
+#include "migration/vmstate.h"
#include "migration/qemu-file-types.h"
static int get_str_sep(char *buf, int buf_size, const char **pp, int sep)
@@ -659,8 +660,8 @@ static int net_slirp_init(NetClientState *peer, const char
*model,
* specific version?
*/
g_assert(slirp_state_version() == 4);
- register_savevm_live("slirp", 0, slirp_state_version(),
- &savevm_slirp_state, s->slirp);
+ register_savevm_live("slirp", VMSTATE_INSTANCE_ID_ANY,
+ slirp_state_version(), &savevm_slirp_state, s->slirp);
s->poll_notifier.notify = net_slirp_poll_notify;
main_loop_poll_add_notifier(&s->poll_notifier);
--
2.41.0
- Re: [PATCH v2 03/13] migration: Use vmstate_register_any() for isa-ide, (continued)
[PATCH v2 04/13] migration: Use vmstate_register_any() for ipmi-bt*, Juan Quintela, 2023/10/20
[PATCH v2 06/13] migration: Use VMSTATE_INSTANCE_ID_ANY for s390 devices, Juan Quintela, 2023/10/20
Re: [PATCH v2 06/13] migration: Use VMSTATE_INSTANCE_ID_ANY for s390 devices, Thomas Huth, 2023/10/20
[PATCH v2 05/13] migration: Use VMSTATE_INSTANCE_ID_ANY for slirp,
Juan Quintela <=
[PATCH v2 08/13] migration: vmstate_register() check that instance_id is valid, Juan Quintela, 2023/10/20
[PATCH v2 07/13] migration: Hack to maintain backwards compatibility for ppc, Juan Quintela, 2023/10/20
[PATCH v2 10/13] migration: Improve example and documentation of vmstate_register(), Juan Quintela, 2023/10/20
[PATCH v2 09/13] migration: Check in savevm_state_handler_insert for dups, Juan Quintela, 2023/10/20
[PATCH v2 11/13] migration: Use vmstate_register_any() for audio, Juan Quintela, 2023/10/20
[PATCH v2 12/13] migration: Use vmstate_register_any() for eeprom93xx, Juan Quintela, 2023/10/20