From: Stefan Berger <stefanb@linux.ibm.com>
To: James Bottomley <jejb@linux.ibm.com>, qemu-devel@nongnu.org
Cc: "Daniel P . Berrangé" <berrange@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>
Subject: Re: [PATCH v5 2/2] tpm: add backend for mssim
Date: Thu, 5 Jan 2023 11:20:40 -0500 [thread overview]
Message-ID: <789bd0bd-05ed-c413-272e-0204472f3e3b@linux.ibm.com> (raw)
In-Reply-To: <20230105130020.17755-3-jejb@linux.ibm.com>
On 1/5/23 08:00, James Bottomley wrote:
> From: James Bottomley <James.Bottomley@HansenPartnership.com>
>
> The Microsoft Simulator (mssim) is the reference emulation platform
> for the TCG TPM 2.0 specification.
>
> https://github.com/Microsoft/ms-tpm-20-ref.git
>
>
> diff --git a/docs/specs/tpm.rst b/docs/specs/tpm.rst
> index 535912a92b..1398735956 100644
> --- a/docs/specs/tpm.rst
> +++ b/docs/specs/tpm.rst
> @@ -270,6 +270,38 @@ available as a module (assuming a TPM 2 is passed through):
> /sys/devices/LNXSYSTEM:00/LNXSYBUS:00/MSFT0101:00/tpm/tpm0/pcr-sha256/9
> ...
>
> +The QEMU TPM Microsoft Simulator Device
> +---------------------------------------
> +
> +The TCG provides a reference implementation for TPM 2.0 written by
> +Microsoft (See `ms-tpm-20-ref`_ on github). The reference implementation
> +starts a network server and listens for TPM commands on port 2321 and
> +TPM Platform control commands on port 2322, although these can be
> +altered. The QEMU mssim TPM backend talks to this implementation. By
> +default it connects to the default ports on localhost:
> +
> +.. code-block:: console
> +
> + qemu-system-x86_64 <qemu-options> \
> + -tpmdev mssim,id=tpm0 \
> + -device tpm-crb,tpmdev=tpm0
> +
> +
> +Although it can also communicate with a remote host, which must be
> +specified as a SocketAddress via json on the command line for each of
> +the command and control ports:
> +
> +.. code-block:: console
> +
> + qemu-system-x86_64 <qemu-options> \
> + -tpmdev "{'type':'mssim','id':'tpm0','command':{'type':'inet','host':'remote','port':'2321'},'control':{'type':'inet','host':'remote','port':'2322'}}" \
> + -device tpm-crb,tpmdev=tpm0
> +
> +
> +The mssim backend supports snapshotting and migration, but the state
> +of the Microsoft Simulator server must be preserved (or the server
> +kept running) outside of QEMU for restore to be successful.
My comments to v3 still apply here.
I also just tried migration and on the -incoming side it did not work anymore. Did you test this?
Stefan
next prev parent reply other threads:[~2023-01-05 16:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 13:00 [PATCH v5 0/2] tpm: add mssim backend James Bottomley
2023-01-05 13:00 ` [PATCH v5 1/2] tpm: convert tpmdev options processing to new visitor format James Bottomley
2023-01-05 14:59 ` Stefan Berger
2023-01-05 20:34 ` James Bottomley
2023-01-09 14:57 ` Daniel P. Berrangé
2023-01-05 13:00 ` [PATCH v5 2/2] tpm: add backend for mssim James Bottomley
2023-01-05 16:20 ` Stefan Berger [this message]
2023-01-05 22:02 ` James Bottomley
2023-01-05 22:25 ` Stefan Berger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=789bd0bd-05ed-c413-272e-0204472f3e3b@linux.ibm.com \
--to=stefanb@linux.ibm.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=jejb@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).