[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/40] migration: Use VMSTATE_INSTANCE_ID_ANY for slirp
From: |
Juan Quintela |
Subject: |
[PULL 08/40] migration: Use VMSTATE_INSTANCE_ID_ANY for slirp |
Date: |
Thu, 2 Nov 2023 12:40:22 +0100 |
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>
Message-ID: <20231020090731.28701-6-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
- [PULL 00/40] Migration 20231102 patches, Juan Quintela, 2023/11/02
- [PULL 01/40] hw/ipmi: Don't call vmstate_register() from instance_init() functions, Juan Quintela, 2023/11/02
- [PULL 02/40] hw/s390x/s390-skeys: Don't call register_savevm_live() during instance_init(), Juan Quintela, 2023/11/02
- [PULL 03/40] hw/s390x/s390-stattrib: Simplify handling of the "migration-enabled" property, Juan Quintela, 2023/11/02
- [PULL 04/40] hw/s390x/s390-stattrib: Don't call register_savevm_live() during instance_init(), Juan Quintela, 2023/11/02
- [PULL 05/40] migration: Create vmstate_register_any(), Juan Quintela, 2023/11/02
- [PULL 06/40] migration: Use vmstate_register_any(), Juan Quintela, 2023/11/02
- [PULL 07/40] migration: Use vmstate_register_any() for isa-ide, Juan Quintela, 2023/11/02
- [PULL 08/40] migration: Use VMSTATE_INSTANCE_ID_ANY for slirp,
Juan Quintela <=
- [PULL 09/40] migration: Hack to maintain backwards compatibility for ppc, Juan Quintela, 2023/11/02
- [PULL 11/40] migration: Improve example and documentation of vmstate_register(), Juan Quintela, 2023/11/02
- [PULL 10/40] migration: Check in savevm_state_handler_insert for dups, Juan Quintela, 2023/11/02
- [PULL 13/40] migration: Use vmstate_register_any() for eeprom93xx, Juan Quintela, 2023/11/02
- [PULL 12/40] migration: Use vmstate_register_any() for audio, Juan Quintela, 2023/11/02
- [PULL 14/40] migration: Use vmstate_register_any() for vmware_vga, Juan Quintela, 2023/11/02
- [PULL 15/40] migration: Set downtime_start even for postcopy, Juan Quintela, 2023/11/02
- [PULL 16/40] migration: Add migration_downtime_start|end() helpers, Juan Quintela, 2023/11/02
- [PULL 19/40] migration: Add tracepoints for downtime checkpoints, Juan Quintela, 2023/11/02
- [PULL 17/40] migration: Add per vmstate downtime tracepoints, Juan Quintela, 2023/11/02