some TPM related files are missing in sysfs when enable passthrough TPM
Host environment
- Operating system: (ubuntu)
- OS/kernel version: (Linux version 5.11.0-38-generic (buildd@lgw01-amd64-041) (gcc (Ubuntu 9.3.0-17ubuntu1
20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #4220.04.1)) - Architecture: (x86)
- QEMU flavor: (qemu-system-x86_64)
- QEMU version: (e.g.
qemu-system-x86_64 --version
) - QEMU command line: qemu-system-x86_64 -enable-kvm -m 4096 -smp 4 -boot d -hda wic-no-sec.qcow2 --nographic -drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF_CODE.fd -tpmdev passthrough,id=tpm0,path=/dev/tpm0,cancel-path=/tmp/foo-cancel -device tpm-tis,tpmdev=tpm0
Emulated/Virtualized environment
- Operating system: (yocto linux)
- OS/kernel version: (Linux intel-x86-64 5.15.0-yocto-standard+ #96 SMP PREEMPT Thu Nov 4 11:08:05 CST 2021 x86_64 x86_64 x86_64 GNU/Linux)
- Architecture: (x86)
Description of problem
When enable passthrough TPM, there are some files in sysfs are missing, like description, uid file. under the host linux, we have those file in it: root@intel-x86-64:/sys/class/tpm/tpm0/device/firmware_node# cat description TPM 2.0 Device root@intel-x86-64:/sys/class/tpm/tpm0/device/firmware_node# cat uid 1
Steps to reproduce
after boot into system, check sysfs, there is no description and uid file in /sys/class/tpm/tpm0/device/firmware_node