From nobody Tue Sep 9 19:25:10 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=1752748517; cv=none; d=zohomail.com; s=zohoarc; b=T2lrnozgHceDgVHFVMXE+D5FPryYcfNtOo4orEZys9+rGrqLPD0GFOOlhbt3DBviQZMqZM9Zn+DeJLLyv0/zEPXiiDJBOGsMIvFq3KK7LCGLLEI/Eya5YXArsPDeKumn8+/g81lVJA5/0sOS9YEGYEgBK9leVGWmewCjqEPOeXg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752748517; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=N3vNvrglQXRu30MIMXi/CUW3El7MaHiG3hAEHug7yRc=; b=evFKf7QHSILnW7mmc9ZMvJC6+gv+7gTv38kDjVKYySHX8DxSrYVux96BXFa+f2pGlyIQGbv3ttWI3/TaLdiMKgmZNy6fJvQ2xFfE4eazfKRZ+tBR45+H1JW8eAfl8Z1jRpmTWNMqCW7v8ZMyN8R2a282ueZmmn2wdO8i/u3Gu40= 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 1752748517412802.9901755618898; Thu, 17 Jul 2025 03:35:17 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 1FDA311D1; Thu, 17 Jul 2025 06:35:16 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 7EDCA11A7; Thu, 17 Jul 2025 06:34:54 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B5320110A; Thu, 17 Jul 2025 06:34:50 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 34A35D46 for ; Thu, 17 Jul 2025 06:34:50 -0400 (EDT) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-65--xqhfoUVMbqA46ATdXTwrA-1; Thu, 17 Jul 2025 06:34:48 -0400 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-455e9daab1cso2265215e9.1 for ; Thu, 17 Jul 2025 03:34:48 -0700 (PDT) Received: from wheatley.localdomain ([85.93.96.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45634f4c3absm18759395e9.3.2025.07.17.03.34.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jul 2025 03:34:46 -0700 (PDT) Received: from wheatley.pinto-pinecone.ts.net (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 6CA2FC3A28CE for ; Thu, 17 Jul 2025 12:34:45 +0200 (CEST) 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_PASS 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=1752748489; 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: in-reply-to:in-reply-to:references:references; bh=MHxh6O+QLA81YKlA83xgcGkTklKE5qUMeiuJZ4/4qyk=; b=ebBGIQa0Ds2Dk7Ti3kEhwstMiOe2kTapWTTbt2Gq4S7FojdqwCH/mXwsq4rFk7dKCSBoiM A52vFoBmLaFH6XjMDn52LF3Pc5k1uf9uAoclUWZO5CPxIbNRp6LImtgxkj7rmWTlr5ydVy T/n41oJ32syi1XQX3eOv5DwFoPfP/hY= X-MC-Unique: -xqhfoUVMbqA46ATdXTwrA-1 X-Mimecast-MFC-AGG-ID: -xqhfoUVMbqA46ATdXTwrA_1752748487 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752748487; x=1753353287; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MHxh6O+QLA81YKlA83xgcGkTklKE5qUMeiuJZ4/4qyk=; b=SOuidxJ55hDFgjBNK6eXforRCWdGXbbwtxoF4NYGdHIFy/eO0Dt9kW1yTo/2Iv/8F1 kmiXInfuJzzrtraqWrNSTUBxqjehS0lGOSh/MNmyIetG3+0cilxLUL1bG9igdtGS3A3+ Ep/CqfPHdMbCTnPfhFBlissXXe0q8ONY2SUmQISVCTOTcE3CZcOm2o7jOSCuIuPuF6yO EL5/dgvSmUC6CEyz9+jBeGn44vLLdzFMqwLfu0u+IoGxfevR0Sk6lCHmhDTm5XhOXzVw Q7V61Cv9YekeOAmTXn+kvb74Bzcjok7KDVbGu7FGH05hLibIJ3mGx89KAQbWaC5IKR1V yA5g== X-Gm-Message-State: AOJu0Yw63ePRvPr3aeOQNbkjIHZz/rESwDUjl15okg7067e8gJYMJlXL A18CF04DZCuzTtAKpiA85mc+EkvSymP8ldJ5VimBTyBTG6caVfE6SfwV0OBmuSImXB12y3zAyXD Zlg5/+UViu/y6EtMYDc/hCEDlncKSzALrcMDAlal9/nCIqJCALtBwNTu3TSa+ACuaxd9qVEmFmY rG5sBb43gl8zAmtXrQd02gyKnhMzoNuYXDolkDVP5sUeU= X-Gm-Gg: ASbGncs3ChBXmfqkiunsjaU0ZXvLwMqya+HKz7HNrBKbNjohTlcnBFQFtDsamJX7d8J 326QKvAGozIxfvFoJvc2Vyc2zrr1xuJJUlLoc7B4Te3j5sAjYG57E95uwwDB8QUZKB9Zpe8K01d /+ajkNM8gb8+Z2qMWlveKvNGTZS5ex8zznQ6G1/hrGCrLtvl9ntK8tge8DIIAftiDxqwf5mb8ra /s4ieBQ58dRQRGZMDn3CtJxu0IsnmjTZynTATqUvaBkufWvqxUEIVe14F8rG+PxRkRTyPhVKLmZ iEnH/TsUTl4Wt8sVOKw6goaGnwxAkxcw1taFIOZ3iFVkxNVD X-Received: by 2002:a05:600c:83cc:b0:441:a715:664a with SMTP id 5b1f17b1804b1-4562e276516mr59673355e9.20.1752748487008; Thu, 17 Jul 2025 03:34:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9raHcIePPUDpdmgk75hRGFcdgoUU9axQYJdPoRMTUkQ8bvr8+2W1NC8EVYe++3GAWyc7VuQ== X-Received: by 2002:a05:600c:83cc:b0:441:a715:664a with SMTP id 5b1f17b1804b1-4562e276516mr59673015e9.20.1752748486482; Thu, 17 Jul 2025 03:34:46 -0700 (PDT) To: devel@lists.libvirt.org Subject: [PATCH 3/3] qemu_tpm: Only warn about missing locking feature on shared filesystems Date: Thu, 17 Jul 2025 12:34:43 +0200 Message-ID: X-Mailer: git-send-email 2.50.1 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: O8sXTS3Tjza1kO-_us3_x00GG_sl_hUJO1xoG3au1Ic_1752748487 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: C6MLDTXTUCC7TE2RMCKAKNSQT326HA74 X-Message-ID-Hash: C6MLDTXTUCC7TE2RMCKAKNSQT326HA74 X-MailFrom: mkletzan@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: Martin Kletzander via Devel Reply-To: Martin Kletzander X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1752748521777116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Martin Kletzander The warning pollutes the logs and might give a bad impression on someone reading them even though the locking is not always needed. This way we at least limit the logging in unnecessary cases. Resolves: https://issues.redhat.com/browse/RHEL-80155 Signed-off-by: Martin Kletzander --- src/qemu/qemu_tpm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index 855d732e60d0..cdbd6e3993b2 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -660,12 +660,16 @@ qemuTPMVirCommandSwtpmAddEncryption(virCommand *cmd, =20 static void qemuTPMVirCommandSwtpmAddTPMState(virCommand *cmd, - const virDomainTPMEmulatorDef *emulator) + const virDomainTPMEmulatorDef *emulator, + const virDomainTPMDef *tpmDef, + const virQEMUDriverConfig *cfg) { const char *lock =3D ",lock"; =20 if (!virTPMSwtpmCapsGet(VIR_TPM_SWTPM_FEATURE_TPMSTATE_OPT_LOCK)) { - VIR_WARN("This swtpm version doesn't support explicit locking"); + if (qemuTPMHasSharedStorage(cfg, tpmDef)) + VIR_WARN("This swtpm version doesn't support explicit locking"= ); + lock =3D ""; } =20 @@ -721,7 +725,7 @@ qemuTPMEmulatorUpdateProfileName(virDomainTPMEmulatorDe= f *emulator, =20 virCommandAddArgList(cmd, "socket", "--print-info", "0x20", "--tpm2", = NULL); =20 - qemuTPMVirCommandSwtpmAddTPMState(cmd, emulator); + qemuTPMVirCommandSwtpmAddTPMState(cmd, emulator, persistentTPMDef, cfg= ); =20 if (qemuTPMVirCommandSwtpmAddEncryption(cmd, emulator, swtpm) < 0) return -1; @@ -848,7 +852,7 @@ qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm, virCommandAddArgFormat(cmd, "type=3Dunixio,path=3D%s,mode=3D0600", tpm->data.emulator.source->data.nix.path); =20 - qemuTPMVirCommandSwtpmAddTPMState(cmd, &tpm->data.emulator); + qemuTPMVirCommandSwtpmAddTPMState(cmd, &tpm->data.emulator, persistent= TPMDef, cfg); =20 virCommandAddArg(cmd, "--log"); if (tpm->data.emulator.debug !=3D 0) --=20 2.50.1