From nobody Mon Feb 9 11:08:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1649399845; cv=none; d=zohomail.com; s=zohoarc; b=BkOLplhNL4jwwZCJFFOLQ1WX3+Bgy3Fl1zPqvwwgc5TUjEH1b34As1QSWlFdZwq1ujpEt5dCHlJt/fkn4wblBoJdL3KyUkhYhc9CITvGTJG7b+cseDLIhdm6gRqT2qm+SEVIRNOMSXqS3MHd1JLNG0k2UgDDwAQaGNp8dniBpyo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1649399845; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1w0RmC1LWOnjLdmzKEv+bZpp0oOhUZ9Tmz3ZYRNTK3U=; b=L0aSg5k9RHszl4aIfVRGiQaiNiQeWLFumOwid/AYq0Xet8ODvKY9+0ZwbohapJJIRuHK9nQlyrAg4rNOHFz32V5m1Dj6hgFkS3OzyHm4uPhdnotC5oyVTVspVBMm8jkNUEe2T6PU3kHB9kx+TT1kBLviWUltuVYthVWVe6CILtY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1649399845746495.60940811964076; Thu, 7 Apr 2022 23:37:25 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-92-DY3zcNTxMJ-gXPq6FCe7dA-1; Fri, 08 Apr 2022 02:37:23 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 67C0A8556F4; Fri, 8 Apr 2022 06:37:21 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 73DD5492D4C; Fri, 8 Apr 2022 06:37:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 28A901940341; Fri, 8 Apr 2022 06:37:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BD0EC1940340 for ; Fri, 8 Apr 2022 06:37:17 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 814BA407C943; Fri, 8 Apr 2022 06:37:17 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.40.192.169]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 42C44404D91B for ; Fri, 8 Apr 2022 06:37:17 +0000 (UTC) Received: by rein.int.mamuti.net (Postfix, from userid 500) id 0EE7E180158; Fri, 8 Apr 2022 08:37:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649399844; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=1w0RmC1LWOnjLdmzKEv+bZpp0oOhUZ9Tmz3ZYRNTK3U=; b=Z5rM305zZJ+egcvpT0fBp4yn2PIuiMzKzBLbxA0AiOy26FxhlQ0ZlC058YZ4nTL1dN6oqC 66nKKPRiKSMUVEWc0u7aTAkyhJWMp7hamSKqyj+8pWkiUtLRpiwVDgCk5RFx+n3FWzKI4j GxE5Wtl35BUx+yVhs9bnCeeY+6htMck= X-MC-Unique: DY3zcNTxMJ-gXPq6FCe7dA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 1/2] qemu: Simplify qemuProcessIncomingDef Date: Fri, 8 Apr 2022 08:37:00 +0200 Message-Id: <8ab725c3ec61f9c6641c115217ceec72174d0f5c.1649399317.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1649399846288100001 Content-Type: text/plain; charset="utf-8"; x-default="true" All QEMU releases currently supported by libvirt already understand "-incoming defer". We can drop the code handling "-incoming URI". Signed-off-by: Jiri Denemark --- src/qemu/qemu_migration.c | 3 +-- src/qemu/qemu_process.c | 22 +++++++--------------- src/qemu/qemu_process.h | 3 +-- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 98f82abe7c..30a6202d85 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3040,8 +3040,7 @@ qemuMigrationDstPrepareAny(virQEMUDriver *driver, VIR_DEBUG("Received no lockstate"); } =20 - if (incoming->deferredURI && - qemuMigrationDstRun(driver, vm, incoming->deferredURI, + if (qemuMigrationDstRun(driver, vm, incoming->uri, VIR_ASYNC_JOB_MIGRATION_IN) < 0) goto stopjob; =20 diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 995737ce86..2e11d24be2 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4559,8 +4559,7 @@ qemuProcessIncomingDefFree(qemuProcessIncomingDef *in= c) return; =20 g_free(inc->address); - g_free(inc->launchURI); - g_free(inc->deferredURI); + g_free(inc->uri); g_free(inc); } =20 @@ -4589,15 +4588,10 @@ qemuProcessIncomingDefNew(virQEMUCaps *qemuCaps, =20 inc->address =3D g_strdup(listenAddress); =20 - inc->launchURI =3D qemuMigrationDstGetURI(migrateFrom, fd); - if (!inc->launchURI) + inc->uri =3D qemuMigrationDstGetURI(migrateFrom, fd); + if (!inc->uri) goto error; =20 - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_INCOMING_DEFER)) { - inc->deferredURI =3D inc->launchURI; - inc->launchURI =3D g_strdup("defer"); - } - inc->fd =3D fd; inc->path =3D path; =20 @@ -7373,12 +7367,11 @@ qemuProcessLaunch(virConnectPtr conn, unsigned long long maxMemLock =3D 0; =20 VIR_DEBUG("conn=3D%p driver=3D%p vm=3D%p name=3D%s if=3D%d asyncJob=3D= %d " - "incoming.launchURI=3D%s incoming.deferredURI=3D%s " + "incoming.uri=3D%s " "incoming.fd=3D%d incoming.path=3D%s " "snapshot=3D%p vmop=3D%d flags=3D0x%x", conn, driver, vm, vm->def->name, vm->def->id, asyncJob, - NULLSTR(incoming ? incoming->launchURI : NULL), - NULLSTR(incoming ? incoming->deferredURI : NULL), + NULLSTR(incoming ? incoming->uri : NULL), incoming ? incoming->fd : -1, NULLSTR(incoming ? incoming->path : NULL), snapshot, vmop, flags); @@ -7429,7 +7422,7 @@ qemuProcessLaunch(virConnectPtr conn, VIR_DEBUG("Building emulator command line"); if (!(cmd =3D qemuBuildCommandLine(driver, vm, - incoming ? incoming->launchURI : NULL, + incoming ? "defer" : NULL, snapshot, vmop, false, qemuCheckFips(vm), @@ -7856,8 +7849,7 @@ qemuProcessStart(virConnectPtr conn, relabel =3D true; =20 if (incoming) { - if (incoming->deferredURI && - qemuMigrationDstRun(driver, vm, incoming->deferredURI, asyncJo= b) < 0) + if (qemuMigrationDstRun(driver, vm, incoming->uri, asyncJob) < 0) goto stop; } else { /* Refresh state of devices from QEMU. During migration this happe= ns diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h index 85c197714a..f81bfd930a 100644 --- a/src/qemu/qemu_process.h +++ b/src/qemu/qemu_process.h @@ -52,8 +52,7 @@ void qemuProcessReconnectAll(virQEMUDriver *driver); typedef struct _qemuProcessIncomingDef qemuProcessIncomingDef; struct _qemuProcessIncomingDef { char *address; /* address where QEMU is supposed to listen */ - char *launchURI; /* used as a parameter for -incoming command line opt= ion */ - char *deferredURI; /* used when calling migrate-incoming QMP command */ + char *uri; /* used when calling migrate-incoming QMP command */ int fd; /* for fd:N URI */ const char *path; /* path associated with fd */ }; --=20 2.35.1