Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libvirt
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Libvirt Packaging Team
libvirt
Commits
117e0dae
Commit
117e0dae
authored
5 months ago
by
Andrea Bolognani
Browse files
Options
Downloads
Patches
Plain Diff
patches: Add backport/qemu-tpm-do-not-update-[...]
Closes: #1089616
parent
7e373ad8
No related branches found
No related tags found
1 merge request
!247
Prepare 10.10.0-3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/backport/qemu-tpm-do-not-update-profile-name-for-transient-domains.patch
+70
-0
70 additions, 0 deletions
...pm-do-not-update-profile-name-for-transient-domains.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
71 additions
and
0 deletions
debian/patches/backport/qemu-tpm-do-not-update-profile-name-for-transient-domains.patch
0 → 100644
+
70
−
0
View file @
117e0dae
From: =?utf-8?q?J=C3=A1n_Tomko?= <jtomko@redhat.com>
Date: Tue, 3 Dec 2024 12:00:08 +0100
Subject: qemu: tpm: do not update profile name for transient domains
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
If we do not have a persistent definition, there's no point in
looking for it since we cannot store it.
Also skip the update if the tpm device(s) in the persistent
definition are different.
This fixes the crash when starting a transient domain.
https://issues.redhat.com/browse/RHEL-69774
https://gitlab.com/libvirt/libvirt/-/issues/715
Fixes: d79542eec669eb9c449bb8228179e7a87e768017
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
(cherry picked from commit 81da7a2c2a2d490cddaaa77d3e3b36e210b38bd7)
Bug-Debian: https://bugs.debian.org/1089616
Forwarded: not-needed
Origin: https://gitlab.com/libvirt/libvirt/-/commit/81da7a2c2a2d490cddaaa77d3e3b36e210b38bd7
---
src/qemu/qemu_extdevice.c | 13 ++++++++++++-
src/qemu/qemu_tpm.c | 2 +-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c
index a6f31f9..954cb32 100644
--- a/src/qemu/qemu_extdevice.c
+++ b/src/qemu/qemu_extdevice.c
@@ -190,7 +190,18 @@
qemuExtDevicesStart(virQEMUDriver *driver,
for (i = 0; i < def->ntpms; i++) {
virDomainTPMDef *tpm = def->tpms[i];
- virDomainTPMDef *persistentTPMDef = persistentDef->tpms[i];
+ virDomainTPMDef *persistentTPMDef = NULL;
+
+ if (persistentDef) {
+ /* do not try to update the profile in the persistent definition
+ * if the device does not match */
+ if (persistentDef->ntpms == def->ntpms)
+ persistentTPMDef = persistentDef->tpms[i];
+ if (persistentTPMDef &&
+ (persistentTPMDef->type != tpm->type ||
+ persistentTPMDef->model != tpm->model))
+ persistentTPMDef = NULL;
+ }
if (tpm->type == VIR_DOMAIN_TPM_TYPE_EMULATOR &&
qemuExtTPMStart(driver, vm, tpm, persistentTPMDef,
diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c
index f223dcb..f5e0184 100644
--- a/src/qemu/qemu_tpm.c
+++ b/src/qemu/qemu_tpm.c
@@ -773,7 +773,7 @@
qemuTPMEmulatorBuildCommand(virDomainTPMDef *tpm,
incomingMigration) < 0)
goto error;
- if (run_setup && !incomingMigration &&
+ if (run_setup && !incomingMigration && persistentTPMDef &&
qemuTPMEmulatorUpdateProfileName(&tpm->data.emulator, persistentTPMDef,
cfg, saveDef) < 0)
goto error;
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
117e0dae
backport/virt-aa-helper-allow-riscv64-EDK-II.patch
backport/qemu-tpm-do-not-update-profile-name-for-transient-domains.patch
debian/Debianize-libvirt-guests.patch
debian/apparmor_profiles_local_include.patch
debian/Use-sensible-editor-by-default.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment