From nobody Wed Feb 11 05:35:33 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1698136946; cv=none; d=zohomail.com; s=zohoarc; b=E73+kPD2KEMmHt4CDgR64m27YCXjXkYR0U0fRA+eOxfEz/O3Vj9GHhlfI/qzs/n5QgszE5Zo7wyMkqmDAA7hcfGrhMmGw4JSvfMo9GqMT9GmziWijBzgQbRvMQRH2QtpcKZjRpnB7ZAwKOJJGJD7w67qnlkMQA/fY+sM/geuvxk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698136946; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=BS4K4hPt4nte3fTZb5lBi+CHvfoDZl40p9U7Y5fbyOg=; b=Mec/55B8TxAWJKU4mEfln3OvZtzwgXZkHnUj9NfoSfa+LrsXIq/ou0VsBM8KX0DTQqUZ7BVMvYPoISdyEtuooXzIRjxgJ8Re4/bQ5QIPd+gYvEIi33SwzUnFxkShOFBOVjaW201Okvasb567owVL/hfRpLJOCUtbV62nA2ikFko= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1698136946799280.0575971814786; Tue, 24 Oct 2023 01:42:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvCyU-00041D-Ej; Tue, 24 Oct 2023 04:41:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvCyR-0003yk-Cq for qemu-devel@nongnu.org; Tue, 24 Oct 2023 04:41:15 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvCyP-0003LO-QA for qemu-devel@nongnu.org; Tue, 24 Oct 2023 04:41:15 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-75-VvVOjqkeNrq82tOb4k6P1g-1; Tue, 24 Oct 2023 04:41:01 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DA96B1019C99; Tue, 24 Oct 2023 08:41:00 +0000 (UTC) Received: from localhost (unknown [10.39.208.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id CF25CC15BB8; Tue, 24 Oct 2023 08:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698136872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BS4K4hPt4nte3fTZb5lBi+CHvfoDZl40p9U7Y5fbyOg=; b=YV+Q8DEdhHhlD7ShwS5EvxwMzQWFo6j211o4JbRIkIKkH60z9aTixX8CL10XwbrORy2DJR MpS+yForWSVEBMMn/0Kq3Z40DVy2En2ZGQlyrSSJjlHaMREcNuKFUB6bgN/6BhRE+0l6yf d337dgDSuvS1Xh1+0VloZbhsgjWYXrE= X-MC-Unique: VvVOjqkeNrq82tOb4k6P1g-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: Kevin Wolf , "Michael S. Tsirkin" , Fabiano Rosas , John Snow , Hanna Reitz , Leonardo Bras , Samuel Thibault , qemu-block@nongnu.org, Peter Xu , Jason Wang , Juan Quintela , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v2 3/9] net/slirp: use different IDs for each instance Date: Tue, 24 Oct 2023 12:40:37 +0400 Message-ID: <20231024084043.2926316-4-marcandre.lureau@redhat.com> In-Reply-To: <20231024084043.2926316-1-marcandre.lureau@redhat.com> References: <20231024084043.2926316-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1698136948523100007 From: Marc-Andr=C3=A9 Lureau Using always 0, QEMU will end up loading the same instance, even if multiple have been saved. Signed-off-by: Marc-Andr=C3=A9 Lureau --- net/slirp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/slirp.c b/net/slirp.c index c33b3e02e7..af1451b60f 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -47,6 +47,7 @@ #include "util.h" #include "migration/register.h" #include "migration/qemu-file-types.h" +#include "migration/vmstate.h" =20 static int get_str_sep(char *buf, int buf_size, const char **pp, int sep) { @@ -659,7 +660,7 @@ static int net_slirp_init(NetClientState *peer, const c= har *model, * specific version? */ g_assert(slirp_state_version() =3D=3D 4); - register_savevm_live("slirp", 0, slirp_state_version(), + register_savevm_live("slirp", VMSTATE_INSTANCE_ID_ANY, slirp_state_ver= sion(), &savevm_slirp_state, s->slirp); =20 s->poll_notifier.notify =3D net_slirp_poll_notify; --=20 2.41.0