Re: QUEMU and TPM2 device emulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2020-10-14 at 15:27 +0000, Roberts, William C wrote:
> Has anyone ever setup a QUEMU instance with a virtualized TPM? I need
> to try and replicate an issue with the in-kernel Resource manager. My
> goal is to use the integrated QUEMU support
> To bring up an emulated TPM device and it's associated RM node @
> /dev/tpmrm0.
> 
> I am looking at:
> https://android.googlesource.com/platform/external/qemu/+/emu-master-dev/docs/specs/tpm.txt
> 
> Which shows this command:
> 
> qemu-system-x86_64 -display sdl -enable-kvm \
>   -m 1024 -boot d -bios bios-256k.bin -boot menu=on \
>   -chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock \
>   -tpmdev emulator,id=tpm0,chardev=chrtpm \
>   -device tpm-tis,tpmdev=tpm0 test.img
> 
> <snip>
> #> dmesg | grep -i tpm
> [    0.711310] tpm_tis 00:06: 1.2 TPM (device=id 0x1, rev-id 1)
> 
> I have a few questions around this that I cannot seem to dig up any
> documentation on:
> 1. How to specify TPM2.0 device? The project 
> https://github.com/stefanberger/swtpm/wiki seems to indicate it would
> be supported.

All QEMU is doing is passing through a socket to something as a TPM. 
Either TPM 1.2 or 2.0 could be on the end of that socket, so what
really matters is what's at the other end of /tmp/mytpm1/swtpm-sock. 
If you change that to be TPM 2.0 then QEMU will see it.

James





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux