From nobody Tue Feb 10 12:44:59 2026
Delivered-To: importer@patchew.org
Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28
as permitted sender) client-ip=209.132.183.28;
envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com;
Authentication-Results: mx.zohomail.com;
spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 1527193592534947.2734243052522;
Thu, 24 May 2018 13:26:32 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com
[10.5.11.15])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id A5E28479D;
Thu, 24 May 2018 20:26:30 +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 009315D6A8;
Thu, 24 May 2018 20:26:29 +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 DD13418033EF;
Thu, 24 May 2018 20:26:27 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com
[10.5.11.15])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id w4OKQQug005392 for ;
Thu, 24 May 2018 16:26:26 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 234C45D75A; Thu, 24 May 2018 20:26:26 +0000 (UTC)
Received: from mx1.redhat.com (ext-mx12.extmail.prod.ext.phx2.redhat.com
[10.5.110.41])
by smtp.corp.redhat.com (Postfix) with ESMTPS id 178825D755
for ; Thu, 24 May 2018 20:26:23 +0000 (UTC)
Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com
[148.163.156.1])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 25DA73169B5D
for ; Thu, 24 May 2018 20:26:22 +0000 (UTC)
Received: from pps.filterd (m0098399.ppops.net [127.0.0.1])
by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id
w4OKNiLV094779
for ; Thu, 24 May 2018 16:26:21 -0400
Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208])
by mx0a-001b2d01.pphosted.com with ESMTP id 2j61g8ye75-1
(version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT)
for ; Thu, 24 May 2018 16:26:21 -0400
Received: from localhost
by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only!
Violators will be prosecuted
for from ;
Thu, 24 May 2018 16:26:20 -0400
Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26)
by e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway:
Authorized Use Only! Violators will be prosecuted;
(version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256)
Thu, 24 May 2018 16:26:17 -0400
Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com
[9.57.199.108])
by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id
w4OKQGZs66912380
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256
verify=FAIL); Thu, 24 May 2018 20:26:16 GMT
Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id A6B4FB2064;
Thu, 24 May 2018 17:28:03 -0400 (EDT)
Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 8D9FDB205F;
Thu, 24 May 2018 17:28:03 -0400 (EDT)
Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153])
by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP;
Thu, 24 May 2018 17:28:03 -0400 (EDT)
From: Stefan Berger
To: libvir-list@redhat.com
Date: Thu, 24 May 2018 16:25:57 -0400
In-Reply-To: <20180524202614.3180183-1-stefanb@linux.vnet.ibm.com>
References: <20180524202614.3180183-1-stefanb@linux.vnet.ibm.com>
X-TM-AS-GCONF: 00
x-cbid: 18052420-0044-0000-0000-0000041A82E7
X-IBM-SpamModules-Scores:
X-IBM-SpamModules-Versions: BY=3.00009065; HX=3.00000241; KW=3.00000007;
PH=3.00000004; SC=3.00000261; SDB=6.01036001; UDB=6.00529949;
IPR=6.00815130;
MB=3.00021234; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-24 20:26:19
X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused
x-cbparentid: 18052420-0045-0000-0000-0000084CA00D
Message-Id: <20180524202614.3180183-2-stefanb@linux.vnet.ibm.com>
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, ,
definitions=2018-05-24_07:, , signatures=0
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
priorityscore=1501
malwarescore=0 suspectscore=43 phishscore=0 bulkscore=0 spamscore=0
clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000
definitions=main-1805240231
X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207
matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com
[10.5.110.41]); Thu, 24 May 2018 20:26:22 +0000 (UTC)
X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com
[10.5.110.41]);
Thu, 24 May 2018 20:26:22 +0000 (UTC) for IP:'148.163.156.1'
DOMAIN:'mx0a-001b2d01.pphosted.com'
HELO:'mx0a-001b2d01.pphosted.com'
FROM:'stefanb@linux.vnet.ibm.com' RCPT:''
X-RedHat-Spam-Score: -0.7 (RCVD_IN_DNSWL_LOW) 148.163.156.1
mx0a-001b2d01.pphosted.com 148.163.156.1
mx0a-001b2d01.pphosted.com
X-Scanned-By: MIMEDefang 2.84 on 10.5.110.41
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
X-loop: libvir-list@redhat.com
Cc: fiuczy@linux.ibm.com, mhartmay@linux.ibm.com, jtomko@redhat.com
Subject: [libvirt] [PATCH v8 01/18] conf: Add support for external swtpm TPM
emulator to domain XML
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: ,
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]);
Thu, 24 May 2018 20:26:31 +0000 (UTC)
X-ZohoMail: RSF_0 Z_629925259 SPT_0
Content-Type: text/plain; charset="utf-8"
This patch adds support for an external swtpm TPM emulator. The XML for
this type of TPM looks as follows:
The XML will currently only define a TPM 1.2.
Extend the documentation.
Add a test case testing the XML parser and formatter.
Signed-off-by: Stefan Berger
Reviewed-by: John Ferlan
Reviewed-by: J=EF=BF=BDn Tomko
---
docs/formatdomain.html.in | 30 +++++++++++++++++++++++++++
docs/schemas/domaincommon.rng | 5 +++++
src/conf/domain_audit.c | 2 ++
src/conf/domain_conf.c | 28 +++++++++++++++++++------
src/conf/domain_conf.h | 6 ++++++
src/qemu/qemu_cgroup.c | 1 +
src/qemu/qemu_command.c | 1 +
src/qemu/qemu_domain.c | 1 +
src/security/security_dac.c | 2 ++
src/security/security_selinux.c | 2 ++
tests/qemuxml2argvdata/tpm-emulator.xml | 30 +++++++++++++++++++++++++++
tests/qemuxml2xmloutdata/tpm-emulator.xml | 34 +++++++++++++++++++++++++++=
++++
tests/qemuxml2xmltest.c | 1 +
13 files changed, 137 insertions(+), 6 deletions(-)
create mode 100644 tests/qemuxml2argvdata/tpm-emulator.xml
create mode 100644 tests/qemuxml2xmloutdata/tpm-emulator.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 665d0f2529..c430855ba3 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -7713,6 +7713,26 @@ qemu-kvm -net nic,model=3D? /dev/null
</tpm>
</devices>
...
+
+
+
+ The emulator device type gives access to a TPM emulator providing
+ TPM functionality for each VM. QEMU talks to it over a Unix socket. =
With
+ the emulator device type each guest gets its own private TPM.
+ 'emulator' since 4.5.0
+
+ For this backend type the 'swtpm' TPM Emulator must be insta=
lled on the
+ host. Libvirt will automatically start an independent TPM em=
ulator
+ for each QEMU guest requesting access to it.
+