Patchwork [2/2] QMP: TPM QMP and man page documentation updates

login
register
mail settings
Submitter Corey Bryant
Date March 20, 2013, 4:34 p.m.
Message ID <1363797289-5865-2-git-send-email-coreyb@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/229432/
State New
Headers show

Comments

Corey Bryant - March 20, 2013, 4:34 p.m.
Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
---
 qemu-options.hx |    3 +-
 qmp-commands.hx |   58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 1 deletions(-)
Eric Blake - March 20, 2013, 9:39 p.m.
On 03/20/2013 10:34 AM, Corey Bryant wrote:
> Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>
> ---
>  qemu-options.hx |    3 +-
>  qmp-commands.hx |   58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 60 insertions(+), 1 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

[No cover letter meant I had to answer each mail, instead of doing a
series review message on 0/2.]
Markus Armbruster - March 21, 2013, 7:21 a.m.
Corey Bryant <coreyb@linux.vnet.ibm.com> writes:

> Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com>

Reviewed-by: Markus Armbruster <armbru@redhat.com>

Patch

diff --git a/qemu-options.hx b/qemu-options.hx
index 06dd565..b4e3a2d 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2241,7 +2241,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..3aa6bd1 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -2721,18 +2721,76 @@  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",
+         "options":
+           { "type": "passthrough",
+             "data":
+               { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
+                 "path": "/dev/tpm0"
+               }
+           },
+         "id": "tpm0"
+       }
+     ]
+   }
+
+EQMP
+
     {
         .name       = "query-tpm-models",
         .args_type  = "",
         .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
     },
 
+SQMP
+query-tpm-models
+----------------
+
+Return a list of supported TPM models.
+
+Arguments: None
+
+Example:
+
+-> { "execute": "query-tpm-models" }
+<- { "return": [ "tpm-tis" ] }
+
+EQMP
+
     {
         .name       = "query-tpm-types",
         .args_type  = "",
         .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
     },
 
+SQMP
+query-tpm-types
+---------------
+
+Return a list of supported TPM types.
+
+Arguments: None
+
+Example:
+
+-> { "execute": "query-tpm-types" }
+<- { "return": [ "passthrough" ] }
+
+EQMP
+
     {
         .name       = "chardev-add",
         .args_type  = "id:s,backend:q",