From nobody Mon May 6 09:23:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594223054; cv=none; d=zohomail.com; s=zohoarc; b=KGsoDTTRrVsLmJjnKhBW0RjBJcinhoH1nzZIKJ5TV5A15thl/CGLtW0OEboZtAYnSvV8isld1x+WQLhQBBTJtCQRquBp4JmX/3UymmB5Wn1s2fh5woUwRNIdoLfgnfUYg8GTL6xgTWVnmOMAuXKBLmvBQ3iURqh2TPBqzsenUHc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594223054; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=51Y0oWatO4Rq0AQULyTFGCUcxyg1DbRx2+B2BWQ28IE=; b=c2y+Iwqj5pEWLjCuUG8CwZUWj5XQpDdDtrsv1dQWDiYAzDYL1jkLtghbNCTJwhdqVp1t7F3JWtZdvz1SphIXV3li8ZanVgjtML/RSJ/2cppfwygPniK2BGSrpdKEK+d+rQLFkCNZejPCYImtgQ9EjdDD3oGdwaw9FE0FHaoSL0I= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1594223054456749.407967059621; Wed, 8 Jul 2020 08:44:14 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-264-8u0MdE7xPumsgzeJEFtcIQ-1; Wed, 08 Jul 2020 11:44:10 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 913521083E84; Wed, 8 Jul 2020 15:44:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5FC3B106222A; Wed, 8 Jul 2020 15:44:00 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 295E71809557; Wed, 8 Jul 2020 15:44:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 068Fg7m1000585 for ; Wed, 8 Jul 2020 11:42:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 84A6A20A0522; Wed, 8 Jul 2020 15:42:07 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5238620A0530 for ; Wed, 8 Jul 2020 15:42:01 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C4D2C8008A5 for ; Wed, 8 Jul 2020 15:42:01 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-242-LJwWns2eNLK2n5qYf0z-lg-1; Wed, 08 Jul 2020 11:41:55 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 068FY19V163022; Wed, 8 Jul 2020 11:41:54 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0b-001b2d01.pphosted.com with ESMTP id 325brdjpkd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 11:41:53 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 068FEg3e010962; Wed, 8 Jul 2020 15:40:24 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma04dal.us.ibm.com with ESMTP id 324buh1yme-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 15:40:24 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 068FeNV145613430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 Jul 2020 15:40:23 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 58663112063; Wed, 8 Jul 2020 15:40:23 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4B882112066; Wed, 8 Jul 2020 15:40:23 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 8 Jul 2020 15:40:23 +0000 (GMT) X-MC-Unique: 8u0MdE7xPumsgzeJEFtcIQ-1 X-MC-Unique: LJwWns2eNLK2n5qYf0z-lg-1 From: Stefan Berger To: libvir-list@redhat.com Subject: [PATCH v4 1/3] qemu: Move setting of TPM default to post parse function Date: Wed, 8 Jul 2020 11:40:16 -0400 Message-Id: <20200708154018.109736-2-stefanb@linux.vnet.ibm.com> In-Reply-To: <20200708154018.109736-1-stefanb@linux.vnet.ibm.com> References: <20200708154018.109736-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-08_13:2020-07-08, 2020-07-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 phishscore=0 clxscore=1015 adultscore=0 cotscore=-2147483648 suspectscore=1 lowpriorityscore=0 bulkscore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007080104 X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: marcandre.lureau@redhat.com, pkrempa@redhat.com, Stefan Berger X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Stefan Berger Move setting the TPM default version out of the validation function into the post parse function. Signed-off-by: Stefan Berger Reviewed-by: Peter Krempa Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 7 ++++--- src/qemu/qemu_validate.c | 4 ---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 42cc78ac1b..f916d840e2 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4347,12 +4347,13 @@ qemuDomainDefTPMsPostParse(virDomainDefPtr def) virDomainTPMDefPtr regularTPM =3D NULL; size_t i; =20 - if (def->ntpms < 2) - return 0; - for (i =3D 0; i < def->ntpms; i++) { virDomainTPMDefPtr tpm =3D def->tpms[i]; =20 + /* TPM 1.2 and 2 are not compatible, so we choose a specific versi= on here */ + if (tpm->version =3D=3D VIR_DOMAIN_TPM_VERSION_DEFAULT) + tpm->version =3D VIR_DOMAIN_TPM_VERSION_1_2; + if (tpm->model =3D=3D VIR_DOMAIN_TPM_MODEL_SPAPR_PROXY) { if (proxyTPM) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index bd7590a00a..d130b52bf2 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3644,10 +3644,6 @@ qemuValidateDomainDeviceDefTPM(virDomainTPMDef *tpm, { virQEMUCapsFlags flag; =20 - /* TPM 1.2 and 2 are not compatible, so we choose a specific version h= ere */ - if (tpm->version =3D=3D VIR_DOMAIN_TPM_VERSION_DEFAULT) - tpm->version =3D VIR_DOMAIN_TPM_VERSION_1_2; - switch (tpm->version) { case VIR_DOMAIN_TPM_VERSION_1_2: /* TPM 1.2 + CRB do not work */ --=20 2.17.1 From nobody Mon May 6 09:23:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594223346; cv=none; d=zohomail.com; s=zohoarc; b=FQl5o6THcc9vM9ogW5h8GFBozzbZ4T+o2qsW8oUvEfic/IyUFhUjSc7tLak7RLTtcHhAm5fYl1n6J116snIlXRg/PfsUzysrHRHQRN6ZoZFj3vhxvEi/bHRQPrwtCHiV/Ghqay2hACh0uwrXpo6AuXFjVrJvO+6TuHJtdfByzgg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594223346; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hEEahv3T1x802I7pw7l2BhSm1qKeN0IGSgwA1x5kp9s=; b=gESKsezMI5YAPzj1RnREdLUiFUQlbYZkaI/Cpod3/pEjK++KtKtD5OUsbVSxwyYwn/sS2fVPKEY+v9280fUdyup5/B1dtxyISJVrwxT78m8/eyZ3WKC2m3RrabnVCVC7ktwoCBXAPkUwnaskDYEbBlHjrAGndBQuSNQA1bgXngE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1594223346585222.42258999346677; Wed, 8 Jul 2020 08:49:06 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-509-51GyhzUuPP27KbfwfIeHow-1; Wed, 08 Jul 2020 11:49:02 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3E7331800D42; Wed, 8 Jul 2020 15:48:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DF92778487; Wed, 8 Jul 2020 15:48:55 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 4138D93F62; Wed, 8 Jul 2020 15:48:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 068FeXHQ000431 for ; Wed, 8 Jul 2020 11:40:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6C66617E365; Wed, 8 Jul 2020 15:40:33 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 67D272960 for ; Wed, 8 Jul 2020 15:40:33 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4EE94804AD2 for ; Wed, 8 Jul 2020 15:40:33 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-409-b0KG_xHwOG2hfeM05d4EVA-1; Wed, 08 Jul 2020 11:40:27 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 068FYVHF022575; Wed, 8 Jul 2020 11:40:25 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 325g7gsm17-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 11:40:25 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 068Fe8LV009543; Wed, 8 Jul 2020 15:40:24 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma01dal.us.ibm.com with ESMTP id 322hd99hfd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 15:40:24 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 068FeNBW23527828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 Jul 2020 15:40:23 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D3B8112062; Wed, 8 Jul 2020 15:40:23 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6025F11206B; Wed, 8 Jul 2020 15:40:23 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 8 Jul 2020 15:40:23 +0000 (GMT) X-MC-Unique: 51GyhzUuPP27KbfwfIeHow-1 X-MC-Unique: b0KG_xHwOG2hfeM05d4EVA-1 From: Stefan Berger To: libvir-list@redhat.com Subject: [PATCH v4 2/3] qemu: Set SPAPR TPM default to 2.0 and prevent 1.2 choice Date: Wed, 8 Jul 2020 11:40:17 -0400 Message-Id: <20200708154018.109736-3-stefanb@linux.vnet.ibm.com> In-Reply-To: <20200708154018.109736-1-stefanb@linux.vnet.ibm.com> References: <20200708154018.109736-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-08_13:2020-07-08, 2020-07-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 mlxlogscore=999 cotscore=-2147483648 suspectscore=0 mlxscore=0 bulkscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007080104 X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: marcandre.lureau@redhat.com, pkrempa@redhat.com, Stefan Berger X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Stefan Berger The firmware (SLOF) on QEMU for ppc64 does not support TPM 1.2, so prevent the choice of TPM 1.2 when the SPAPR device model is chosen and use a default of '2.0' (TPM 2) for the backend. This patch addresses BZ 1781913: https://bugzilla.redhat.com/show_bug.cgi?i= d=3D1781913 Signed-off-by: Stefan Berger Reviewed-by: Peter Krempa Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 8 ++++++-- src/qemu/qemu_validate.c | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index f916d840e2..b0f5e17613 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4351,8 +4351,12 @@ qemuDomainDefTPMsPostParse(virDomainDefPtr def) virDomainTPMDefPtr tpm =3D def->tpms[i]; =20 /* TPM 1.2 and 2 are not compatible, so we choose a specific versi= on here */ - if (tpm->version =3D=3D VIR_DOMAIN_TPM_VERSION_DEFAULT) - tpm->version =3D VIR_DOMAIN_TPM_VERSION_1_2; + if (tpm->version =3D=3D VIR_DOMAIN_TPM_VERSION_DEFAULT) { + if (tpm->model =3D=3D VIR_DOMAIN_TPM_MODEL_SPAPR) + tpm->version =3D VIR_DOMAIN_TPM_VERSION_2_0; + else + tpm->version =3D VIR_DOMAIN_TPM_VERSION_1_2; + } =20 if (tpm->model =3D=3D VIR_DOMAIN_TPM_MODEL_SPAPR_PROXY) { if (proxyTPM) { diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index d130b52bf2..488f258d00 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3654,6 +3654,12 @@ qemuValidateDomainDeviceDefTPM(virDomainTPMDef *tpm, virDomainTPMModelTypeToString(tpm->model)); return -1; } + /* TPM 1.2 + SPAPR do not work with any 'type' (backend) */ + if (tpm->model =3D=3D VIR_DOMAIN_TPM_MODEL_SPAPR) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("TPM 1.2 is not supported with the SPAPR devi= ce model")); + return -1; + } break; case VIR_DOMAIN_TPM_VERSION_2_0: case VIR_DOMAIN_TPM_VERSION_DEFAULT: --=20 2.17.1 From nobody Mon May 6 09:23:16 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594223049; cv=none; d=zohomail.com; s=zohoarc; b=KDQwHc51LOUTFz7Z4N6fNXRvg8Ft5zwUz0km0RfC2gJgAfPQqBc8fPgC2BK5dMghlwzWQ7s96W4eDWTTQ6U9aQhLGyDobF2gX8HgzpHTmlP/kWYB6NuPHpfOUjWrEHK4PnRh/EnfcEX9uiRWzrtTEoBn1W9TGxNzgJWNulDpKT8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594223049; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pX1fCptg3moPZL0dJfuUij3F/WlOMybN4KluKqG/jHk=; b=Clq3Vze/BXfXjiCruVfDcl+lYdZ16oQC297wCJZaV72Qi41WPqzp+EuIGvZRT/33EE/TagfHqtH/u7BXZR0yWj1ARW8JbvzOJvLCEAClNNKOTjIMfnHZrrILK1x056u45OtF6SMWUiiyfmyJVPzmBhUoK5iigaxPygbL1jRM/y0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1594223049653541.2467356557502; Wed, 8 Jul 2020 08:44:09 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-263-jVcVlkh1Nnukuw3RFQ-frg-1; Wed, 08 Jul 2020 11:44:05 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C387B19253D8; Wed, 8 Jul 2020 15:43:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F43660F8D; Wed, 8 Jul 2020 15:43:57 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 699251809547; Wed, 8 Jul 2020 15:43:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 068FeYrM000439 for ; Wed, 8 Jul 2020 11:40:34 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1D92D110F0CB; Wed, 8 Jul 2020 15:40:34 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 186CF110F0C6 for ; Wed, 8 Jul 2020 15:40:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9B718924905 for ; Wed, 8 Jul 2020 15:40:30 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-8-1c4lepbaMOWQa57sE-ictQ-1; Wed, 08 Jul 2020 11:40:26 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 068FWpl3124473; Wed, 8 Jul 2020 11:40:25 -0400 Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com with ESMTP id 325e12e8a3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 11:40:25 -0400 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 068Fdsb4016525; Wed, 8 Jul 2020 15:40:24 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma02wdc.us.ibm.com with ESMTP id 324b3jpuc4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 15:40:24 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 068FeNWJ47710604 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 Jul 2020 15:40:23 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 90287112061; Wed, 8 Jul 2020 15:40:23 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7A3B3112067; Wed, 8 Jul 2020 15:40:23 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 8 Jul 2020 15:40:23 +0000 (GMT) X-MC-Unique: jVcVlkh1Nnukuw3RFQ-frg-1 X-MC-Unique: 1c4lepbaMOWQa57sE-ictQ-1 From: Stefan Berger To: libvir-list@redhat.com Subject: [PATCH v4 3/3] qemu: Choose TPM 2 for backend as default for CRB interface Date: Wed, 8 Jul 2020 11:40:18 -0400 Message-Id: <20200708154018.109736-4-stefanb@linux.vnet.ibm.com> In-Reply-To: <20200708154018.109736-1-stefanb@linux.vnet.ibm.com> References: <20200708154018.109736-1-stefanb@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-07-08_13:2020-07-08, 2020-07-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=925 mlxscore=0 bulkscore=0 clxscore=1015 malwarescore=0 spamscore=0 impostorscore=0 suspectscore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 cotscore=-2147483648 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007080105 X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: marcandre.lureau@redhat.com, pkrempa@redhat.com, Stefan Berger X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Stefan Berger 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?i= d=3D1781913 Signed-off-by: Stefan Berger Reviewed-by: Daniel Henrique Barboza --- src/qemu/qemu_domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b0f5e17613..161421b602 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4352,7 +4352,8 @@ qemuDomainDefTPMsPostParse(virDomainDefPtr def) =20 /* TPM 1.2 and 2 are not compatible, so we choose a specific versi= on here */ if (tpm->version =3D=3D VIR_DOMAIN_TPM_VERSION_DEFAULT) { - if (tpm->model =3D=3D VIR_DOMAIN_TPM_MODEL_SPAPR) + if (tpm->model =3D=3D VIR_DOMAIN_TPM_MODEL_SPAPR || + tpm->model =3D=3D VIR_DOMAIN_TPM_MODEL_CRB) tpm->version =3D VIR_DOMAIN_TPM_VERSION_2_0; else tpm->version =3D VIR_DOMAIN_TPM_VERSION_1_2; --=20 2.17.1