From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHevJ-00023I-GR for qemu-devel@nongnu.org; Mon, 18 Mar 2013 14:36:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHeug-0002Pz-5u for qemu-devel@nongnu.org; Mon, 18 Mar 2013 14:36:41 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:49905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHeuf-0002P4-VH for qemu-devel@nongnu.org; Mon, 18 Mar 2013 14:36:02 -0400 Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Mar 2013 12:35:58 -0600 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 6ED183E40055 for ; Mon, 18 Mar 2013 12:35:40 -0600 (MDT) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r2IIZfcn373916 for ; Mon, 18 Mar 2013 12:35:41 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r2IIZeho030798 for ; Mon, 18 Mar 2013 12:35:40 -0600 Message-ID: <51475E7A.2080302@linux.vnet.ibm.com> Date: Mon, 18 Mar 2013 14:35:38 -0400 From: Corey Bryant MIME-Version: 1.0 References: <1363367835-11306-1-git-send-email-coreyb@linux.vnet.ibm.com> <878v5k65ur.fsf@blackfin.pond.sub.org> <51475310.2060008@linux.vnet.ibm.com> In-Reply-To: <51475310.2060008@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Stefan Berger Cc: lcapitulino@redhat.com, Markus Armbruster , qemu-devel@nongnu.org On 03/18/2013 01:46 PM, Stefan Berger wrote: > On 03/18/2013 12:16 PM, Markus Armbruster wrote: >> 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")? > > It gives you similar information twice. So there is a direct > relationship between the two types. > The sample above could be the result when the following command line options are in effect: qemu-system-x86_64 -tpmdev passthrough,id=tpm0,path=/dev/tpm0,cancel-path=/sys/class/misc/tpm0/device/cancel -device tpm-tis,tpmdev=tpm0 -- Regards, Corey Bryant