• S
    conf: Add support for choosing emulation of a TPM 2.0 · 8737578d
    Stefan Berger 提交于
    This patch extends the TPM's device XML with TPM 2.0 support. This only works
    for the emulator type backend and looks as follows:
    
        <tpm model='tpm-tis'>
          <backend type='emulator' version='2.0'/>
        </tpm>
    
    The swtpm process now has --tpm2 as an additional parameter:
    
    system_u:system_r:svirt_t:s0:c597,c632 tss 18477 11.8  0.0 28364  3868 ?        Rs   11:13  13:50 /usr/bin/swtpm socket --daemon --ctrl type=unixio,path=/var/run/libvirt/qemu/swtpm/testvm-swtpm.sock,mode=0660 --tpmstate dir=/var/lib/libvirt/swtpm/testvm/tpm2,mode=0640 --log file=/var/log/swtpm/libvirt/qemu/testvm-swtpm.log --tpm2 --pid file=/var/run/libvirt/qemu/swtpm/testvm-swtpm.pid
    
    The version of the TPM can be changed and the state of the TPM is preserved.
    Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
    Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
    Reviewed-by: NJán Tomko <jtomko@redhat.com>
    8737578d
qemu_domain.c 389.1 KB