From d1a0cf738dab24fbfd8e9225b7f3df43dcfafc06 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Wed, 27 Feb 2013 12:47:49 -0500 Subject: Support for TPM command line options This patch adds support for TPM command line options. The command line options supported here are ./qemu-... -tpmdev passthrough,path=,id= -device tpm-tis,tpmdev=,id= and ./qemu-... -tpmdev help where the latter works similar to -soundhw help and shows a list of available TPM backends (for example 'passthrough'). Using the type parameter, the backend is chosen, i.e., 'passthrough' for the passthrough driver. The interpretation of the other parameters along with determining whether enough parameters were provided is pushed into the backend driver, which needs to implement the interface function 'create' and return a TPMDriverOpts structure if the VM can be started or 'NULL' if not enough or bad parameters were provided. Monitor support for 'info tpm' has been added. It for example prints the following: (qemu) info tpm TPM devices: tpm0: model=tpm-tis \ tpm0: type=passthrough,path=/dev/tpm0,cancel-path=/sys/devices/pnp0/00:09/cancel Signed-off-by: Stefan Berger Reviewed-by: Corey Bryant Reviewed-by: Joel Schopp Message-id: 1361987275-26289-2-git-send-email-stefanb@linux.vnet.ibm.com Signed-off-by: Anthony Liguori --- qmp-commands.hx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'qmp-commands.hx') diff --git a/qmp-commands.hx b/qmp-commands.hx index 95022e259f..b370060848 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -2715,6 +2715,24 @@ EQMP .mhandler.cmd_new = qmp_marshal_input_query_target, }, + { + .name = "query-tpm", + .args_type = "", + .mhandler.cmd_new = qmp_marshal_input_query_tpm, + }, + + { + .name = "query-tpm-models", + .args_type = "", + .mhandler.cmd_new = qmp_marshal_input_query_tpm_models, + }, + + { + .name = "query-tpm-types", + .args_type = "", + .mhandler.cmd_new = qmp_marshal_input_query_tpm_types, + }, + { .name = "chardev-add", .args_type = "id:s,backend:q", -- cgit v1.2.3