From: Stefan Berger Date: Thu, 9 Jul 2020 20:46:20 +0000 (-0400) Subject: qemu: Choose TPM 2 for backend as default for CRB interface X-Git-Tag: v6.6.0-rc1~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4291080f0cb62f2c765f6b292612d2f3ddbbe26d;p=thirdparty%2Flibvirt.git qemu: Choose TPM 2 for backend as default for CRB interface Choose a TPM 2 device for the backend as default for the CRB interface since TPM 1.2 would not work. This patch addresses BZ 1781913: https://bugzilla.redhat.com/show_bug.cgi?id=1781913 Signed-off-by: Stefan Berger Reviewed-by: Daniel Henrique Barboza Reviewed-by: Marc-André Lureau --- diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 21f82625c0..4a2daffc0a 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4116,7 +4116,8 @@ qemuDomainDefTPMsPostParse(virDomainDefPtr def) /* TPM 1.2 and 2 are not compatible, so we choose a specific version here */ if (tpm->version == VIR_DOMAIN_TPM_VERSION_DEFAULT) { - if (tpm->model == VIR_DOMAIN_TPM_MODEL_SPAPR) + if (tpm->model == VIR_DOMAIN_TPM_MODEL_SPAPR || + tpm->model == VIR_DOMAIN_TPM_MODEL_CRB) tpm->version = VIR_DOMAIN_TPM_VERSION_2_0; else tpm->version = VIR_DOMAIN_TPM_VERSION_1_2;