From nobody Mon Sep 8 21:43:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1748432007; cv=none; d=zohomail.com; s=zohoarc; b=GJ3vud6Uvgxu7bXuBlSQbNStUM/ozYg4c3Fi8tn+wquuhp5b/U+y1ox1YqZXMt9BGpO4e4lL2oFwURk/FX0i++UEOuBMBhQNc+34CTGycyDk/hhXYYBj6KXAaLyufxsqRrKONrkUqxPwuoJlArcAYLeRRWWbiwDHnuLXdiaW53Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748432007; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Subject:Subject:To:To:Message-Id:Cc; bh=5VMr9U45DOlLPpPFzqPn2BFX02mvA1+6vxb1+9bTfkA=; b=HHNkpEJiv+Clth59w4/JWVruBKJ2D7wNH/SaggqG3KcWnZ3k6EJ7EUuHxvAeVwKM/Eftsd5QsRtuXHMt+PytjtOKSKe8eMaHMerdzKf/hBInKcyEKocThnMZfWw5XImZqZ2jnSuNdr2mITSA/klE0dtLTi6EyFuR+hSq8/wVJfM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1748432007575867.8459492097812; Wed, 28 May 2025 04:33:27 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id EC95E13D1; Wed, 28 May 2025 07:33:25 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 40D7613FB; Wed, 28 May 2025 07:33:10 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 6B5E213D7; Wed, 28 May 2025 07:33:07 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id CC073123A for ; Wed, 28 May 2025 07:33:06 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-274-ccr6YZMPNheDvhTeu7aV7w-1; Wed, 28 May 2025 07:33:05 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 38BCF18001E0 for ; Wed, 28 May 2025 11:33:04 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 88664180010A for ; Wed, 28 May 2025 11:33:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1748431986; h=from:from: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; bh=s4SICLepYqvRMSvRHKlj9geSVwWc5FjIEfRFADyf5uU=; b=iwuz2qmS+tnQLNplfSKa9AIc1ExSSIqYHiULw5H5Qjxb4itgvsU9wrH1jH+OYy2sC5qPUl hdeK3RKdnRcDb+ilLfRyQxC932O0vpbSPU3sBddbtW/3Le+IwFqRbwsR1fq2aAH1y7IQy4 IKOrOY6tOoZm2vgXARmu+q8+0VIbmoA= X-MC-Unique: ccr6YZMPNheDvhTeu7aV7w-1 X-Mimecast-MFC-AGG-ID: ccr6YZMPNheDvhTeu7aV7w_1748431984 To: devel@lists.libvirt.org Subject: [PATCH] qemu: Fix error when migration with shared TPM storage is unsupported Date: Wed, 28 May 2025 13:32:59 +0200 Message-ID: <8f955d42df45cbc3e1a06762e6ab1e7e03e25f5f.1748431979.git.jdenemar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: UzT4uS1b9PuMM-wNe-atU64bcgQAklABYDO53_Ehu0g_1748431984 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: IDZP5BS4AXAZKXQTCYQXWIYTYOFSUXO3 X-Message-ID-Hash: IDZP5BS4AXAZKXQTCYQXWIYTYOFSUXO3 X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Jiri Denemark via Devel Reply-To: Jiri Denemark X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1748432009182116600 Content-Type: text/plain; charset="utf-8" From: Jiri Denemark The VIR_ERR_NO_SUPPORT error is supposed to be used for unsupported driver APIs. It is incorrectly used when swtpm does not support migration with shared storage resulting in a rather strange error message: this function is not supported by the connection driver: the running swtpm does not support migration with shared storage The correct VIR_ERR_OPERATION_UNSUPPORTED error code provides a much better message: Operation not supported: the running swtpm does not support migration with shared storage Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 1f91ad1117..2400750ee4 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1723,7 +1723,7 @@ qemuMigrationSrcIsAllowed(virDomainObj *vm, =20 if (qemuTPMHasSharedStorage(driver, vm->def) && !qemuTPMCanMigrateSharedStorage(vm->def)) { - virReportError(VIR_ERR_NO_SUPPORT, "%s", + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", _("the running swtpm does not support migration= with shared storage")); return false; } --=20 2.49.0