Description of problem:
Downstream qemu-kvm does not support the TPM configuration for pass-through devices.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
On RHEL 7.2
1. For KVM guest define a TPM passthrough device as per
2. Snip of gues XML definition
3. Start the guest.
Guest fails to start with bellow error:
Error starting domain: unsupported configuration: The QEMU executable /usr/libexec/qemu-kvm does not support TPM backend type passthrough
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 125, in tmpcb
File "/usr/share/virt-manager/virtManager/libvirtobject.py", line 83, in newfn
ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1433, in startup
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 1029, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: unsupported configuration: The QEMU executable /usr/libexec/qemu-kvm does not support TPM backend type passthrough
Guest should start normally.
On RHEL 7.2
# rpm -q qemu-kvm
# /usr/libexec/qemu-kvm --help | grep -i tpm
On Fedora 23
# rpm -q qemu-kvm
# /usr/bin/qemu-kvm --help | grep -i tpm
TPM device options: -tpmdev passthrough,id=id[,path=path][,cancel-path=path]
use path to provide path to a character device; default is /dev/tpm0
use cancel-path to provide path to TPM's cancel sysfs entry;
if not provided it will be searched for in /sys/class/misc/tpm?/device
Installed tpl-tools package.
# ls -al /lib/modules/$(uname -r)/kernel/drivers/char/tpm
drwxr-xr-x. 2 root root 4096 Apr 2 16:08 .
drwxr-xr-x. 5 root root 4096 Apr 2 16:08 ..
-rw-r--r--. 1 root root 11241 Mar 1 03:55 tpm_atmel.ko
-rw-r--r--. 1 root root 12097 Mar 1 03:55 tpm_crb.ko
-rw-r--r--. 1 root root 11793 Mar 1 03:55 tpm_i2c_atmel.ko
-rw-r--r--. 1 root root 16121 Mar 1 03:55 tpm_i2c_infineon.ko
-rw-r--r--. 1 root root 21857 Mar 1 03:55 tpm_i2c_nuvoton.ko
-rw-r--r--. 1 root root 25225 Mar 1 03:55 tpm_infineon.ko
-rw-r--r--. 1 root root 15969 Mar 1 03:55 tpm_nsc.ko
TPM 1.2 Version Info:
Chip Version: 220.127.116.11
Spec Level: 2
Errata Revision: 3
TPM Vendor ID: IFX
Vendor Specific data: 062800be 0074706d 733038ff ff
TPM Version: 01010000
Manufacturer Info: 49465800
*** Bug 1427894 has been marked as a duplicate of this bug. ***
*** Bug 1314816 has been marked as a duplicate of this bug. ***
The TPM2 userspace tools as of RHEL 7.5 (Tech Preview in RHEL 7.4) include a resource manager that allows multiple users to interact with a TPM. Multiple keys and key hierarchies can be used. The actual keys are stored on disk as encrypted blobs and loaded and unloaded as needed.
It should be possible to design and implement qemu support such that each VM appears to have its own TPM, including unique set of keys and measurements.
This is not a straight TPM passthrough for the physical TPM, but would meet the requirements for multiple guests using bitlocker and measured boot.
Is this direction worth exploring?