1. 09 12月, 2015 7 次提交
  2. 04 12月, 2015 1 次提交
    • B
      conf: Revert some code to resolve issues for hostdev hotplug · dc692438
      Boris Fiuczynski 提交于
      This patch reverts parts of commits 0d8b24f6 and 0785966d dealing with
      the addition of a controller during virDomainHostdevAssignAddress. This
      caused a regression for the hostdev hotplug path which assumes the
      qemuDomainFindOrCreateSCSIDiskController will add the new controller
      during qemuDomainAttachHostSCSIDevice to both the running domain and
      the domain def controller list when the controller doesn't yet exist
      (whether due to no SCSI controllers existing or the addition of a new
      controller because existing ones are full).
      
      Since commit id 0d8b24f6 will call virDomainHostdevAssignAddress during
      virDomainDeviceDefPostParseInternal which is called either during domain
      definition post processing (via an iterator during virDomainDefPostParse)
      or directly from virDomainDeviceDefParse during hotplug, the change
      broke the "side effect" of being able to add both a hostdev and controller
      to the running domain.
      
      The regression would only be seen if the running domain didn't have a
      SCSI controller already defined or if the existing SCSI controller was
      "full" of devices and a new controller needed to be created.
      
      This patch will also add some extra comments to the code to avoid a
      similar future change.
      Signed-off-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
      Reviewed-by: NStefan Zimmermann <stzi@linux.vnet.ibm.com>
      dc692438
  3. 30 11月, 2015 3 次提交
  4. 27 11月, 2015 3 次提交
  5. 25 11月, 2015 4 次提交
  6. 24 11月, 2015 1 次提交
    • P
      conf: Drop useless check when parsing cpu scheduler info · 5ba01683
      Peter Krempa 提交于
      The checked predicate is a deduction from the following checks:
      
      1) maximum cpu id is checked for every parsed <vcpusched> element
      2) the resulting bitmaps are checked for overlaps
      3) there has to be at least one cpu per <vcpusched>
      
      From the above checks we can indeed deduce that if we have one
      <vcpusched> element per CPU we will have at most 'maxvcpus' of them.
      
      Drop the explicit check since it's redundant.
      5ba01683
  7. 18 11月, 2015 1 次提交
  8. 11 11月, 2015 2 次提交
  9. 10 11月, 2015 1 次提交
  10. 27 10月, 2015 1 次提交
  11. 22 10月, 2015 1 次提交
  12. 16 10月, 2015 2 次提交
    • J
      conf: Optimize the iothreadid initialization · bb02d4c4
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1264008
      
      The existing algorithm assumed that someone was making small, incremental
      changes; however, it is possible to change iothreads from 0 (or relatively
      small number) to some really large number and the algorithm would possibly
      spin its wheels doing unnecessary searches.
      
      So, optimize the algorithm using a bitmap to find available iothread_id's
      starting at 1 that aren't already defined by a "<thread id='#'>" and
      filling in the iothreadids array with those iothread_id values.
      bb02d4c4
    • J
      qemu: Use 'niothreadids' instead of 'iothreads' · 4f8e8887
      John Ferlan 提交于
      Although theoretically both should be the same value, the niothreadids
      should be used in favor of iothreads when performing comparisons. This
      leaves the iothreads as a purely numeric value to be saved in the config
      file.  The one exception to the rule is virDomainIOThreadIDDefArrayInit
      where the iothreadids are being generated from the iothreads count since
      iothreadids were added after initial iothreads support.
      4f8e8887
  13. 15 10月, 2015 1 次提交
  14. 06 10月, 2015 1 次提交
  15. 05 10月, 2015 1 次提交
  16. 26 9月, 2015 2 次提交
    • J
      conf: Fix virtType check · 5e06a4f0
      John Ferlan 提交于
      Commit id '7383b8cc' changed virDomainDef 'virtType' to an enum, that
      caused a build failure on some archs due to comparing an unsigned value
      to < 0.  Adjust the fetch of 'type' to be into temporary 'int virtType'
      and then assign that virtType to the def->virtType
      5e06a4f0
    • S
      conf: Add new VIR_DOMAIN_VIRT_NONE enum · 62569e45
      Shivangi Dhir 提交于
      Introduce VIR_DOMAIN_VIRT_NONE to give domaintype the default value of zero.
      This is specially helpful in constructing better error messages
      when we don't want to look up the default emulator by virtType.
      
      The test data in vircapstest.c is also modified to reflect this change.
      62569e45
  17. 24 9月, 2015 1 次提交
    • J
      domain: Fix migratable XML with graphics/@listen · c0806dc3
      Jiri Denemark 提交于
      As of commit 69929941, we set graphics/@listen attribute according to the
      first listen child element even if that element is of type='network'.
      This was done for backward compatibility with applications which only
      support the original listen attribute. However, by doing so we broke
      migration to older libvirt which tried to check that the listen
      attribute matches one of the listen child elements but which did not
      take type='network' elements into account.
      
      We are not concerned about compatibility with old applications when
      formatting domain XML for migration for two reasons. The XML is consumed
      only by libvirtd and the IP address associated with type='network'
      listen address on the source host is just useless on the destination
      host. Thus, we can safely avoid propagating the type='network' IP
      address to graphics/@listen attribute when creating migratable XML.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1265111Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      c0806dc3
  18. 23 9月, 2015 1 次提交
  19. 22 9月, 2015 6 次提交
    • P
      conf: Don't always recalculate initial memory size from NUMA size totals · 0fed5a7b
      Peter Krempa 提交于
      When implementing memory hotplug I've opted to recalculate the initial
      memory size (contents of the <memory> element) as a sum of the sizes of
      NUMA nodes when NUMA was enabled. This was based on an assumption that
      qemu did not allow starting when the NUMA node size total didn't equal
      to the initial memory size. Unfortunately the check was introduced to
      qemu just lately.
      
      This patch uses the new XML parser flag to decide whether it's safe to
      update the memory size total from the NUMA cell sizes or not.
      
      As an additional improvement we now report an error in case when the
      size of hotplug memory would exceed the total memory size.
      
      The rest of the changes assures that the function is called with correct
      flags.
      0fed5a7b
    • P
      conf: Pre-calculate initial memory size instead of always calculating it · 403e8606
      Peter Krempa 提交于
      Add 'initial_memory' member to struct virDomainMemtune so that the
      memory size can be pre-calculated once instead of inferring it always
      again and again.
      
      Separating of the fields will also allow finer granularity of decisions
      in later patches where it will allow to keep the old initial memory
      value in cases where we are handling incomming migration from older
      versions that did not always update the size from NUMA as the code did
      previously.
      
      The change also requires modification of the qemu memory alignment
      function since at the point where we are modifying the size of NUMA
      nodes the total size needs to be recalculated too.
      
      The refactoring done in this patch also fixes a crash in the hyperv
      driver that did not properly initialize def->numa and thus
      virDomainNumaGetMemorySize(def->numa) crashed.
      
      In summary this patch should have no functional impact at this point.
      403e8606
    • P
      conf: Rename max_balloon to total_memory · 8059a990
      Peter Krempa 提交于
      The name of the variable was misleading. Rename it and it's setting
      accessor before other fixes.
      8059a990
    • P
      conf: Split memory related post parse stuff into separate function · 849b5fc4
      Peter Krempa 提交于
      The post parse func is growing rather large. Since later patches will
      introduce more logic in the memory post parse code, split it into a
      separate handler.
      849b5fc4
    • P
      conf: Drop VIR_DOMAIN_DEF_PARSE_CLOCK_ADJUST flag · ed94ad9e
      Peter Krempa 提交于
      The flag was used only for formatting the XML and once the parser and
      formatter flags were split in 0ecd6851
      it doesn't make sense any more to have it.
      ed94ad9e
    • P
      conf: Add helper to determine whether memory hotplug is enabled for a vm · 1891cad5
      Peter Krempa 提交于
      Add a simple helper so that the code doesn't have to rewrite the same
      condition multiple times.
      1891cad5