1. 22 3月, 2018 2 次提交
  2. 17 3月, 2018 6 次提交
    • J
      libxl: MigratePrepare: use standard begin and end API pattern · 60b3fcd9
      Jim Fehlig 提交于
      libxlDomainMigrationPrepare adds the incoming domain def to the list
      of domains via virDomainObjListAdd, but never adds its own ref to the
      returned virDomainObj as other callers of virDomainObjListAdd do.
      libxlDomainMigrationPrepareTunnel3 suffers the same discrepancy.
      
      Change both to add a ref to the virDomainObj after a successful
      virDomainObjListAdd, similar to other callers. This ensures a consistent
      pattern throughout the drivers and allows using the virDomainObjEndAPI
      function for cleanup.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      60b3fcd9
    • J
      libxl: Use virDomainObjListFindBy{UUID|ID}Ref · fe51dbda
      John Ferlan 提交于
      For libxlDomainLookupByID and libxlDomainLookupByUUID let's
      return a locked and referenced @vm object so that callers can
      then use the common and more consistent virDomainObjEndAPI in
      order to handle cleanup rather than needing to know that the
      returned object is locked and calling virObjectUnlock.
      
      The LookupByName already returns the ref counted and locked object,
      so this will make things more consistent.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NJim Fehlig <jfehlig@suse.com>
      fe51dbda
    • J
      libxl: Properly cleanup after libxlDomObjFromDomain · 4e6fcdb6
      John Ferlan 提交于
      Commit id '9ac94507' altered libxlDomObjFromDomain to return
      a locked *and* ref counted object for some specific purposes;
      however, it neglected to alter all the consumers of the helper
      to use virDomainObjEndAPI thus leaving many objects with extra
      ref counts.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NJim Fehlig <jfehlig@suse.com>
      4e6fcdb6
    • J
      libxl: MigratePerform: properly cleanup after libxlDomObjFromDomain · f5eacf2a
      Jim Fehlig 提交于
      libxlDomObjFromDomain to returns locked and ref counted virDomainObj but
      libxlDomainMigratePerform3Params only unlocks the object on exit. Convert
      it to use the virDomainObjEndAPI function for cleanup.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      f5eacf2a
    • J
      libxl: MigrateConfirm: Dont unlock virDomainObj in helper function · 99486799
      Jim Fehlig 提交于
      The libxlDomainMigrateConfirm3Params API locks and ref counts the associated
      virDomainObj but relies on the helper function libxlDomainMigrationConfirm
      to unlock the object. Unref'ing the object is not done in either function.
      libxlDomainMigrationConfirm is also used by libxlDomainMigratePerform3Params
      for p2p migration, but in that case the lock/ref and unref/unlock are
      properly handled in the API entry point.
      
      Remove the unlock from libxlDomainMigrationConfirm and adjust
      libxlDomainMigrateConfirm3Params to properly unref/unlock the virDomainObj
      on success and error paths.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      99486799
    • J
      libxl: MigrateBegin: Dont call EndAPI in helper function · 64370c4b
      Jim Fehlig 提交于
      The libxlDomainMigrateBegin3Params API locks and ref counts the associated
      virDomainObj but relies on the helper function libxlDomainMigrationBegin
      to unref/unlock the object. libxlDomainMigrationBegin is also used by
      libxlDomainMigratePerform3Params for p2p migration, but in that case the
      lock/ref and unref/unlock are properly handled in the API entry point. So
      p2p migrations suffer a double unref/unlock in the Perform API.
      
      Remove the unref/unlock (virDomainObjEndAPI) from libxlDomainMigrationBegin
      and adjust libxlDomainMigrateBegin3Params to properly unref/unlock
      the virDomainObj on success and error paths.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      64370c4b
  3. 16 3月, 2018 1 次提交
  4. 24 2月, 2018 1 次提交
    • J
      libxl: round memory values to next 1MiB increment · ef71caea
      Jim Fehlig 提交于
      libxl requires the memory sizes to be rounded to 1MiB increments.
      Attempting to start a domain that violates this requirement will
      fail with the marginally helpful error
      
      2018-02-22 01:55:32.921+0000: xc: panic: xc_dom_boot.c:141: xc_dom_boot_mem_init: can't allocate low memory for domain: Out of memory
      2018-02-22 01:55:32.921+0000: libxl: libxl_dom.c:671:libxl__build_dom: xc_dom_boot_mem_init failed: No such file or directory
      
      Round the maximum and current memory values to the next 1MiB
      increment when generating the libxl_domain_config object.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      ef71caea
  5. 23 2月, 2018 1 次提交
  6. 22 2月, 2018 6 次提交
  7. 20 2月, 2018 1 次提交
    • D
      conf: add enum constants for default controller models · a302480d
      Daniel P. Berrangé 提交于
      The controller model is slightly unusual in that the default value is
      -1, not 0. As a result the default value is not covered by any of the
      existing enum cases. This in turn means that any switch() statements
      that think they have covered all cases, will in fact not match the
      default value at all. In the qemuDomainDeviceCalculatePCIConnectFlags()
      method this has caused a serious mistake where we fallthrough from the
      SCSI controller case, to the VirtioSerial controller case, and from
      the USB controller case to the IDE controller case.
      
      By adding explicit enum constant starting at -1, we can ensure switches
      remember to handle the default case.
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      a302480d
  8. 09 2月, 2018 1 次提交
  9. 26 1月, 2018 1 次提交
    • J
      libxl: resume lock process after failed migration · 0c710a37
      Jim Fehlig 提交于
      During migration, the lock process is paused in the perform phase
      but not resumed if there is a subsequent failure, leaving the locked
      resource unprotected.
      
      The perform phase itself can fail, in which case the lock process
      should be resumed before returning from perform. The finish phase
      could also fail on the destination host, in which case the migration
      is canceled in the confirm phase and the VM is resumed. The lock
      process needs to be resumed there as well.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      0c710a37
  10. 16 12月, 2017 1 次提交
  11. 09 12月, 2017 1 次提交
  12. 13 11月, 2017 1 次提交
  13. 09 11月, 2017 1 次提交
  14. 07 11月, 2017 1 次提交
  15. 03 11月, 2017 1 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
  16. 19 10月, 2017 2 次提交
  17. 16 10月, 2017 2 次提交
  18. 14 10月, 2017 3 次提交
  19. 12 10月, 2017 1 次提交
  20. 05 10月, 2017 2 次提交
  21. 21 9月, 2017 1 次提交
    • J
      cpu_conf: Drop updateCPU from virCPUDefFormat · 4fd179f5
      Jiri Denemark 提交于
      In the past we updated host-model CPUs with host CPU data by adding a
      model and features, but keeping the host-model mode. And since the CPU
      model is not normally formatted for host-model CPU defs, we had to pass
      the updateCPU flag to the formatting code to be able to properly output
      updated host-model CPUs. Libvirt doesn't do this anymore, host-model
      CPUs are turned into custom mode CPUs once updated with host CPU data
      and thus there's no reason for keeping the hacks inside CPU XML
      formatters.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      4fd179f5
  22. 20 9月, 2017 1 次提交
  23. 18 9月, 2017 1 次提交
  24. 04 9月, 2017 1 次提交