Re: [PATCH 3/3] qemu_tpm: Only warn about missing locking feature on shared filesystems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a Thursday in 2025, Martin Kletzander via Devel wrote:
From: Martin Kletzander <mkletzan@xxxxxxxxxx>

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 <mkletzan@xxxxxxxxxx>
---
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,

static void
qemuTPMVirCommandSwtpmAddTPMState(virCommand *cmd,
-                                  const virDomainTPMEmulatorDef *emulator)
+                                  const virDomainTPMEmulatorDef *emulator,
+                                  const virDomainTPMDef *tpmDef,
+                                  const virQEMUDriverConfig *cfg)

Interesting decision that we need to pass the QEMU driver config just to check
for an error...

{
    const char *lock = ",lock";

    if (!virTPMSwtpmCapsGet(VIR_TPM_SWTPM_FEATURE_TPMSTATE_OPT_LOCK)) {

... but nothing to get the capability.

Jano

-        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 = "";
    }

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux