tpm_passthrough is not working

Bug #1944701 reported by Deekshith Reddy
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I am trying to launch KVM with QEMU using TPM passthrough with "-m 1024 --enable-kvm -tpmdev passthrough,id=tpmrm0,path=/dev/tpmrm0 -device tpm-tis,tpmdev=tpmrm0", but I am getting below error
"qemu-system-x86_64: -tpmdev passthrough,id=tpmrm0,path=/dev/tpmrm0: tpm_passthrough: Could not guess TPM cancel path"

Am I missing anything? kindly help.

Tags: qemu tpm
tags: added: qemu
tags: added: tpm
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
most people would use higher level tools lik libvirt [1] to easen the rough edges here.

I happened to use it the way you tried in the past, but I've also seen the error you mention.
The details depend on the used tpm, firmware and qemu versions.

For your use case you most likely will get away with adding a (even a fake) cancel path:

$ touch /tmp/foo-cancel
$ qemu... -tpmdev passthrough,id=tpm0,path=/dev/tpm0,cancel-path=/tmp/foo-cancel -device tpm-tis,tpmdev=tpm0

It even is optional, but if it can't find it you will at least get the warning.
Here from the man page:
       -tpmdev passthrough,id=id,path=path,cancel-path=cancel-path
              (Linux-host only) Enable access to the host's TPM using the passthrough driver.

              path specifies the path to the host's TPM device, i.e., on a Linux host this would be /dev/tpm0. path is optional and by default /dev/tpm0 is used.

              cancel-path specifies the path to the host TPM device's sysfs entry allowing for cancellation of an ongoing TPM command. cancel-path is optional and by default QEMU will
              search for the sysfs entry to use.

Did this help or do you still think there is an issue in the package we'd need to fix?

[1]: https://libvirt.org/formatdomain.html#tpm-device

Changed in qemu (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for qemu (Ubuntu) because there has been no activity for 60 days.]

Changed in qemu (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.