From: James Bottomley <jejb@linux.ibm.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: "Daniel P . Berrangé" <berrange@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Stefan Berger" <stefanb@linux.ibm.com>
Subject: Re: [PATCH v8 2/2] tpm: add backend for mssim
Date: Thu, 05 Oct 2023 15:28:10 -0400 [thread overview]
Message-ID: <6a10457659617e1cc37e8545640a4698a79766d7.camel@linux.ibm.com> (raw)
In-Reply-To: <efc8219a-5207-69a3-9b5f-49040b812f33@linaro.org>
On Thu, 2023-10-05 at 18:11 +0200, Philippe Mathieu-Daudé wrote:
> On 5/10/23 15:57, James Bottomley wrote:
> > On Thu, 2023-10-05 at 08:49 +0200, Philippe Mathieu-Daudé wrote:
> > > On 4/10/23 20:42, James Bottomley wrote:
> > > > From: James Bottomley <James.Bottomley@HansenPartnership.com>
[...]
> > > > +.. code-block:: console
> > > > +
> > > > + qemu-system-x86_64 <qemu-options> \
> > > > + -tpmdev
> > > > "{'type':'mssim','id':'tpm0','command':{'type':'inet','host':'r
> > > > emot
> > > > e','port':'2321'},'control':{'type':'inet','host':'remote','por
> > > > t':'
> > > > 2322'}}" \
> > > > + -device tpm-crb,tpmdev=tpm0
> > >
> > > Did you test running this command line on a big-endian host?
> >
> > Well no, big endian machines are rather rare nowadays. However,
> > since the QIOChannelSocket abstraction is based on SocketAddress,
> > which is a qapi wrapper around strings, what makes you think the
> > endianness would matter?
>
> You use ntoh/hton in tpm_mssim_handle_request(), so I wonder about
> the 'uint32_t cmd' in tpm_send_ctrl().
tpm_send_ctrl has a htonl for the send control command as well (The TPM
server is always network ordered, i.e. big endian). The reason it
doesn't have one for the receive is that it only checks against zero
which is endian invariant, if that's what you're asking?
James
prev parent reply other threads:[~2023-10-05 19:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 18:42 [PATCH v8 0/2] tpm: add mssim backend James Bottomley
2023-10-04 18:42 ` [PATCH v8 1/2] tpm: convert tpmdev options processing to new visitor format James Bottomley
2023-10-04 18:42 ` [PATCH v8 2/2] tpm: add backend for mssim James Bottomley
2023-10-05 6:49 ` Philippe Mathieu-Daudé
2023-10-05 13:57 ` James Bottomley
2023-10-05 16:11 ` Philippe Mathieu-Daudé
2023-10-05 19:28 ` James Bottomley [this message]
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=6a10457659617e1cc37e8545640a4698a79766d7.camel@linux.ibm.com \
--to=jejb@linux.ibm.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanb@linux.ibm.com \
/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).