Received: from eggs.gnu.org ([208.118.235.92]:34115) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHcjj-0006Nh-Tk for qemu-devel@nongnu.org; Mon, 18 Mar 2013 12:16:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHcjh-0001DT-VY for qemu-devel@nongnu.org; Mon, 18 Mar 2013 12:16:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32428) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHcjh-0001DL-MN for qemu-devel@nongnu.org; Mon, 18 Mar 2013 12:16:33 -0400 From: Markus Armbruster References: <1363367835-11306-1-git-send-email-coreyb@linux.vnet.ibm.com> Date: Mon, 18 Mar 2013 17:16:28 +0100 In-Reply-To: <1363367835-11306-1-git-send-email-coreyb@linux.vnet.ibm.com> (Corey Bryant's message of "Fri, 15 Mar 2013 13:17:15 -0400") Message-ID: <878v5k65ur.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] QMP: TPM QMP and man page documentation updates List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corey Bryant Cc: stefanb@linux.vnet.ibm.com, qemu-devel@nongnu.org, lcapitulino@redhat.com Corey Bryant writes: > Signed-off-by: Corey Bryant > --- > qemu-options.hx | 3 ++- > qmp-commands.hx | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 61 insertions(+), 1 deletion(-) > > diff --git a/qemu-options.hx b/qemu-options.hx > index 30fb85d..3b3cd0f 100644 > --- a/qemu-options.hx > +++ b/qemu-options.hx > @@ -2237,7 +2237,8 @@ Backend type must be: > @option{passthrough}. > > The specific backend type will determine the applicable options. > -The @code{-tpmdev} option requires a @code{-device} option. > +The @code{-tpmdev} option creates the TPM backend and requires a > +@code{-device} option that specifies the TPM frontend interface model. > > Options to each backend are described below. > > diff --git a/qmp-commands.hx b/qmp-commands.hx > index b370060..4eda5ea 100644 > --- a/qmp-commands.hx > +++ b/qmp-commands.hx > @@ -2721,18 +2721,77 @@ EQMP > .mhandler.cmd_new = qmp_marshal_input_query_tpm, > }, > > +SQMP > +query-tpm > +--------- > + > +Return information about the TPM device. > + > +Arguments: None > + > +Example: > + > +-> { "execute": "query-tpm" } > +<- { "return": > + [ > + { "model": "tpm-tis", > + "tpm-options": > + { "type": "tpm-passthrough-options", > + "data": > + { "cancel-path": "/sys/class/misc/tpm0/device/cancel", > + "path": "/dev/tpm0" > + } > + }, > + "type": "passthrough", > + "id": "tpm0" > + } > + ] > + } > + > +EQMP > + "tpm-options" is a discriminated union. How is its discriminator "type" (here: "tpm-passthrough-options") related to the outer "type" (here: "passthrough")? [...]