1. 27 9月, 2017 1 次提交
    • P
      qemu: domain: Extract common clearing of VM private data · 3685e2dd
      Peter Krempa 提交于
      VM private data is cleared when the VM is turned off and also when the
      VM object is being freed. Some of the clearing code was duplicated.
      Extract it to a separate function.
      
      This also removes the now unnecessary function
      qemuDomainClearPrivatePaths.
      3685e2dd
  2. 21 9月, 2017 1 次提交
  3. 14 9月, 2017 1 次提交
    • P
      qemu: Remove support for legacy block jobs · 2350d101
      Peter Krempa 提交于
      Block job QMP commands with underscores rather than dashes were never
      released in upstream qemu, (they were added, but modified in the same
      release [1]), but a certain distro managed to backport the version in the
      middle.
      
      The change also slightly modified semantics for the abort command, which
      made us have a lot of code which was only ever present in certain
      downstream distros.
      
      Clean the upstream code from the legacy cruft and support only the
      upstream implementations.
      
      [1] See qemu commit v1.0-2176-gdb58f9c060
      Reviewed-by: NEric Blake <eblake@redhat.com>
      2350d101
  4. 13 9月, 2017 1 次提交
    • J
      qemu: Clean up qemuDomainSecretPrepare · 23706c17
      John Ferlan 提交于
      No need to pass a @driver parameter since all that's done is deref
      the @cfg especially since the only caller can just pass an already
      referenced @cfg.
      
      Also, looks like commit id '0298531b' at one time had a different
      name for the API, so I took the liberty of fixing the comments too
      since I would already be updating them for the @cfg variable.
      23706c17
  5. 07 9月, 2017 6 次提交
  6. 29 8月, 2017 1 次提交
  7. 25 7月, 2017 2 次提交
  8. 10 7月, 2017 1 次提交
    • P
      qemu: domain: Use vcpu 'node-id' property and pass it back to qemu · ccac4465
      Peter Krempa 提交于
      vcpu properties gathered from query-hotpluggable cpus need to be passed
      back to qemu. As qemu did not use the node-id property until now and
      libvirt forgot to pass it back properly (it was parsed but not passed
      around) we did not honor this.
      
      This patch adds node-id to the structures where it was missing and
      passes it around as necessary.
      
      The test data was generated with a VM with following config:
          <numa>
            <cell id='0' cpus='0,2,4,6' memory='512000' unit='KiB'/>
            <cell id='1' cpus='1,3,5,7' memory='512000' unit='KiB'/>
          </numa>
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452053
      ccac4465
  9. 16 6月, 2017 1 次提交
  10. 14 6月, 2017 1 次提交
  11. 07 6月, 2017 6 次提交
  12. 05 6月, 2017 1 次提交
  13. 27 4月, 2017 1 次提交
  14. 18 4月, 2017 1 次提交
    • P
      qemu: refactor qemuDomainMachine* functions · ac97658d
      Pavel Hrdina 提交于
      Introduce new wrapper functions without *Machine* in the function
      name that take the whole virDomainDef structure as argument and
      call the existing functions with *Machine* in the function name.
      
      Change the arguments of existing functions to *machine* and *arch*
      because they don't need the whole virDomainDef structure and they
      could be used in places where we don't have virDomainDef.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      ac97658d
  15. 10 4月, 2017 1 次提交
  16. 28 3月, 2017 1 次提交
    • A
      qemu: Remove qemuDomainRequiresMemLock() · 1f7661af
      Andrea Bolognani 提交于
      Instead of having a separate function, we can simply return
      zero from the existing qemuDomainGetMemLockLimitBytes() to
      signal the caller that the memory locking limit doesn't need
      to be set for the guest.
      
      Having a single function instead of two makes it less likely
      that we will use the wrong value, which is exactly what
      happened when we started applying the limit that was meant
      for VFIO-using guests to <memoryBacking><locked>-using
      guests.
      1f7661af
  17. 27 3月, 2017 5 次提交
  18. 25 3月, 2017 1 次提交
    • J
      qemu: Set up the migration TLS objects for target · 1a6b6d9a
      John Ferlan 提交于
      If the migration flags indicate this migration will be using TLS,
      then set up the destination during the prepare phase once the target
      domain has been started to add the TLS objects to perform the migration.
      
      This will create at least an "-object tls-creds-x509,endpoint=server,..."
      for TLS credentials and potentially an "-object secret,..." to handle the
      passphrase response to access the TLS credentials. The alias/id used for
      the TLS objects will contain "libvirt_migrate".
      
      Once the objects are created, the code will set the "tls-creds" and
      "tls-hostname" migration parameters to signify usage of TLS.
      
      During the Finish phase we'll be sure to attempt to clear the
      migration parameters and delete those objects (whether or not they
      were created). We'll also perform the same reset during recovery
      if we've reached FINISH3.
      
      If the migration isn't using TLS, then be sure to check if the
      migration parameters exist and clear them if so.
      1a6b6d9a
  19. 16 3月, 2017 1 次提交
  20. 10 3月, 2017 1 次提交
    • M
      qemuProcessHandleMonitorEOF: Disable namespace for domain · e915942b
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1430634
      
      If a qemu process has died, we get EOF on its monitor. At this
      point, since qemu process was the only one running in the
      namespace kernel has already cleaned the namespace up. Any
      attempt of ours to enter it has to fail.
      
      This really happened in the bug linked above. We've tried to
      attach a disk to qemu and while we were in the monitor talking to
      qemu it just died. Therefore our code tried to do some roll back
      (e.g. deny the device in cgroups again, restore labels, etc.).
      However, during the roll back (esp. when restoring labels) we
      still thought that domain has a namespace. So we used secdriver's
      transactions. This failed as there is no namespace to enter.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      e915942b
  21. 09 3月, 2017 1 次提交
  22. 21 2月, 2017 1 次提交
    • M
      qemu: Fix deadlock across fork() in QEMU driver · e22de286
      Marc Hartmayer 提交于
      The functions in virCommand() after fork() must be careful with regard
      to accessing any mutexes that may have been locked by other threads in
      the parent process. It is possible that another thread in the parent
      process holds the lock for the virQEMUDriver while fork() is called.
      This leads to a deadlock in the child process when
      'virQEMUDriverGetConfig(driver)' is called and therefore the handshake
      never completes between the child and the parent process. Ultimately
      the virDomainObjectPtr will never be unlocked.
      
      It gets much worse if the other thread of the parent process, that
      holds the lock for the virQEMUDriver, tries to lock the already locked
      virDomainObject. This leads to a completely unresponsive libvirtd.
      
      It's possible to reproduce this case with calling 'virsh start XXX'
      and 'virsh managedsave XXX' in a tight loop for multiple domains.
      
      This commit fixes the deadlock in the same way as it is described in
      commit 61b52d2e.
      Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      e22de286
  23. 20 2月, 2017 3 次提交