1. 16 11月, 2018 4 次提交
    • M
      qemu_domain: Track if domain remembers original owner · 7a44ffa6
      Michal Privoznik 提交于
      For metadata locking we might need an extra fork() which given
      latest attempts to do fewer fork()-s is suboptimal. Therefore,
      there will be a qemu.conf knob to {en|dis}able this feature. But
      since the feature is actually not metadata locking itself rather
      than remembering of the original owner of the file this is named
      as 'rememberOwner'. But patches for that feature are not even
      posted yet so there is actually no qemu.conf entry in this patch
      nor a way to enable this feature.
      
      Even though this is effectively a dead code for now it is still
      desired.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      7a44ffa6
    • M
      qemu: add memfd source type · 24b74d18
      Marc-André Lureau 提交于
      Add a new memoryBacking source type "memfd", supported by QEMU (when
      the capability is available).
      
      A memfd is a specialized anonymous memory kind. As such, an anonymous
      source type could be automatically using a memfd. However, there are
      some complications when migrating from different memory backends in
      qemu (mainly due to the internal object naming at this point, but
      there could be more). For now, it is simpler and safer to simply
      introduce a new source type "memfd". Eventually, the "anonymous" type
      could learn to use memfd transparently in a separate change.
      
      The main benefits are that it doesn't need to create filesystem files,
      and it also enforces sealing, providing a bit more safety.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      24b74d18
    • D
      qemu_process.c: moving qemuValidateCpuCount to qemu_domain.c · 9c2fbe97
      Daniel Henrique Barboza 提交于
      Previous patch removed the call to qemuProcessValidateCpuCount
      from qemuProcessStartValidateXML, in qemu_process.c. The only
      caller left is qemuDomainDefValidate, in qemu_domain.c.
      
      Instead of having a public function declared inside qemu_process.c
      that isn't used in that file, this patch moves the function to
      qemu_domain.c, making in static and renaming it to
      qemuDomainValidateCpuCount to be compliant with other static
      functions names in the file.
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      9c2fbe97
    • D
      qemu_domain.c: moving maxCpu validation to qemuDomainDefValidate · 2c4a6a34
      Daniel Henrique Barboza 提交于
      Adding maxCpu validation in qemuDomainDefValidate allows the user to
      spot over the board maxCpus counts at editing time, instead of
      facing a runtime error when starting the domain. This check is also
      arch independent.
      
      This leaves us with 2 calls to qemuProcessValidateCpuCount: one in
      qemuProcessStartValidateXML and the new one at qemuDomainDefValidate.
      
      The call in qemuProcessStartValidateXML is redundant. Following
      up in that code, there is a call to virDomainDefValidate, which
      in turn will call config.domainValidateCallback. In this case, the
      callback function is qemuDomainDefValidate. This means that, on startup
      time, qemuProcessValidateCpuCount will be called twice.
      
      To avoid that, let's also remove the qemuProcessValidateCpuCount call
      from qemuProcessStartValidateXML.
      Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      2c4a6a34
  2. 15 11月, 2018 3 次提交
  3. 13 11月, 2018 2 次提交
  4. 08 11月, 2018 1 次提交
    • E
      snapshot: Don't hose list on deletion failure · 68b2596f
      Eric Blake 提交于
      If qemuDomainSnapshotDiscard() fails for any reason (rare,
      but possible with an ill-timed ENOMEM or if
      qemuDomainSnapshotForEachQcow2() has problems talking to the
      qemu guest monitor), then an attempt to retry the snapshot
      deletion API will crash because we didn't undo the effects
      of virDomainSnapshotDropParent() temporarily rearranging the
      internal list structures, and the second attempt to drop
      parents will dereference NULL.  Fix it by instead noting that
      there are only two callers to qemuDomainSnapshotDiscard(),
      and only one of the two callers wants the parent to be updated;
      thus we can move the call to virDomainSnapshotDropParent()
      into a code path that only gets executed on success.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      68b2596f
  5. 07 11月, 2018 1 次提交
    • J
      qemu: Restore lost shutdown reason · 296e05b5
      John Ferlan 提交于
      When qemuProcessReconnectHelper was introduced (commit d38897a5)
      reconnection failure used VIR_DOMAIN_SHUTOFF_FAILED; however, that
      was changed in commit bda2f17d to either VIR_DOMAIN_SHUTOFF_CRASHED
      or VIR_DOMAIN_SHUTOFF_UNKNOWN.
      
      When QEMU_CAPS_NO_SHUTDOWN checking was removed in commit fe35b1ad
      the conditional state was just left at VIR_DOMAIN_SHUTOFF_CRASHED.
      
      So introduce qemuDomainIsUsingNoShutdown which will manage the
      condition when the domain was started with -no-shutdown so that
      when/if reconnection failure occurs we can restore the decision
      point used to determine whether CRASHED or UNKNOWN is provided.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
      296e05b5
  6. 19 10月, 2018 1 次提交
  7. 02 10月, 2018 2 次提交
  8. 26 9月, 2018 1 次提交
  9. 22 9月, 2018 2 次提交
  10. 17 9月, 2018 1 次提交
  11. 13 9月, 2018 1 次提交
  12. 12 9月, 2018 1 次提交
    • M
      qemu_domain: Drop namespace check from top level functions · e7d9a8f1
      Michal Privoznik 提交于
      In some cases we are checking if the mount namespace is enabled
      at two places: one is at the beginning of exported function (e.g.
      qemuDomainNamespaceSetupDisk()) and the other is at the beginning
      of qemuDomainNamespaceMknodPaths() which is called from the
      former function anyway. Then we have some other functions which
      rely on the later check solely.
      
      In order to compensate for possibly needless function call,
      qemuDomainNamespaceMknodPaths() returns early if @npaths is zero.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      e7d9a8f1
  13. 07 9月, 2018 1 次提交
  14. 06 9月, 2018 1 次提交
  15. 31 8月, 2018 1 次提交
  16. 29 8月, 2018 2 次提交
  17. 28 8月, 2018 2 次提交
  18. 24 8月, 2018 3 次提交
  19. 21 8月, 2018 5 次提交
  20. 14 8月, 2018 1 次提交
  21. 09 8月, 2018 2 次提交
  22. 08 8月, 2018 1 次提交
  23. 07 8月, 2018 1 次提交