From: David Vrabel <david.vrabel@citrix.com>
To: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Cc: <konrad.wilk@oracle.com>, <tpmdd-devel@lists.sourceforge.net>,
<linux-kernel@vger.kernel.org>, <leosilva@linux.vnet.ibm.com>,
<shpedoikal@gmail.com>, <xen-devel@lists.xen.org>,
<mail@srajiv.net>, <adlai@linux.vnet.ibm.com>, <tpmdd@sirrix.com>,
<PeterHuewe@gmx.de>
Subject: Re: [PATCH v4] drivers/tpm: add xen tpmfront interface
Date: Mon, 22 Jul 2013 16:18:34 +0100 [thread overview]
Message-ID: <51ED4D4A.3060705@citrix.com> (raw)
In-Reply-To: <1372714468-28120-1-git-send-email-dgdegra@tycho.nsa.gov>
On 01/07/13 22:34, Daniel De Graaf wrote:
> This is a complete rewrite of the Xen TPM frontend driver, taking
> advantage of a simplified frontend/backend interface and adding support
> for cancellation and timeouts. The backend for this driver is provided
> by a vTPM stub domain using the interface in Xen 4.3.
[...]
> --- /dev/null
> +++ b/Documentation/xen-tpmfront.txt
Suggest putting this in Documentation/tpm/.
> --- /dev/null
> +++ b/drivers/char/tpm/xen-tpmfront.c
[...]
> +static void backend_changed(struct xenbus_device *dev,
> + enum xenbus_state backend_state)
> +{
> + int val;
Hrm. I don't like how every front/back pair invents their own variation
of the state machine.
Please document the front and back state machines in
xen/include/public/io/tpmif.h (and the correspoding copy in Linux).
> +
> + switch (backend_state) {
> + case XenbusStateInitialised:
> + case XenbusStateConnected:
if (dev->state == XenbusStateConnected)
break;
Perhaps?
> + if (xenbus_scanf(XBT_NIL, dev->otherend,
> + "feature-protocol-v2", "%d", &val) < 0)
> + val = 0;
> + if (!val) {
> + xenbus_dev_fatal(dev, -EINVAL,
> + "vTPM protocol 2 required");
> + return;
> + }
> + xenbus_switch_state(dev, XenbusStateConnected);
> + break;
> +
> + case XenbusStateClosing:
> + case XenbusStateClosed:
> + device_unregister(&dev->dev);
> + xenbus_frontend_closed(dev);
> + break;
> + default:
> + break;
> + }
> +}
David
next prev parent reply other threads:[~2013-07-22 15:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-01 21:34 [PATCH v4] drivers/tpm: add xen tpmfront interface Daniel De Graaf
2013-07-01 22:32 ` [tpmdd-devel] " Peter Hüwe
2013-07-01 22:32 ` Peter Hüwe
2013-07-01 22:57 ` Konrad Rzeszutek Wilk
2013-07-01 22:57 ` Konrad Rzeszutek Wilk
2013-07-22 15:18 ` David Vrabel [this message]
2013-07-22 16:20 ` Daniel De Graaf
2013-07-22 16:20 ` Daniel De Graaf
2013-07-24 17:09 ` David Vrabel
2013-07-24 17:09 ` David Vrabel
2013-07-22 15:18 ` David Vrabel
-- strict thread matches above, loose matches on Subject: below --
2013-07-01 21:34 Daniel De Graaf
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=51ED4D4A.3060705@citrix.com \
--to=david.vrabel@citrix.com \
--cc=PeterHuewe@gmx.de \
--cc=adlai@linux.vnet.ibm.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=konrad.wilk@oracle.com \
--cc=leosilva@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mail@srajiv.net \
--cc=shpedoikal@gmail.com \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=tpmdd@sirrix.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.