TPM Emulator is considered to have been created when tpm state folder exists
In qemuTPMEmulatorCreateStorage function,TPM Emulator is considered to have been created when the tpm state folder exists. When tpm state permanent file has been deleted and tpm state folder exists,it doesn‘t execute swtpm_setup and EK certificate isn't applied.
So whether it needs to be modified to judge the existence of tpm permanent file to denote that the TPM Emulator has been created ?
https://gitlab.com/libvirt/libvirt/-/blob/master/src/qemu/qemu_tpm.c#L175-195
https://gitlab.com/libvirt/libvirt/-/blob/master/src/qemu/qemu_tpm.c#L555-581
Edited by Peter Krempa