From nobody Tue May 7 00:44:57 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=1594215164; cv=none; d=zohomail.com; s=zohoarc; b=Z0ydqIvfKqOWcd45hLMoZ1a0n+NcSixv+GzIgPNFU8YPDTA1BgRYzhLy6UWxIxViqo+9cyiP4FrO3PKG2z9WMn6N1cT04LtT9zCvGPfy2PSiRvAal6Iqryw+pwgodycVhYI35arM7zYZfnd0O7545ko4QfYeqj7NKvlEpYziCpY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594215164; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=4YdX23/Aj8INSybe7Ev4om13s8ut7mySMb26B4wowkM=; b=Sx4BIzWL+9lRMr2UiW8x6WDZQwWUVqqw9kcXN53G7CbA2GvZSsJbJP2Btxn+TVlatfLJg1Sd2XYbPiuhBABSAL+2iVnYfXp70q8RpLAxDVPPlC/ovV9qBq49kPqZ8YCO38ySDEatAf9T+dIpdQYGWGFVZF3VNCB9bZnWI11KgRE= 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 1594215164454240.30304831461729; Wed, 8 Jul 2020 06:32:44 -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-145-cAD3YmS3N3yvDty22kEWDA-1; Wed, 08 Jul 2020 09:32:40 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B42A31940925; Wed, 8 Jul 2020 13:32:34 +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 779405D9C9; Wed, 8 Jul 2020 13:32:32 +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 AAF6A87886; Wed, 8 Jul 2020 13:32:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 068DV7Qe016715 for ; Wed, 8 Jul 2020 09:31:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5E70C218B20F; Wed, 8 Jul 2020 13:31: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 3C0DD2013571 for ; Wed, 8 Jul 2020 13:31:01 +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 6E7D3800883 for ; Wed, 8 Jul 2020 13:31:01 +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-305--1-POX3rP_i6g-sRWc8jzg-1; Wed, 08 Jul 2020 09:30:56 -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 068D2IJg033329; Wed, 8 Jul 2020 09:30:54 -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 325a7rhskg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 09:30:54 -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 068DQ8dL025395; Wed, 8 Jul 2020 13:30:53 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma01dal.us.ibm.com with ESMTP id 322hd98d6h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 08 Jul 2020 13:30:53 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 068DUqVe28639702 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 8 Jul 2020 13:30:52 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 31D20BE05A; Wed, 8 Jul 2020 13:30:52 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B86A5BE053; Wed, 8 Jul 2020 13:30:51 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 8 Jul 2020 13:30:51 +0000 (GMT) X-MC-Unique: cAD3YmS3N3yvDty22kEWDA-1 X-MC-Unique: -1-POX3rP_i6g-sRWc8jzg-1 From: Stefan Berger To: libvir-list@redhat.com Subject: [PATCH] conf: Set SPAPR TPM default to 2.0 and prevent 1.2 choice Date: Wed, 8 Jul 2020 09:30:50 -0400 Message-Id: <20200708133050.102160-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_11:2020-07-08, 2020-07-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 cotscore=-2147483648 mlxscore=0 mlxlogscore=961 priorityscore=1501 phishscore=0 clxscore=1011 adultscore=0 malwarescore=0 bulkscore=0 spamscore=0 suspectscore=1 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007080091 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: marcandre.lureau@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.14 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 emulator. Signed-off-by: Stefan Berger --- src/conf/domain_conf.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 2f4528d336..749d135f96 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -13633,7 +13633,10 @@ virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlo= pt, =20 version =3D virXMLPropString(backends[0], "version"); if (!version) { - def->version =3D VIR_DOMAIN_TPM_VERSION_DEFAULT; + if (def->model =3D=3D VIR_DOMAIN_TPM_MODEL_SPAPR) + def->version =3D VIR_DOMAIN_TPM_VERSION_2_0; + else + def->version =3D VIR_DOMAIN_TPM_VERSION_DEFAULT; } else { if ((def->version =3D virDomainTPMVersionTypeFromString(version)) = < 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, @@ -13641,6 +13644,12 @@ virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlo= pt, version); goto error; } + if (def->version =3D=3D VIR_DOMAIN_TPM_VERSION_1_2 && + def->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")); + goto error; + } } =20 switch (def->type) { --=20 2.17.1