aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.vnet.ibm.com>2013-02-27 12:47:54 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-03-12 13:40:55 -0500
commit92dcc234ec1f266fb5d59bed77d66320c2c75965 (patch)
treea3d77a2a769ea5b546e284f837024ac442527048 /vl.c
parent4549a8b7ee3c47155c09582f31086f7d0ba61fc4 (diff)
downloadqemu-92dcc234ec1f266fb5d59bed77d66320c2c75965.zip
qemu-92dcc234ec1f266fb5d59bed77d66320c2c75965.tar.gz
qemu-92dcc234ec1f266fb5d59bed77d66320c2c75965.tar.bz2
Add support for cancelling of a TPM command
This patch adds support for cancelling an executing TPM command. In Linux for example a user can cancel a command through the TPM's sysfs 'cancel' entry using echo "1" > /sysfs/class/misc/tpm0/device/cancel This patch propagates the cancellation of a command inside a VM to the host TPM's sysfs entry. It also uses the possibility to cancel the command before QEMU VM shutdown or reboot, which helps in preventing QEMU from hanging while waiting for the completion of the command. To relieve higher layers or users from having to determine the TPM's cancel sysfs entry, the driver searches for the entry in well known locations. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com> Message-id: 1361987275-26289-7-git-send-email-stefanb@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index 0c6c2bf..3822d99 100644
--- a/vl.c
+++ b/vl.c
@@ -503,6 +503,11 @@ static QemuOptsList qemu_tpmdev_opts = {
.help = "Type of TPM backend",
},
{
+ .name = "cancel-path",
+ .type = QEMU_OPT_STRING,
+ .help = "Sysfs file entry for canceling TPM commands",
+ },
+ {
.name = "path",
.type = QEMU_OPT_STRING,
.help = "Path to TPM device on the host",