On Thu, Oct 03, 2024 at 05:15:54 -0700, Andrea Bolognani wrote:
On Wed, Oct 02, 2024 at 06:27:39PM GMT, Peter Krempa wrote:
> On Wed, Oct 02, 2024 at 17:41:47 +0200, Andrea Bolognani wrote:
> > By not attempting to lock the lock file, which would fail.
> >
> > Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
> > ---
> > src/qemu/qemu_security.c | 10 ++++++----
> > src/qemu/qemu_security.h | 6 ++++--
> > src/qemu/qemu_tpm.c | 21 ++++++++++++++++++---
> > 3 files changed, 28 insertions(+), 9 deletions(-)
>
> Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>
Thank you, Peter!
While checking things one last time before pushing, I realized that
there's a small issue with this last patch which was caused by
incorrectly converting things from v6: when stopping swtpm, there is
no need to trigger the exception, since the lock will have been
released by that point.
Yeah that makes sense. I've missed that one.
Can I squash in the diff below and proceed?
Sure
diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c
index fcfc97dbca..749e4232b9 100644
--- a/src/qemu/qemu_tpm.c
+++ b/src/qemu/qemu_tpm.c
@@ -1159,7 +1159,7 @@ qemuExtTPMStop(virQEMUDriver *driver,
if (outgoingMigration && qemuTPMHasSharedStorage(driver, vm->def))
restoreTPMStateLabel = false;
- if (qemuSecurityRestoreTPMLabels(driver, vm,
restoreTPMStateLabel, true) < 0)
+ if (qemuSecurityRestoreTPMLabels(driver, vm,
restoreTPMStateLabel, false) < 0)
VIR_WARN("Unable to restore labels on TPM state and/or log file");
}
--
Andrea Bolognani / Red Hat / Virtualization
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>