From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ex1Ww-0006Vm-L0 for qemu-devel@nongnu.org; Fri, 16 Mar 2018 22:25:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ex1Wr-00084b-Lk for qemu-devel@nongnu.org; Fri, 16 Mar 2018 22:25:10 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54530) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ex1Wr-00082X-Ba for qemu-devel@nongnu.org; Fri, 16 Mar 2018 22:25:05 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2H2OjHv117110 for ; Fri, 16 Mar 2018 22:25:04 -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 2grk9pccg9-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 16 Mar 2018 22:25:03 -0400 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 16 Mar 2018 22:25:02 -0400 From: Stefan Berger Date: Fri, 16 Mar 2018 22:24:54 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Message-Id: <1521253498-6834-1-git-send-email-stefanb@linux.vnet.ibm.com> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v5.2 for 2.13 0/4] tpm: Extend TPM with state migration support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: dgilbert@redhat.com, marcandre.lureau@gmail.com, Stefan Berger This series of patches implements support for migrating the state of the external 'swtpm' TPM emulator as well as that of the TIS interface.=20 For testing of TPM 2 (migration) please use the following git repos and branches: libtpms:=20 - repo: https://github.com/stefanberger/libtpms - branch: tpm2-preview.rev146.v2 swtpm: - repo: https://github.com/stefanberger/swtpm - branch: tpm2-preview.rev146.v2 Regards, Stefan Changes: v4->v5: - followed Marc-Andr=C3=A9's and Alan's comments where possible; some = comments were not addressed and reasons posted to mailing list - converted debug statements to tracing - qemu_chr_fe_read_all does not return errno, so displaying expected v= ersus received number of bytes rather than strerror(errno) - added test cases - added documentation for migration to docs/spec/tpm.txt v3->v4: - dropped the size limit enforcement on blobs received from the swtpm - the .post_load migration function requires errno's to be returned. -> some of the functions have been converted to return a better errn= o Stefan Berger (4): tpm: extend TPM emulator with state migration support tpm: extend TPM TIS with state migration support docs: tpm: add VM save/restore example and troubleshooting guide tpm: Add test cases that uses the external swtpm with CRB interface docs/specs/tpm.txt | 106 +++++++++++++++ hw/tpm/tpm_emulator.c | 318 +++++++++++++++++++++++++++++++++++++++= ++++-- hw/tpm/tpm_tis.c | 52 +++++++- hw/tpm/trace-events | 9 +- tests/Makefile.include | 3 + tests/tpm-crb-swtpm-test.c | 244 ++++++++++++++++++++++++++++++++++ tests/tpm-util.c | 143 ++++++++++++++++++++ tests/tpm-util.h | 36 +++++ 8 files changed, 897 insertions(+), 14 deletions(-) create mode 100644 tests/tpm-crb-swtpm-test.c create mode 100644 tests/tpm-util.c create mode 100644 tests/tpm-util.h --=20 2.5.5