QEMU aarch64 support for Windows TPM driver (TIS, CRB interfaces)

I am following up on a swtpm repository issue [1] and QEMU mailing list thread [2] related to bringing up Windows aarch64 guests with QEMU aarch64 with TPM2 enabled.

It looks like the Windows driver cannot properly initialize the TPM2 device which is made known to the guest via the tpm-tis-device device implementation (in my case the backend is the swtpm software emulator). I observed that Linux aarch64 guests properly recognize the TPM2 device, meaning the Linux driver seems to go well along with how the TPM2 device is provided to the guest.

In order to properly bring up the TPM2 device for Windows aarch64 guests, potential options could be to:

  • adapt the tpm-tis-device implementation so that the Windows driver can properly initialize the TPM2 device
    • thought: is the current implementation possible non TIS standard compliant?
  • adapt the Windows driver
    • thought: since it works with the Linux driver this should technically be possible but adaption of that driver may not happen
  • enable the tpm-crb device on aarch64
    • thought: what would be the scope of work for this, or is there a specific reason this hasn't been done on ARM?

It would be great to get some experts' opinions on this!

[1] https://github.com/stefanberger/swtpm/issues/493 [2] https://lists.gnu.org/archive/html/qemu-devel/2021-07/msg07376.html