1. 03 7月, 2018 3 次提交
  2. 02 7月, 2018 1 次提交
    • J
      qemu_migration: Check for active domain after talking to remote daemon · 5f998219
      Jiri Denemark 提交于
      Once we called qemuDomainObjEnterRemote to talk to the destination
      daemon during a peer to peer migration, the vm lock is released and we
      only hold an async job. If the source domain dies at this point the
      monitor EOF callback is allowed to do its job and (among other things)
      clear all private data irrelevant for stopped domain. Thus when we call
      qemuDomainObjExitRemote, the domain may already be gone and we should
      avoid touching runtime private data (such as current job info).
      
      In other words after acquiring the lock in qemuDomainObjExitRemote, we
      need to check the domain is still alive. Unless we're doing offline
      migration.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1589730Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      5f998219
  3. 28 6月, 2018 2 次提交
  4. 27 6月, 2018 1 次提交
  5. 26 6月, 2018 2 次提交
  6. 25 6月, 2018 1 次提交
  7. 21 6月, 2018 1 次提交
  8. 20 6月, 2018 2 次提交
  9. 19 6月, 2018 3 次提交
  10. 13 6月, 2018 1 次提交
  11. 12 6月, 2018 3 次提交
  12. 08 6月, 2018 5 次提交
  13. 06 6月, 2018 5 次提交
    • 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
    • S
      qemu: Extend QEMU with external TPM support · 2a606b86
      Stefan Berger 提交于
      Implement functions for managing the storage of the external swtpm as well
      as starting and stopping it. Also implement functions to use swtpm_setup,
      which simulates the manufacturing of a TPM, which includes creation of
      certificates for the device.
      
      Further, the external TPM needs storage on the host that we need to set
      up before it can be run. We can clean up the host once the domain is
      undefined.
      
      This patch also implements a small layer for external device support that
      calls into the TPM device layer if a domain has an attached TPM. This is
      the layer we will wire up later on.
      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>
      2a606b86
    • S
      conf: Add support for external swtpm TPM emulator to domain XML · 33af0b2b
      Stefan Berger 提交于
      This patch adds support for an external swtpm TPM emulator. The XML for
      this type of TPM looks as follows:
      
       <tpm model='tpm-tis'>
         <backend type='emulator'/>
       </tpm>
      
      The XML will currently only define a TPM 1.2.
      
      Extend the documentation.
      
      Add a test case testing the XML parser and formatter.
      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>
      33af0b2b
    • J
      qemu: Fix double free in qemuDomainSecretAESClear · 228ae709
      John Ferlan 提交于
      Commit id 02b031a4 added a secondary path from which the
      incoming @secinfo would not be free'd until the private
      data was freed in qemuDomainStorageSourcePrivateDispose.
      
      However, by doing this the original intention to free
      @*secinfo afterwards is lost and thus the pass by value
      of the secinfo->s.aes (or secinfo->s.plain for its method)
      results in not keeping the NULL setting in the various
      secret.{username|iv|ciphertext} fields upon return to
      qemuDomainSecretInfoClear and eventually will result in
      a double free at domain destroy:
      
          raise ()
          abort ()
          __libc_message ()
          malloc_printerr ()
          _int_free ()
          virFree
          qemuDomainSecretAESClear
          qemuDomainSecretInfoClear
          qemuDomainSecretInfoFree
          qemuDomainStorageSourcePrivateDispose
          virObjectUnref
          virStorageSourceClear
          virStorageSourceFree
          virDomainDiskDefFree
          virDomainDefFree
          virDomainObjRemoveTransientDef
          qemuProcessStop
          qemuDomainDestroyFlags
          virDomainDestroy
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NPeter Krempa <pkrempa@redhat.com>
      228ae709
    • R
      all: Replace virGetLastError with virGetLastErrorCode where we can · 2b6667ab
      ramyelkest 提交于
      Replace instances where we previously called virGetLastError just to
      either get the code or to check if an error exists with
      virGetLastErrorCode to avoid a validity pre-check.
      Signed-off-by: NRamy Elkest <ramyelkest@gmail.com>
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      2b6667ab
  14. 05 6月, 2018 10 次提交