[pve-devel] [PATCH qemu-server 2/3] drive: tpm: fix default version in schema

Fiona Ebner f.ebner at proxmox.com
Thu Jun 27 13:03:16 CEST 2024


Since the check in start_swtpm() only checks for an explicitly
configured v2.0 to opt-in to version 2, the actual default is v1.2
and not v2.0 like the schema stated.

Of course, it would be nicer to have the default be v2.0, but changing
the check to use that default would break any TPM state without an
explicitly configured version.

There doesn't seem to be any code beside start_swtpm() accessing the
version.

Fixes: f9dde219 ("fix #3075: add TPM v1.2 and v2.0 support via swtpm")
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 PVE/QemuServer/Drive.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm
index 6a4fafd9..6e98c095 100644
--- a/PVE/QemuServer/Drive.pm
+++ b/PVE/QemuServer/Drive.pm
@@ -394,7 +394,7 @@ my %tpmversion_fmt = (
 	description => "The TPM interface version. v2.0 is newer and should be preferred."
 	    ." Note that this cannot be changed later on.",
 	optional => 1,
-	default => 'v2.0',
+	default => 'v1.2',
     },
 );
 my $tpmstate_fmt = {
-- 
2.39.2





More information about the pve-devel mailing list