To get this to compile on top of qemu-kvm, I needed the following patch to force CONFIG_THREAD on so as to define things like qemu_mutex_lock:
Index: qemu-kvm-tpm/configure =================================================================== --- qemu-kvm-tpm.orig/configure 2011-05-09 21:19:10.920002303 -0500 +++ qemu-kvm-tpm/configure 2011-05-09 21:19:22.150002305 -0500 @@ -3420,6 +3420,7 @@ exit 1 fi echo "CONFIG_TPM=y" >> $config_host_mak + echo "CONFIG_THREAD=y" >> $config_host_mak fi fi